1
0
Fork 0

Add navigation tabs

This commit is contained in:
Alex Kotov 2019-03-27 04:48:18 +05:00
parent 3e3caa68ce
commit bacbfa0450
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 23 additions and 0 deletions

View 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>

View file

@ -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>

View file

@ -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

View file

@ -3,6 +3,8 @@ ru:
passport: passport:
overview: Обзор overview: Обзор
confirmations: Подтверждения confirmations: Подтверждения
person:
overview: Обзор
settings: settings:
credentials: Данные для входа credentials: Данные для входа
profile: Публичный профиль profile: Публичный профиль