]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/bug.html.erb
Merge branch 'master' of git://git.openstreetmap.org/rails into openstreetbugs2
[rails.git] / app / views / browse / bug.html.erb
1 <table width="100%">
2   <tr>
3     <td width="100%">
4       <h2>
5                 <% if @bug.status == "closed" %>
6                         <%= image_tag("closed_bug_marker.png", :alt => 'closed') %>
7                         <%= t'browse.bug.closed_title', :bug_name => @bug.id %>
8                 <% else %>
9                         <%= image_tag("open_bug_marker.png", :alt => 'open') %>
10                         <%=     t'browse.bug.open_title', :bug_name => @bug.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.bug.created_at' %></th>
23                             <td><%= l @bug.date_created %></td>
24                         </tr>  
25                         
26                         <tr>
27                                 <th><%= t 'browse.bug.edited_at' %></th>
28                                 <td><%= l @bug.last_changed %></td>
29                         </tr>
30                         <% if @bug.status == "closed" %>
31                         <tr>
32                             <th><%= t 'browse.bug.closed_at' %></th>
33                             <td><%= l @bug.date_closed %></td>
34                         </tr>
35                         <% end %>
36                         <tr>
37                                 <th><%= t 'browse.bug.opened_by' %></th>
38                                 <% if @bug.map_bug_comment[0].user.nil? %>
39                                         <td> <%= @bug.map_bug_comment[0].commenter_name %> </td>
40                                 <% else %>
41                                         <td><%= link_to h(@bug.map_bug_comment[0].user.display_name), :controller => "user", :action => "view", :display_name => @bug.map_bug_comment[0].user.display_name %></td>                                      
42                                 <% end %>
43                         </tr>
44                         <tr>
45                                 <th><%= t 'browse.bug.description' %></th>
46                                 <td><%= h(@bug.map_bug_comment[0].comment) %></td>
47                         </tr>
48
49                         <tr>
50                                 <th><%= t 'browse.node_details.coordinates' %></th>
51                                 <td><div class="geo"><%= link_to ("<span class='latitude'>#{number_with_delimiter(@bug.lat)}</span>, <span class='longitude'>#{number_with_delimiter(@bug.lon)}</span>"), {:controller => 'site', :action => 'index', :lat => h(@bug.lat), :lon => h(@bug.lon), :zoom => "18"} %></div></td>
52                                 </tr>
53
54                 </table>
55
56                 <br>
57
58         <%if @bug.map_bug_comment.length > 1 %>
59
60                 <table>
61                         <tr>
62                                 <th width="20%"> <%= t 'browse.bug.comment_by' %></th> <th width="60%"> <%= t 'browse.bug.comment' %></th> <th width="20%"> <%= t 'browse.bug.date' %></th> 
63                         </tr>
64                         <% @bug.map_bug_comment[1..-1].each do |bug_comment| %>
65                                 <tr>
66                                         
67                                         <td>
68                                                 <% if bug_comment.user.nil? %>
69                                                         <%= bug_comment.commenter_name %>
70                                                 <% else %>
71                                                         <%= link_to h(bug_comment.user.display_name), :controller => "user", :action => "view", :display_name => bug_comment.user.display_name %>                                       
72                                                 <% end %>
73                                         </td>
74                                         <td> <%= h(bug_comment.comment) %> </td>
75                                         <td> <%= l bug_comment.date_created %> </td>
76                                 </tr>
77                         <% end %>
78                 </table>
79
80         <% end %>
81         
82       <hr />
83       
84     </td>
85     <%= render :partial => "map", :object => @bug %>
86   </tr>
87 </table>