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">
|
<div class="container">
|
||||||
|
<%= render partial: 'nav_tabs', locals: { person: @person, tab: :overview } %>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><%= Person.human_attribute_name :first_name %></dt>
|
<dt><%= Person.human_attribute_name :first_name %></dt>
|
||||||
<dd><%= truncate @person.first_name %></dd>
|
<dd><%= truncate @person.first_name %></dd>
|
||||||
|
|
|
@ -3,6 +3,8 @@ en:
|
||||||
passport:
|
passport:
|
||||||
overview: Overview
|
overview: Overview
|
||||||
confirmations: Confirmations
|
confirmations: Confirmations
|
||||||
|
person:
|
||||||
|
overview: Overview
|
||||||
settings:
|
settings:
|
||||||
credentials: Credentials
|
credentials: Credentials
|
||||||
profile: Public profile
|
profile: Public profile
|
||||||
|
|
|
@ -3,6 +3,8 @@ ru:
|
||||||
passport:
|
passport:
|
||||||
overview: Обзор
|
overview: Обзор
|
||||||
confirmations: Подтверждения
|
confirmations: Подтверждения
|
||||||
|
person:
|
||||||
|
overview: Обзор
|
||||||
settings:
|
settings:
|
||||||
credentials: Данные для входа
|
credentials: Данные для входа
|
||||||
profile: Публичный профиль
|
profile: Публичный профиль
|
||||||
|
|
Reference in a new issue