From: Tom Hughes Date: Wed, 8 Apr 2009 23:19:41 +0000 (+0000) Subject: Eliminate duplication of tag printing logic. X-Git-Tag: live~7605^2~34 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b02c873c0e892b4bd0b0e511020caaf86337b1de?hp=7daa4f5d2bf9ad43f4e415a4f0b3f208fa414ffe Eliminate duplication of tag printing logic. --- diff --git a/app/views/browse/_changeset_details.rhtml b/app/views/browse/_changeset_details.rhtml index 07f076e21..baeb44508 100644 --- a/app/views/browse/_changeset_details.rhtml +++ b/app/views/browse/_changeset_details.rhtml @@ -17,21 +17,7 @@ <% end %> - <% unless changeset_details.tags_as_hash.empty? %> - - Tags: - - - <%= render :partial => "tag", :collection => changeset_details.tags_as_hash %> -
- - - <% else %> - - Tags - There are no tags for this changeset - - <% end %> + <%= render :partial => "tag_details", :object => changeset_details %> Bounding box: diff --git a/app/views/browse/_common_details.rhtml b/app/views/browse/_common_details.rhtml index 71a9dd314..09cf4cf2d 100644 --- a/app/views/browse/_common_details.rhtml +++ b/app/views/browse/_common_details.rhtml @@ -20,13 +20,4 @@ <%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %> -<% unless common_details.tags_as_hash.empty? %> - - Tags: - - - <%= render :partial => "tag", :collection => common_details.tags_as_hash %> -
- - -<% end %> +<%= render :partial => "tag_details", :object => common_details %> diff --git a/app/views/browse/_tag_details.rhtml b/app/views/browse/_tag_details.rhtml new file mode 100644 index 000000000..dab36266b --- /dev/null +++ b/app/views/browse/_tag_details.rhtml @@ -0,0 +1,10 @@ +<% unless tag_details.tags_as_hash.empty? %> + + Tags: + + + <%= render :partial => "tag", :collection => tag_details.tags_as_hash %> +
+ + +<% end %>