1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2026-01-27 10:38:50 +01:00

Show translation diff for admins

This commit is contained in:
2019-10-26 15:06:34 +02:00
parent 763a7700ed
commit da0e80e9e0
10 changed files with 77 additions and 29 deletions

View File

@@ -15,18 +15,17 @@
<% end %>
<%= nav class: 'navbar-right' do %>
<% if user_signed_in? %>
<span class="navbar-text">Eingeloggt als <b>
<%= current_user.name %>
<span class="navbar-text"><%= t 'application.logged_in_as_html', name: current_user.name %>
<% if current_user.admin? %>
<%= icon :star %>
<b><%= icon :star %></b>
<% end %>
</b></span>
</span>
<%= link_to(t('application.sign_out'), destroy_user_session_path, method: :delete) %>
<% else %>
<% if Rails.env.development? %>
<%= link_to(t('application.sign_in'), user_developer_omniauth_authorize_path) %>
<%= link_to(t('application.sign_in_with_github'), user_developer_omniauth_authorize_path) %>
<% else %>
<%= link_to(t('application.sign_in'), user_github_omniauth_authorize_path) %>
<%= link_to(t('application.sign_in_with_github'), user_github_omniauth_authorize_path) %>
<% end %>
<% end %>
<% end %>