1
0
Fork 0

Display staff services link conditionally

This commit is contained in:
Alex Kotov 2019-03-27 10:42:29 +05:00
parent 0e97d7ab23
commit 932367be24
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -15,12 +15,14 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<% if policy([:staff, :home]).show? %>
<li class="nav-item <%= :active if staff_controller? %>">
<%= link_to staff_root_path, class: 'nav-link' do %>
<%= translate :staff_services %>
<span class="sr-only">(<%= translate :current %>)</span>
<% end %>
</li>
<% end %>
</ul>
<ul class="navbar-nav ml-auto mr-3">