]> git.openstreetmap.org Git - rails.git/blob - app/views/notes/index.html.erb
Merge remote-tracking branch 'upstream/pull/2670'
[rails.git] / app / views / notes / index.html.erb
1 <% content_for :heading do %>
2   <h2><%= t ".heading", :user => @user.display_name %></h2>
3   <p><%= t ".subheading_html", :user => link_to(@user.display_name, user_path(@user)) %></p>
4 <% end %>
5
6 <%= render :partial => "notes_paging_nav" %>
7
8 <table class="table table-sm note_list">
9   <thead>
10     <tr>
11       <th></th>
12       <th><%= t ".id" %></th>
13       <th><%= t ".creator" %></th>
14       <th><%= t ".description" %></th>
15       <th><%= t ".created_at" %></th>
16       <th><%= t ".last_changed" %></th>
17     </tr>
18   </thead>
19 <% @notes.each do |note| -%>
20   <tr<% if note.author == @user %> class="creator"<% end %>>
21     <td>
22       <% if note.closed? %>
23         <%= image_tag("closed_note_marker.png", :alt => "closed", :size => "25x40") %>
24       <% else %>
25         <%= image_tag("open_note_marker.png", :alt => "open", :size => "25x40") %>
26       <% end %>
27     </td>
28     <td><%= link_to note.id, browse_note_path(note) %></td>
29     <td><%= note_author(note.author) %></td>
30     <td><%= note.comments.first.body.to_html %></td>
31     <td><%= friendly_date_ago(note.created_at) %></td>
32     <td><%= friendly_date_ago(note.updated_at) %></td>
33   </tr>
34 <% end -%>
35 </table>
36
37 <%= render :partial => "notes_paging_nav" %>