]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/issues/_reports.html.erb
Prefer string interpolation to concatenation
[rails.git] / app / views / issues / _reports.html.erb
index 3d31eeb1a971f85aa41373785b6dfeda3281ee7f..143f2d887106cb996406f62358b4d4e8f3429465 100644 (file)
@@ -1,16 +1,14 @@
 <% reports.each do |report| %>
-       <% details =  report.details.split("--||--") %>
-       <div class="reports">
-               <div style="float:left">
-                       <%= link_to user_thumbnail(report.user), :controller => :user,:action =>:view, :display_name => report.user.display_name %>
-               </div>
-               Reported as <b><%= details[1].delete('[').delete(']').downcase %></b> by <b><%= link_to report.user.display_name, :controller => :user,:action =>:view, :display_name => report.user.display_name %></b> <br/>
-               <span class="deemphasize">
-                       On <%= l report.updated_at.to_datetime, :format => :friendly %> 
-               </span>
-               <br/>
-               <%= details[0] %> 
-               <br/>
-       </div>
-       <hr>
+  <div class="report">
+    <div class="float-left">
+      <%= link_to user_thumbnail(report.user), user_path(report.user) %>
+    </div>
+    <p class="text-muted mb-0">
+      <%= t ".reported_by_html", :category => report.category,
+                                 :user => link_to(report.user.display_name, user_path(report.user)),
+                                 :updated_at => l(report.updated_at.to_datetime, :format => :friendly) %>
+    </p>
+    <p><%= report.details %></p>
+  </div>
+  <hr>
 <% end %>