photomix/app/views/shared/_user_links.html.erb
Alexander Negoda 954e3b68ae upd
2012-07-29 02:33:03 +04:00

20 lines
755 B
Plaintext

<% if current_user %>
<ul class="nav pull-left">
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#"><%= t(:actions) %> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><%= link_to current_user.email, account_path %></li>
<li><%= link_to 'Logout', logout_path %></li>
<li class="divider"></li>
<li><%= link_to t("activerecord.actions.create", :model => I18n.t('activerecord.models.collection.single')), new_collection_path %></li>
<%= yield :action_links %>
</ul>
</li>
</ul>
<% else %>
<ul class="nav pull-right">
<li><%= link_to t(:login), login_path %></li>
<%= yield :action_links %>
</ul>
<% end %>