1
0
Fork 0

Add link to staff services

This commit is contained in:
Alex Kotov 2019-03-27 08:23:23 +05:00
parent 528c469606
commit 60caf7e12e
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 17 additions and 0 deletions

View file

@ -6,6 +6,10 @@ module ApplicationHelper
pills: 'nav nav-pills d-flex d-sm-none flex-column',
}.freeze
def staff_controller?
controller_path.start_with?('staff')
end
def bootstrap_class_for_flash(flash_type)
case flash_type
when 'success'

View file

@ -14,6 +14,15 @@
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<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>
</ul>
<ul class="navbar-nav ml-auto mr-3">
<% if current_account %>
<li class="nav-item dropdown">

View file

@ -1,3 +1,5 @@
en:
title: Libertarian party of Russia
staff_services: Staff services
none: None
current: current

View file

@ -1,3 +1,5 @@
ru:
title: Либертарианская партия России
staff_services: Сервисы для сотрудников
none: Нет
current: текущее