]> git.openstreetmap.org Git - rails.git/blob - app/views/notes/index.html.erb
Use body color in notes table legend
[rails.git] / app / views / notes / index.html.erb
1 <% content_for :heading do %>
2   <h1><%= t ".heading", :user => @user.display_name %></h1>
3   <p><%= t ".subheading_html",
4            :user => link_to(@user.display_name, @user),
5            :submitted => tag.span(t(".subheading_submitted"), :class => "px-2 py-1 bg-primary bg-opacity-25"),
6            :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %></p>
7 <% end %>
8
9 <% if @notes.empty? %>
10   <h4><%= t ".no_notes" %></h4>
11
12 <% else %>
13   <%= render :partial => "notes_paging_nav" %>
14
15   <table class="table table-sm note_list">
16     <thead>
17       <tr>
18         <th></th>
19         <th><%= t ".id" %></th>
20         <th><%= t ".creator" %></th>
21         <th><%= t ".description" %></th>
22         <th><%= t ".created_at" %></th>
23         <th><%= t ".last_changed" %></th>
24       </tr>
25     </thead>
26   <% @notes.each do |note| -%>
27     <tr<% if note.author == @user %> class="table-primary"<% end %>>
28       <td>
29         <% if note.closed? %>
30           <%= image_tag("closed_note_marker.png", :alt => "closed", :size => "25x40") %>
31         <% else %>
32           <%= image_tag("open_note_marker.png", :alt => "open", :size => "25x40") %>
33         <% end %>
34       </td>
35       <td><%= link_to note.id, note %></td>
36       <td><%= note_author(note.author) %></td>
37       <td><%= note.comments.first.body.to_html %></td>
38       <td><%= friendly_date_ago(note.created_at) %></td>
39       <td><%= friendly_date_ago(note.updated_at) %></td>
40     </tr>
41   <% end -%>
42   </table>
43
44   <%= render :partial => "notes_paging_nav" %>
45
46 <% end -%>