]> git.openstreetmap.org Git - rails.git/commitdiff
Make "all traces" and "your traces" links more consistent
authorTom Hughes <tom@compton.nu>
Fri, 13 May 2011 09:06:16 +0000 (10:06 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 13 May 2011 09:06:16 +0000 (10:06 +0100)
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 <balrog@zabor.org>.

app/views/layouts/site.html.erb
app/views/trace/list.html.erb
config/locales/en.yml

index 95289376e2d180898c257358a291bbda5bdf3135..368e3fc20648953323c491520ff88ed0fcde12a1 100644 (file)
@@ -48,7 +48,7 @@
         <% else %>
         <li><%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %></li>
         <% end %>
         <% else %>
         <li><%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %></li>
         <% end %>
-        <li><%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list', :display_name => nil}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip'), :class => traceclass} %></li>
+        <li><%= 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} %></li>
         <li><%= link_to t('layouts.user_diaries'), {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => t('layouts.user_diaries_tooltip'), :class => diaryclass} %></li>
       </ul>
     </div>
         <li><%= link_to t('layouts.user_diaries'), {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => t('layouts.user_diaries_tooltip'), :class => diaryclass} %></li>
       </ul>
     </div>
index 78d2037564d8b1bfbb914867256570c18756464d..31ea0eb3ae100d49302ceafa93f5a3da935d3d1b 100644 (file)
@@ -6,16 +6,16 @@
 
 <p>
   <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
 
 <p>
   <%= 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.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 %>
     <% 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 %>
     <% 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 %>
 </p>
     <% end %>
   <% end %>
 </p>
index 352e3d15e7fa86f41df1c74a622add3035aa33be..8fb88491425f07f4cf00822c69c41434b891cd62 100644 (file)
@@ -1380,10 +1380,9 @@ en:
       help: "Help"
       help_url: "http://wiki.openstreetmap.org/wiki/Upload"
     trace_header:
       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"
       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"
       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"