]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/note.html.erb
5c42fddd632730b3f65240ac3a912b5efac400a0
[rails.git] / app / views / browse / note.html.erb
1 <table width="100%">
2   <tr>
3     <td width="100%">
4       <h2>
5         <% if @note.status == "closed" %>
6           <%= image_tag("closed_note_marker.png", :alt => 'closed') %>
7           <%= t 'browse.note.closed_title', :note_name => @note.id %>
8         <% else %>
9           <%= image_tag("open_note_marker.png", :alt => 'open') %>
10           <%= t 'browse.note.open_title', :note_name => @note.id %>
11         <% end %>
12       </h2>
13     </td>
14     <td>
15       <%= render :partial => "navigation" %>
16     </td>
17   </tr>
18   <tr valign="top">
19     <td>
20       <table>
21         <tr>
22           <th><%= t 'browse.note.created_at' %></th>
23           <td><%= l @note.created_at %></td>
24         </tr>  
25        <tr>
26          <th><%= t 'browse.note.edited_at' %></th>
27          <td><%= l @note.updated_at %></td>
28        </tr>
29        <% if @note.status == "closed" %>
30          <tr>
31            <th><%= t 'browse.note.closed_at' %></th>
32            <td><%= l @note.closed_at %></td>
33          </tr>
34        <% end %>
35        <tr>
36          <th><%= t 'browse.note.opened_by' %></th>
37          <% if @note.author.nil? %>
38            <td> <%= @note.author_name %> </td>
39          <% else %>
40            <td><%= link_to h(@note.author_name), :controller => "user", :action => "view", :display_name => @note.author_name %></td>
41          <% end %>
42        </tr>
43        <tr>
44          <th><%= t 'browse.note.description' %></th>
45          <td><%= h(@note.comments.first.body) %></td>
46        </tr>
47        <tr>
48          <th><%= t 'browse.node_details.coordinates' %></th>
49          <td><div class="geo"><%= link_to ("<span class='latitude'>#{number_with_delimiter(@note.lat)}</span>, <span class='longitude'>#{number_with_delimiter(@note.lon)}</span>"), {:controller => 'site', :action => 'index', :lat => h(@note.lat), :lon => h(@note.lon), :zoom => "18"} %></div></td>
50        </tr>
51     </table>
52
53     <br />
54
55     <% if @note.comments.length > 1 %>
56       <table>
57         <tr>
58           <th width="20%"> <%= t 'browse.note.comment_by' %></th>
59           <th width="60%"> <%= t 'browse.note.comment' %></th>
60           <th width="20%"> <%= t 'browse.note.date' %></th> 
61         </tr>
62         <% @note.comments[1..-1].each do |comment| %>
63           <tr>
64             <td>
65               <% if comment.author.nil? %>
66                 <%= comment.author_name %>
67               <% else %>
68                 <%= link_to h(comment.author.display_name), :controller => "user", :action => "view", :display_name => comment.author.display_name %>                                   
69               <% end %>
70             </td>
71             <td> <%= h(comment.body) %> </td>
72             <td> <%= l comment.created_at %> </td>
73           </tr>
74         <% end %>
75       </table>
76     <% end %>
77         
78     <hr />
79     </td>
80
81     <%= render :partial => "map", :object => @note %>
82   </tr>
83 </table>