Rename some columns and indexes in the bug tables

This commit is contained in:
Tom Hughes 2011-05-08 17:39:27 +01:00
parent d2cf09f389
commit 882700c5c8
13 changed files with 175 additions and 148 deletions

View file

@ -20,29 +20,29 @@
<table>
<tr>
<th><%= t 'browse.bug.created_at' %></th>
<td><%= l @bug.date_created %></td>
<td><%= l @bug.created_at %></td>
</tr>
<tr>
<th><%= t 'browse.bug.edited_at' %></th>
<td><%= l @bug.last_changed %></td>
<td><%= l @bug.updated_at %></td>
</tr>
<% if @bug.status == "closed" %>
<tr>
<th><%= t 'browse.bug.closed_at' %></th>
<td><%= l @bug.date_closed %></td>
<td><%= l @bug.closed_at %></td>
</tr>
<% end %>
<tr>
<th><%= t 'browse.bug.opened_by' %></th>
<% if @bug.comments.first.user.nil? %>
<td> <%= @bug.comments.first.commenter_name %> </td>
<td> <%= @bug.comments.first.author_name %> </td>
<% else %>
<td><%= link_to h(@bug.comments.first.user.display_name), :controller => "user", :action => "view", :display_name => @bug.comments.first.user.display_name %></td>
<% end %>
</tr>
<tr>
<th><%= t 'browse.bug.description' %></th>
<td><%= h(@bug.comments.first.comment) %></td>
<td><%= h(@bug.comments.first.body) %></td>
</tr>
<tr>
<th><%= t 'browse.node_details.coordinates' %></th>
@ -63,13 +63,13 @@
<tr>
<td>
<% if bug_comment.user.nil? %>
<%= bug_comment.commenter_name %>
<%= 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.comment) %> </td>
<td> <%= l bug_comment.date_created %> </td>
<td> <%= h(bug_comment.body) %> </td>
<td> <%= l bug_comment.created_at %> </td>
</tr>
<% end %>
</table>

View file

@ -12,10 +12,10 @@ xml.item do
xml.description htmlize(bug.flatten_comment("<br><br>"))
unless bug.comments.empty?
xml.author bug.comments[-1].commenter_name
xml.author bug.comments[-1].author_name
end
xml.pubDate bug.last_changed.to_s(:rfc822)
xml.pubDate bug.updated_at.to_s(:rfc822)
xml.geo :lat, bug.lat
xml.geo :long, bug.lon
xml.georss :point, "#{bug.lat} #{bug.lon}"

View file

@ -1,20 +1,20 @@
xml.bug("lon" => bug.lon, "lat" => bug.lat) do
xml.id bug.id
xml.date_created bug.date_created
xml.date_created bug.created_at
xml.nearby bug.nearby_place
xml.status bug.status
if bug.status == "closed"
xml.date_closed bug.date_closed
xml.date_closed bug.closed_at
end
xml.comments do
bug.comments.each do |comment|
xml.comment do
xml.date comment.date_created
xml.uid comment.commenter_id unless comment.commenter_id.nil?
xml.user comment.commenter_name
xml.text comment.comment
xml.date comment.created_at
xml.uid comment.author_id unless comment.author_id.nil?
xml.user comment.author_name
xml.text comment.body
end
end
end

View file

@ -13,7 +13,7 @@
<th><%= t'bugs.user.last_changed' %></th>
</tr>
<% @bugs.each do |bug| %>
<tr<% if bug.comments[0].user != @user2 %> bgcolor="#EEEEEE"<% end %>>
<tr<% if bug.comments.first.user != @user2 %> bgcolor="#EEEEEE"<% end %>>
<td>
<% if bug.status == "closed" %>
<%= image_tag("closed_bug_marker.png", :alt => 'closed') %>
@ -22,14 +22,14 @@
<% end %>
</td>
<td><%= link_to bug.id.to_s, :controller => "browse", :action => "bug", :id => bug.id %></td>
<% if bug.comments[0].user.nil? %>
<td> <%= bug.comments[0].commenter_name %> </td>
<% if bug.comments.first.user.nil? %>
<td> <%= bug.comments.first.author_name %> </td>
<% else %>
<td><%= link_to h(bug.comments[0].user.display_name), :controller => "user", :action => "view", :display_name => bug.comments[0].user.display_name %></td>
<td><%= link_to h(bug.comments.first.user.display_name), :controller => "user", :action => "view", :display_name => bug.comments.first.user.display_name %></td>
<% end %>
<td> <%= htmlize bug.comments[0].comment %> </td>
<td><%= l bug.date_created %></td>
<td><%= l bug.last_changed %></td>
<td> <%= htmlize bug.comments.first.body %> </td>
<td><%= l bug.created_at %></td>
<td><%= l bug.updated_at %></td>
</tr>
<% end %>
</table>

View file

@ -27,16 +27,16 @@ xml.rss("version" => "2.0",
if comment.event == "commented" and not comment.nil?
description_text += "<b>Comment:</b><br>"
description_text += htmlize(comment.comment)
description_text += htmlize(comment.body)
description_text += "<br>"
end
description_text += "<b>Full bug report:</b><br>"
description_text += comment.map_bug.flatten_comment("<br>", comment.date_created)
description_text += comment.map_bug.flatten_comment("<br>", comment.created_at)
xml.description description_text
xml.author comment.commenter_name
xml.pubDate comment.date_created.to_s(:rfc822)
xml.author comment.author_name
xml.pubDate comment.created_at.to_s(:rfc822)
xml.geo :lat, comment.map_bug.lat
xml.geo :long, comment.map_bug.lon
xml.georss :point, "#{comment.map_bug.lat} #{comment.map_bug.lon}"