Eliminate duplication of tag printing logic.

This commit is contained in:
Tom Hughes 2009-04-08 23:19:41 +00:00
parent 7daa4f5d2b
commit b02c873c0e
3 changed files with 12 additions and 25 deletions

View file

@ -17,21 +17,7 @@
</tr>
<% end %>
<% unless changeset_details.tags_as_hash.empty? %>
<tr valign="top">
<th>Tags:</th>
<td>
<table padding="0">
<%= render :partial => "tag", :collection => changeset_details.tags_as_hash %>
</table>
</td>
</tr>
<% else %>
<tr>
<th>Tags</th>
<td>There are no tags for this changeset</td>
</tr>
<% end %>
<%= render :partial => "tag_details", :object => changeset_details %>
<tr>
<th>Bounding box:</th>

View file

@ -20,13 +20,4 @@
<td><%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %></td>
</tr>
<% unless common_details.tags_as_hash.empty? %>
<tr valign="top">
<th>Tags:</th>
<td>
<table padding="0">
<%= render :partial => "tag", :collection => common_details.tags_as_hash %>
</table>
</td>
</tr>
<% end %>
<%= render :partial => "tag_details", :object => common_details %>

View file

@ -0,0 +1,10 @@
<% unless tag_details.tags_as_hash.empty? %>
<tr valign="top">
<th>Tags:</th>
<td>
<table padding="0">
<%= render :partial => "tag", :collection => tag_details.tags_as_hash %>
</table>
</td>
</tr>
<% end %>