Adds missing tab select label

pull/893/head
Hagen Schink 11 years ago
parent 0fcf22e7c1
commit bcae949f1e
  1. 6
      app/views/timelog/_time_entry_tab.html.erb
  2. 10
      app/views/timelog/_time_entry_tabs.html.erb

@ -0,0 +1,6 @@
<li>
<%= link_to(tab_path, :class => (tab_selected ? 'selected' : nil)) do %>
<%= tab_selected ? you_are_here_info : nil %>
<%= tab_title %>
<% end %>
</li>

@ -1,9 +1,11 @@
<div class="tabs">
<% url_params = @free_period ? { :from => @from, :to => @to } : { :period => params[:period] } %>
<ul>
<li><%= link_to(l(:label_details), polymorphic_time_entries_path(@issue || @project),
:class => (request.path == polymorphic_time_entries_path(@issue || @project) ? 'selected' : nil)) %></li>
<li><%= link_to(l(:label_report), polymorphic_time_entries_report_path(@issue || @project),
:class => (request.path == polymorphic_time_entries_report_path(@issue || @project) ? 'selected' : nil)) %></li>
<%= render partial: 'timelog/time_entry_tab', locals: { tab_title: l(:label_details),
tab_path: polymorphic_time_entries_path(@issue || @project),
tab_selected: (request.path == polymorphic_time_entries_path(@issue || @project)) }%>
<%= render partial: 'timelog/time_entry_tab', locals: { tab_title: l(:label_report),
tab_path: polymorphic_time_entries_report_path(@issue || @project),
tab_selected: (request.path != polymorphic_time_entries_path(@issue || @project)) }%>
</ul>
</div>

Loading…
Cancel
Save