This cuts down on the complexity of having to use the `cycle` function and makes the templates easier to read. CSS-based striping has been around for many years. The CSS is in order to keep our custom colour for striped tables.
43 lines
1.5 KiB
Text
43 lines
1.5 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" class="table table-borderless table-striped">
|
|
<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 %>
|