openstreetmap-website/app/views/traces/index.html.erb

45 lines
1.6 KiB
Text

<% content_for :heading do %>
<h1><%= h(@title) %></h1>
<ul class='secondary-actions clearfix'>
<li><%= t(".description") %></li>
<li><%= rss_link_to :action => "georss", :display_name => @display_name, :tag => @tag %></li>
<li><%= link_to t(".upload_trace"), new_trace_path %></li>
<% if @tag %>
<li><%= link_to t(".see_all_traces"), :controller => "traces", :action => "index", :display_name => nil, :tag => nil, :page => nil %></li>
<li><%= link_to t(".see_my_traces"), :action => "mine", :tag => nil, :page => nil %></li>
<% else %>
<% if @display_name %>
<li><%= link_to t(".see_all_traces"), :controller => "traces", :action => "index", :display_name => nil, :tag => nil, :page => nil %></li>
<% end %>
<% if current_user && current_user != @target_user %>
<li><%= link_to t(".see_my_traces"), :action => "mine", :tag => nil, :page => nil %></li>
<% end %>
<% end %>
</ul>
<% end %>
<% content_for :auto_discovery_link_tag do %>
<%= auto_discovery_link_tag :rss, :action => "georss", :display_name => @display_name, :tag => @tag %>
<% end %>
<% if @traces.size > 0 %>
<%= render :partial => "trace_paging_nav" %>
<table id="trace_list" cellpadding="3">
<thead>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<%= render @traces unless @traces.nil? %>
</tbody>
</table>
<%= render :partial => "trace_paging_nav" %>
<% else %>
<h4><%= t ".empty_html", :upload_link => new_trace_path %></h4>
<% end %>
<%= render :partial => "trace_optionals" %>