Added authorization + issues dashboard
[rails.git] / app / views / issues / index.html.erb
index 83fe41be954d2a325628638629e108fe11f76265..a599abb994ec4907dae06a8de4164bcca495cc38 100644 (file)
@@ -1,2 +1,36 @@
-<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 existing Issues:</h1>
+<% end %>
+
+<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>
+
+