]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/trace/_trace_header.html.erb
Convert trace views to use CSS based user specific components
[rails.git] / app / views / trace / _trace_header.html.erb
index 5be7269c2e0691d392e28c1ac355ff0f15cb7fca..37b944fd49cbfe0bf1a74300d1b65587c902a567 100644 (file)
@@ -6,17 +6,15 @@
 
 <p>
   <%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
-  <% if @user.nil? or @display_name.nil? or @user.display_name != @display_name %>
+  <% unless_user(@target_user, :span) do %>
     | <%= link_to t('trace.trace_header.see_just_your_traces'), :action => 'mine' %>
   <% end %>
-  <% if @tag or @display_name %>
-    | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list' %>
-  <% end %>
-  <% if @tag and @user and @user.display_name == @display_name %>
-    | <%= link_to t('trace.trace_header.see_your_traces'), :controller => 'trace', :action => 'mine' %>
+  <% if @tag %>
+    <% if @display_name %>
+      | <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list' %>
+    <% end %>
+    <% if_user(@target_user, :span) do %>
+      | <%= link_to t('trace.trace_header.see_your_traces'), :controller => 'trace', :action => 'mine' %>
+    <% end %>
   <% end %>
 </p>
-
-<% if @user and @user.traces.count(:conditions => ["inserted=?", false]) > 4 %>
-  <p><%= t'trace.trace_header.traces_waiting', :count => @user.traces.count(:conditions => ["inserted=?", false]) %></p>
-<% end %>