1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/application/_navbar.html.erb

36 lines
1.2 KiB
Text

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="<%= root_path %>">
<%= translate :title %>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
</ul>
<% if user_signed_in? %>
<span class="navbar-text mr-2">
<%= current_user.email %>
</span>
<%= link_to translate('users.shared.links.sign_out'),
destroy_user_session_path,
method: :delete,
role: :button,
class: 'btn btn-light' %>
<% else %>
<%= link_to translate('users.shared.links.sign_in'),
new_user_session_path,
role: :button,
class: 'btn btn-light mr-2' %>
<%= link_to translate('users.shared.links.sign_up'),
new_user_registration_path,
role: :button,
class: 'btn btn-primary' %>
<% end %>
</div>
</nav>