clarion/app/views/layouts/_nav.html.erb

31 lines
1.1 KiB
Plaintext

<nav class="menu">
<ul class="sf-menu sf-js-enabled">
<%= content_tag :li, class: [('current_page_item' if controller_name == 'home')] do %>
<%= link_to t(:home), root_path %>
<% end %>
<% unless user_signed_in? %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'sessions')] do %>
<%= link_to t(:login), new_user_session_path %>
<% end %>
<% else %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'lectures')] do %>
<%= link_to t(:talks), lectures_path %>
<% end %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'workshops')] do %>
<%= link_to t(:workshops), workshops_path %>
<% end %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'registrations')] do %>
<%= link_to t(:edit_speaker_profile), edit_user_registration_path %>
<% end %>
<li>
<%= link_to t(:logout), destroy_user_session_path, method: :delete %>
</li>
<% end %>
<li>
<a href="#">English</a>
</li>
</ul>
</nav>