Mass rename of "bugs" as "notes" for increased user friendliness
This commit is contained in:
parent
bb490aca81
commit
e3b8b89330
42 changed files with 448 additions and 395 deletions
|
@ -38,7 +38,7 @@
|
|||
|
||||
$("area_larger_map").href = '/?minlon='+minlon+'&minlat='+minlat+'&maxlon='+maxlon+'&maxlat='+maxlat+'&box=yes';
|
||||
$("area_larger_map").innerHTML = "<%= t 'browse.map.larger.area' %>";
|
||||
<% elsif map.instance_of? MapBug %>
|
||||
<% elsif map.instance_of? Note %>
|
||||
var centre = new OpenLayers.LonLat(<%= map.lon %>, <%= map.lat %>);
|
||||
|
||||
setMapCenter(centre, 16);
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
<table width="100%">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<h2>
|
||||
<% if @bug.status == "closed" %>
|
||||
<%= image_tag("closed_bug_marker.png", :alt => 'closed') %>
|
||||
<%= t 'browse.bug.closed_title', :bug_name => @bug.id %>
|
||||
<% else %>
|
||||
<%= image_tag("open_bug_marker.png", :alt => 'open') %>
|
||||
<%= t 'browse.bug.open_title', :bug_name => @bug.id %>
|
||||
<% end %>
|
||||
</h2>
|
||||
</td>
|
||||
<td>
|
||||
<%= render :partial => "navigation" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t 'browse.bug.created_at' %></th>
|
||||
<td><%= l @bug.created_at %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t 'browse.bug.edited_at' %></th>
|
||||
<td><%= l @bug.updated_at %></td>
|
||||
</tr>
|
||||
<% if @bug.status == "closed" %>
|
||||
<tr>
|
||||
<th><%= t 'browse.bug.closed_at' %></th>
|
||||
<td><%= l @bug.closed_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<th><%= t 'browse.bug.opened_by' %></th>
|
||||
<% if @bug.author.nil? %>
|
||||
<td> <%= @bug.author_name %> </td>
|
||||
<% else %>
|
||||
<td><%= link_to h(@bug.author_name), :controller => "user", :action => "view", :display_name => @bug.author_name %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t 'browse.bug.description' %></th>
|
||||
<td><%= h(@bug.comments.first.body) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t 'browse.node_details.coordinates' %></th>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<% if @bug.comments.length > 1 %>
|
||||
<table>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<% @bug.comments[1..-1].each do |bug_comment| %>
|
||||
<tr>
|
||||
<td>
|
||||
<% if bug_comment.user.nil? %>
|
||||
<%= bug_comment.author_name %>
|
||||
<% else %>
|
||||
<%= link_to h(bug_comment.user.display_name), :controller => "user", :action => "view", :display_name => bug_comment.user.display_name %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td> <%= h(bug_comment.body) %> </td>
|
||||
<td> <%= l bug_comment.created_at %> </td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<hr />
|
||||
</td>
|
||||
|
||||
<%= render :partial => "map", :object => @bug %>
|
||||
</tr>
|
||||
</table>
|
83
app/views/browse/note.html.erb
Normal file
83
app/views/browse/note.html.erb
Normal file
|
@ -0,0 +1,83 @@
|
|||
<table width="100%">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<h2>
|
||||
<% if @note.status == "closed" %>
|
||||
<%= image_tag("closed_note_marker.png", :alt => 'closed') %>
|
||||
<%= t 'browse.note.closed_title', :note_name => @note.id %>
|
||||
<% else %>
|
||||
<%= image_tag("open_note_marker.png", :alt => 'open') %>
|
||||
<%= t 'browse.note.open_title', :note_name => @note.id %>
|
||||
<% end %>
|
||||
</h2>
|
||||
</td>
|
||||
<td>
|
||||
<%= render :partial => "navigation" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t 'browse.note.created_at' %></th>
|
||||
<td><%= l @note.created_at %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t 'browse.note.edited_at' %></th>
|
||||
<td><%= l @note.updated_at %></td>
|
||||
</tr>
|
||||
<% if @note.status == "closed" %>
|
||||
<tr>
|
||||
<th><%= t 'browse.note.closed_at' %></th>
|
||||
<td><%= l @note.closed_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<th><%= t 'browse.note.opened_by' %></th>
|
||||
<% if @note.author.nil? %>
|
||||
<td> <%= @note.author_name %> </td>
|
||||
<% else %>
|
||||
<td><%= link_to h(@note.author_name), :controller => "user", :action => "view", :display_name => @note.author_name %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t 'browse.note.description' %></th>
|
||||
<td><%= h(@note.comments.first.body) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t 'browse.node_details.coordinates' %></th>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<% if @note.comments.length > 1 %>
|
||||
<table>
|
||||
<tr>
|
||||
<th width="20%"> <%= t 'browse.note.comment_by' %></th>
|
||||
<th width="60%"> <%= t 'browse.note.comment' %></th>
|
||||
<th width="20%"> <%= t 'browse.note.date' %></th>
|
||||
</tr>
|
||||
<% @note.comments[1..-1].each do |comment| %>
|
||||
<tr>
|
||||
<td>
|
||||
<% if comment.author.nil? %>
|
||||
<%= comment.author_name %>
|
||||
<% else %>
|
||||
<%= link_to h(comment.author.display_name), :controller => "user", :action => "view", :display_name => comment.author.display_name %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td> <%= h(comment.body) %> </td>
|
||||
<td> <%= l comment.created_at %> </td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<hr />
|
||||
</td>
|
||||
|
||||
<%= render :partial => "map", :object => @note %>
|
||||
</tr>
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue