Eliminate duplication of tag printing logic.
This commit is contained in:
parent
7daa4f5d2b
commit
b02c873c0e
3 changed files with 12 additions and 25 deletions
|
@ -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>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
10
app/views/browse/_tag_details.rhtml
Normal file
10
app/views/browse/_tag_details.rhtml
Normal 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 %>
|
Loading…
Add table
Add a link
Reference in a new issue