]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/issues/index.html.erb
Added report icon + changes to admin UI + changes to report form + few other minor...
[rails.git] / app / views / issues / index.html.erb
index 83fe41be954d2a325628638629e108fe11f76265..98fbbaa2d345525ffc4e266fcc0c6fda4bd75cc5 100644 (file)
@@ -1,2 +1,41 @@
-<h1>Issues#index</h1>
-<p>Find me in app/views/issues/index.html.erb</p>
+<p id= "notice"><%= notice %></p>
+
+<% content_for :heading do %>
+       <h1>List of <%= @user_role %> issues:</h1>
+<% end %>
+
+<%= form_tag(issues_path, :method => :get) do %>
+       <%= text_field_tag :search_by_user, params[:search_by_user], placeholder: "Search by Reported User" %>
+       <%= submit_tag "Search" %>
+<% end %>
+<br/>
+<br/>
+
+<table>
+       <thead>
+               <tr>
+                       <tr>
+                               <td><b> Status </b></td>
+                               <td><b> Number of Reports</b></td>
+                               <td><b> Last updated at</b></td>
+                               <td><b> Link to instance </b></td>
+                               <td><b> Reported User </b></td>
+                               <td></td>
+                       </tr>
+               </tr>
+       </thead>
+       <tbody>
+               <% @issues.each do |issue| %>
+                       <tr>
+                               <td><span class="count-number"> <strong><%= issue.status %></strong></span> </td>
+                               <td><%= issue.reports.count %></td>
+                               <td><%= issue.updated_at.strftime('%H:%M, %m/%d/%y') %></td>
+                               <td> <%= reportable_url(issue.reportable) %></td>
+                               <td><%= link_to issue.user.display_name , :controller => :user, :action => :view,:display_name => issue.user.display_name %></td>
+                               <td><b><%= link_to "Show Reports", issue %></b></td>
+                       </tr>
+               <% end %>
+       </tbody>
+</table>
+
+