From: Tom Hughes Date: Wed, 11 Jul 2012 13:31:47 +0000 (+0100) Subject: Present links at the bottom of data browser pages in a consistent way X-Git-Tag: live~5480 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/bd12ec7a8bfdc244756272a2f4fec1f645a6d852 Present links at the bottom of data browser pages in a consistent way --- diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index aff873e45..2796f7c5f 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -8,5 +8,5 @@ <% end %> <%= render :partial => "changeset_details", :object => @changeset %>
-<%= raw t 'browse.changeset.download', :changeset_xml_link => link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read"), - :osmchange_xml_link => link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %> +<%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %> +| <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %> diff --git a/app/views/browse/node.html.erb b/app/views/browse/node.html.erb index df777c960..8f0a2001b 100644 --- a/app/views/browse/node.html.erb +++ b/app/views/browse/node.html.erb @@ -12,7 +12,7 @@ <% end -%> <%= render :partial => "node_details", :object => @node %>
-<%= link_to(t('browse.node.download_xml'), :controller => "old_node", :action => "version", :version => @node.version) %> +<%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %> | <%= link_to(t('browse.node.view_history'), :action => "node_history") %> <% if @node.visible -%> | <%= link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id) %> diff --git a/app/views/browse/node_history.html.erb b/app/views/browse/node_history.html.erb index 5f70492b4..937ad7dc0 100644 --- a/app/views/browse/node_history.html.erb +++ b/app/views/browse/node_history.html.erb @@ -10,5 +10,5 @@ <%= render :partial => "node_details", :object => node %>
<% end %> -<%= raw t 'browse.node_history.download', :download_xml_link => link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history"), - :view_details_link => link_to(t('browse.node_history.view_details'), :action => "node") %> +<%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %> +| <%= link_to(t('browse.node_history.view_details'), :action => "node") %> diff --git a/app/views/browse/relation.html.erb b/app/views/browse/relation.html.erb index 2128d18a9..28e251ac2 100644 --- a/app/views/browse/relation.html.erb +++ b/app/views/browse/relation.html.erb @@ -10,5 +10,5 @@ <%= render :partial => "map", :object => @relation %> <%= render :partial => "relation_details", :object => @relation %>
-<%= raw t'browse.relation.download', :download_xml_link => link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read"), - :view_history_link => link_to(t('browse.relation.view_history'), :action => "relation_history") %> +<%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %> +| <%= link_to(t('browse.relation.view_history'), :action => "relation_history") %> diff --git a/app/views/browse/relation_history.html.erb b/app/views/browse/relation_history.html.erb index 4080bccb7..8fb08e6e9 100644 --- a/app/views/browse/relation_history.html.erb +++ b/app/views/browse/relation_history.html.erb @@ -8,5 +8,5 @@ <%= render :partial => "relation_details", :object => relation %>
<% end %> -<%= raw t'browse.relation_history.download', :download_xml_link => link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history"), - :view_details_link => link_to(t('browse.relation_history.view_details'), :action => "relation") %> +<%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %> +| <%= link_to(t('browse.relation_history.view_details'), :action => "relation") %> diff --git a/app/views/browse/way.html.erb b/app/views/browse/way.html.erb index 41341fef8..167ac6959 100644 --- a/app/views/browse/way.html.erb +++ b/app/views/browse/way.html.erb @@ -12,6 +12,6 @@
<%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %> | <%= link_to(t('browse.way.view_history'), :action => "way_history") %> -<% unless @midnode.nil? %> - | <%= link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id, :lat => @midnode.lat, :lon => @midnode.lon, :zoom => 16) %> -<% end %> +<% unless @midnode.nil? -%> +| <%= link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id, :lat => @midnode.lat, :lon => @midnode.lon, :zoom => 16) %> +<% end -%> diff --git a/app/views/browse/way_history.html.erb b/app/views/browse/way_history.html.erb index 2245017db..f581dd189 100644 --- a/app/views/browse/way_history.html.erb +++ b/app/views/browse/way_history.html.erb @@ -8,5 +8,5 @@ <%= render :partial => "way_details", :object => way %>
<% end %> -<%= raw t'browse.way_history.download', :download_xml_link => link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history"), - :view_details_link => link_to(t('browse.way_history.view_details'), :action => "way") %> +<%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %> +| <%= link_to(t('browse.way_history.view_details'), :action => "way") %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 6108b7207..e1f7f416a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -94,7 +94,6 @@ en: changeset: title: "Changeset" changeset: "Changeset: %{id}" - download: "Download %{changeset_xml_link} or %{osmchange_xml_link}" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" feed: @@ -168,15 +167,14 @@ en: node_history: node_history: "Node History" node_history_title: "Node History: %{node_name}" - download: "%{download_xml_link} or %{view_details_link}" download_xml: "Download XML" - view_details: "view details" + view_details: "View details" node: node: "Node" node_title: "Node: %{node_name}" download_xml: "Download XML" - view_history: "view history" - edit: "edit" + view_history: "View history" + edit: "Edit node" not_found: sorry: "Sorry, the %{type} with the id %{id}, could not be found." type: @@ -207,9 +205,8 @@ en: relation_history: relation_history: "Relation History" relation_history_title: "Relation History: %{relation_name}" - download: "%{download_xml_link} or %{view_details_link}" download_xml: "Download XML" - view_details: "view details" + view_details: "View details" relation_member: entry: "%{type} %{name}" entry_role: "%{type} %{name} as %{role}" @@ -220,9 +217,8 @@ en: relation: relation: "Relation" relation_title: "Relation: %{relation_name}" - download: "%{download_xml_link} or %{view_history_link}" download_xml: "Download XML" - view_history: "view history" + view_history: "View history" start: view_data: "View data for current map view" manually_select: "Manually select a different area" @@ -278,16 +274,14 @@ en: way_history: way_history: "Way History" way_history_title: "Way History: %{way_name}" - download: "%{download_xml_link} or %{view_details_link}" download_xml: "Download XML" - view_details: "view details" + view_details: "View details" way: way: "Way" way_title: "Way: %{way_name}" - download: "%{download_xml_link}, %{view_history_link} or %{edit_link}" download_xml: "Download XML" - view_history: "view history" - edit: "edit" + view_history: "View history" + edit: "Edit way" changeset: changeset_paging_nav: showing_page: "Showing page %{page}"