X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9a3ef885bb72adbde0b968ce67135b8f7b257f35..bb2c0c76ae8b85621c71d2d26e019a1871b39d50:/app/views/browse/_navigation.html.erb?ds=sidebyside diff --git a/app/views/browse/_navigation.html.erb b/app/views/browse/_navigation.html.erb index ed483d8ec..54e792a9f 100644 --- a/app/views/browse/_navigation.html.erb +++ b/app/views/browse/_navigation.html.erb @@ -1,40 +1,42 @@ -
+<% type = (@next || @prev).class.name.downcase %> +<% margin = @next_by_user || @prev_by_user ? 9 : 18 %> +
<% if @next_by_user or @prev_by_user %> <% if @prev_by_user %> - <%= link_to t('browse.changeset_navigation.paging.user.prev', :id => @prev_by_user.id.to_s), + <%= link_to t('browse.navigation.paging.user.prev', :id => @prev_by_user.id.to_s), { :id => @prev_by_user.id }, - { :title => t('browse.changeset_navigation.user.prev_tooltip', :user => @prev_by_user.user.display_name) } %> + { :title => t("browse.navigation.user.prev_#{type}_tooltip", :user => @prev_by_user.user.display_name) } %> | <% end %> <%= user = (@prev_by_user || @next_by_user).user.display_name link_to h(user), { :controller => "changeset", :action => "list", :display_name => user }, - { :title => t('browse.changeset_navigation.user.name_tooltip', :user => h(user)) } + { :title => t("browse.navigation.user.name_#{type}_tooltip", :user => h(user)) } %> <% if @next_by_user %> | - <%= link_to t('browse.changeset_navigation.paging.user.next', :id => @next_by_user.id.to_s), + <%= link_to t('browse.navigation.paging.user.next', :id => @next_by_user.id.to_s), { :id => @next_by_user.id }, - { :title => t('browse.changeset_navigation.user.next_tooltip', :user => @next_by_user.user.display_name) } %> + { :title => t("browse.navigation.user.next_#{type}_tooltip", :user => @next_by_user.user.display_name) } %> <% end %>
<% end %> <% if @prev %> - <%= link_to t('browse.changeset_navigation.paging.all.prev', :id => @prev.id.to_s), + <%= link_to t('browse.navigation.paging.all.prev', :id => @prev.id.to_s), { :id => @prev.id }, - { :title => t('browse.changeset_navigation.all.prev_tooltip') } %> + { :title => t("browse.navigation.all.prev_#{type}_tooltip") } %> <% end %> <% if @prev and @next %> | <% end %> <% if @next %> - <%= link_to t('browse.changeset_navigation.paging.all.next', :id => @next.id.to_s), + <%= link_to t('browse.navigation.paging.all.next', :id => @next.id.to_s), { :id => @next.id }, - { :title => t('browse.changeset_navigation.all.next_tooltip') } %> + { :title => t("browse.navigation.all.next_#{type}_tooltip") } %> <% end %>