]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/issues/show.html.erb
Combine last_updated_by and last_updated_at columns on issues index
[rails.git] / app / views / issues / show.html.erb
index 3bef038005e9223adb367e357f7cd1e17b1b2597..732fd2ef2a114c9ac50e1378772e196e99aa313e 100644 (file)
@@ -1,6 +1,6 @@
 <% content_for :heading do %>
 <h2><%= t ".title", :status => @issue.status.humanize, :issue_id => @issue.id %></h2>
-<p><%= report_type(@issue.reportable_type) %> : <%= reportable_url(@issue.reportable) %></p>
+<p><%= @issue.reportable.model_name.human %> : <%= link_to reportable_title(@issue.reportable), reportable_url(@issue.reportable) %></p>
 <p class="deemphasize">
   <small>
     <%= @issue.assigned_role %>
     <br/>
   </div>
 
-  <div class="related-block">
-    <h3><%= t ".other_issues_against_this_user" %></h3>
-    <div class="unread-reports">
-      <% if @related_issues.count > 1 %>
-        <% @related_issues.each do |issue| %>
-          <% if issue.id != @issue.id %>
-            <%= reports_url(issue) %> <br/>
+  <% if @issue.reported_user %>
+    <div class="related-block">
+      <h3><%= t ".other_issues_against_this_user" %></h3>
+      <div class="unread-reports">
+        <% if @related_issues.count > 1 %>
+          <% @related_issues.each do |issue| %>
+            <% if issue.id != @issue.id %>
+              <%= link_to reportable_title(issue.reportable), issue %> <br/>
+            <% end %>
           <% end %>
+        <% else %>
+          <p><%= t ".no_other_issues" %></p>
         <% end %>
-      <% else %>
-        <p><%= t ".no_other_issues" %></p>
-      <% end %>
+      </div>
     </div>
-  </div>
+  <% end %>
 </div>
 
 <h3><%= t ".comments_on_this_issue" %></h3>