From db9420ba57478114090806f8b92c48f528eae31f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 13 May 2011 10:06:16 +0100 Subject: [PATCH 1/1] Make "all traces" and "your traces" links more consistent Make sure we always show the "all traces" and "your traces" links in the same place and that they don't accidentally inherit parameter values that we don't really want. Based on work by Andrzej Zaborowski . --- app/views/layouts/site.html.erb | 2 +- app/views/trace/list.html.erb | 12 ++++++------ config/locales/en.yml | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index 95289376e..368e3fc20 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -48,7 +48,7 @@ <% else %>
  • <%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %>
  • <% end %> -
  • <%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list', :display_name => nil}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip'), :class => traceclass} %>
  • +
  • <%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip'), :class => traceclass} %>
  • <%= link_to t('layouts.user_diaries'), {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => t('layouts.user_diaries_tooltip'), :class => diaryclass} %>
  • diff --git a/app/views/trace/list.html.erb b/app/views/trace/list.html.erb index 78d203756..31ea0eb3a 100644 --- a/app/views/trace/list.html.erb +++ b/app/views/trace/list.html.erb @@ -6,16 +6,16 @@

    <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %> - <% unless_user(@target_user, :span) do %> - | <%= link_to t('trace.trace_header.your_traces'), :action => 'mine' %> - <% end %> | <%= link_to t('trace.trace_header.upload_trace'), :action => 'create' %> <% if @tag %> + | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %> + | <%= link_to t('trace.trace_header.see_your_traces'), :action => 'mine', :tag => nil, :page => nil %> + <% else %> <% if @display_name %> - | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list' %> + | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %> <% end %> - <% if_user(@target_user, :span) do %> - | <%= link_to t('trace.trace_header.see_your_traces'), :controller => 'trace', :action => 'mine' %> + <% unless_user(@target_user, :span) do %> + | <%= link_to t('trace.trace_header.see_your_traces'), :action => 'mine', :tag => nil, :page => nil %> <% end %> <% end %>

    diff --git a/config/locales/en.yml b/config/locales/en.yml index 352e3d15e..8fb884914 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1380,10 +1380,9 @@ en: help: "Help" help_url: "http://wiki.openstreetmap.org/wiki/Upload" trace_header: - your_traces: "See just your traces" upload_trace: "Upload a trace" see_all_traces: "See all traces" - see_your_traces: "See all your traces" + see_your_traces: "See your traces" traces_waiting: "You have {{count}} traces waiting for upload. Please consider waiting for these to finish before uploading any more, so as not to block the queue for other users." trace_optionals: tags: "Tags" -- 2.43.2