Hash :
78dee358
Author :
Thomas de Grivel
Date :
2022-06-18T14:48:16
<%= if @conn.assigns[:current_repository] do %>
<li class="nav-item">
<%= link Repository.full_slug(@repo),
to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo)),
class: "nav-link" %>
</li>
<% end %>
<%= if @conn.assigns[:current_organisation] do %>
<li class="nav-item">
<%= link @current_organisation.name || @current_organisation.slug_,
to: Routes.slug_path(@conn, :show, @current_organisation.slug_),
class: "nav-link" %>
</li>
<% end %>
<li class="nav-item">
<%= link User.login(@current_user), to: Routes.slug_path(@conn, :show, User.login(@current_user)), class: "nav-link" %>
</li>
<%= if @current_user.is_admin do %>
<li class="nav-item">
<%= link gettext("Admin"), to: Routes.admin_dashboard_path(@conn, :index), class: "nav-link" %>
</li>
<% end %>
<li class="nav-item">
<%= link gettext("Logout"), method: :delete, to: Routes.user_session_path(@conn, :delete), class: "nav-link" %>
</li>