mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 00:36:42 +01:00
33 lines
1.5 KiB
Plaintext
33 lines
1.5 KiB
Plaintext
<%= navbar position: :static do %>
|
|
<%= vertical do %>
|
|
<%= link_to t('application.site_title'), root_path %>
|
|
<% end %>
|
|
<%= horizontal do %>
|
|
<%= nav class: 'navbar-left' do %>
|
|
<%= link_to t('application.info'), about_info_path %>
|
|
<%= link_to Problem.model_name.human(count: 2), problems_path %>
|
|
<% if user_signed_in? and current_user.admin? %>
|
|
<%= link_to t('admin.dashboard.index.administration'), admin_dashboard_index_path %>
|
|
<%= link_to admin_translations_path do %>
|
|
<%= t('admin.dashboard.index.translations') %> <span class="badge"><%= Translation.pending.count %></span>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
<%= nav class: 'navbar-right' do %>
|
|
<% if user_signed_in? %>
|
|
<span class="navbar-text"><%= t 'application.logged_in_as_html', name: current_user.name %>
|
|
<% if current_user.admin? %>
|
|
<b><%= icon :star %></b>
|
|
<% end %>
|
|
</span>
|
|
<%= link_to(t('application.sign_out'), destroy_user_session_path, method: :delete) %>
|
|
<% else %>
|
|
<% if Rails.env.development? %>
|
|
<%= link_to(t('application.sign_in_with_github'), user_developer_omniauth_authorize_path) %>
|
|
<% else %>
|
|
<%= link_to(t('application.sign_in_with_github'), user_github_omniauth_authorize_path) %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %> |