Add navigation tabs
This commit is contained in:
parent
3e3caa68ce
commit
bacbfa0450
4 changed files with 23 additions and 0 deletions
17
app/views/staff/people/_nav_tabs.html.erb
Normal file
17
app/views/staff/people/_nav_tabs.html.erb
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="mb-3">
|
||||
<ul class="nav nav-tabs d-none d-sm-flex">
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:overview, scope: %i[nav_tabs person]),
|
||||
[:staff, person],
|
||||
class: "nav-link #{:active if tab == :overview}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav flex-column nav-polls d-flex d-sm-none">
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:overview, scope: %i[nav_tabs person]),
|
||||
[:staff, person],
|
||||
class: "nav-link #{:active if tab == :overview}" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,4 +1,6 @@
|
|||
<div class="container">
|
||||
<%= render partial: 'nav_tabs', locals: { person: @person, tab: :overview } %>
|
||||
|
||||
<dl>
|
||||
<dt><%= Person.human_attribute_name :first_name %></dt>
|
||||
<dd><%= truncate @person.first_name %></dd>
|
||||
|
|
|
@ -3,6 +3,8 @@ en:
|
|||
passport:
|
||||
overview: Overview
|
||||
confirmations: Confirmations
|
||||
person:
|
||||
overview: Overview
|
||||
settings:
|
||||
credentials: Credentials
|
||||
profile: Public profile
|
||||
|
|
|
@ -3,6 +3,8 @@ ru:
|
|||
passport:
|
||||
overview: Обзор
|
||||
confirmations: Подтверждения
|
||||
person:
|
||||
overview: Обзор
|
||||
settings:
|
||||
credentials: Данные для входа
|
||||
profile: Публичный профиль
|
||||
|
|
Reference in a new issue