<% #-- # Copyright (C) 2010 Juho Nieminen # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #++ %> <%- if logged_in? -%> <% if current_user.site_admin? -%>
  • <%= link_to t("views.layout.admin"), admin_users_path -%>
  • <% end -%>
  • <% if current_user.fullname.blank? -%> <%= link_to h(current_user.to_param_with_prefix), dashboard_path -%> <% else -%> <%= link_to h(current_user.fullname), dashboard_path -%> <% end -%>
  • <%= link_to "Home", dashboard_path -%>
  • <%=link_to "Profile", user_path(current_user) -%> <% # link_to h(current_user.to_param_with_prefix), user_path(current_user) -%>
  • <% if current_user.received_messages.unread_count > 0 -%> <%= link_to current_user.received_messages.unread_count, messages_path -%> <% else -%> <%= link_to "#{current_user.received_messages.unread_count}", messages_path -%> <% end -%>
  • <%= link_to t("views.layout.logout"), logout_path -%>
  • <%- else -%>
  • <%= link_to t("views.layout.login"), login_path -%>
  • <%- end -%>