]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/issues/index.html.erb
Fixed link to DiaryComments
[rails.git] / app / views / issues / index.html.erb
index 83fe41be954d2a325628638629e108fe11f76265..4002e9db3e40152d14a2ea01e9aa19a276ea676f 100644 (file)
@@ -1,2 +1,43 @@
-<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 style="text-align:center"><b> # </b> </td>
+                               <td style="text-align:center"><b>Issue Type </b></td>
+                               <td style="text-align:center"><b> Status </b></td>
+                               <td style="text-align:center"><b> Number of Reports</b></td>
+                               <td style="text-align:center"><b> Link to instance </b></td>
+                               <td style="text-align:center"><b> Reported User </b></td>
+                               <td style="text-align:center"></td>
+                       </tr>
+               </tr>
+       </thead>
+       <tbody>
+               <% @issues.each do |issue| %>
+                       <tr>
+                               <td style="text-align:center">Issue #<%= issue.id %> </td>
+                               <td style="text-align:center"> <%= issue.reportable_type %></td>
+                               <td style="text-align:center"><span class="count-number"> <strong><%= issue.status %></strong></span> </td>
+                               <td style="text-align:center"><%= issue.reports.count %></td>
+                               <td style="text-align:center"> <%= reportable_url(issue.reportable) %></td>
+                               <td style="text-align:center"><%= link_to issue.user.display_name , :controller => :user, :action => :view,:display_name => issue.user.display_name %></td>
+                               <td style="text-align:center"><%= link_to "Show Issue", issue %></td>
+                       </tr>
+               <% end %>
+       </tbody>
+</table>
+
+