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