Update settings navigation [SCI-5316] (#3028)

This commit is contained in:
aignatov-bio 2021-01-05 09:11:05 +01:00 committed by GitHub
parent 163a2d1e60
commit 2fe55250b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 68 deletions

View file

@ -101,6 +101,12 @@
padding-left: 2.5em;
}
.delimiter {
background: $color-alto;
height: 1px;
margin: .5em 2.5em .5em 0;
}
.sidebar-leaf {
align-items: center;
display: flex;

View file

@ -5,7 +5,7 @@
&.flexible {
margin: 0;
padding: 0 .5em;
padding: 0 1em;
}
.content-header {

View file

@ -1,69 +1,36 @@
<%= content_for :sidebar_title, t('sidebar.settings.sidebar_title') %>
<%= content_for :sidebar do %>
<div id="slide-panel" class="visible">
<div class="tree">
<ul id="settings" class="sidebar-root" data-hook="user-settings-navigation-html">
<!-- Account -->
<li class="parent_li branch" >
<span class="tree-link line-wrap no-indent">
<i title="<%= t('sidebar.branch_expand') %>"
class="fas fa-caret-right tree-toggle"
aria-hidden="true"
></i>
<%= link_to t("users.settings.sidebar.account"),
edit_user_registration_path,
class: "line-wrap",
style: (on_settings_account_page? ? 'font-weight: bold' : ''),
data: { 'no-turbolink' => 'true' } %>
</span>
<ul class="tree-child hidden accountNavigation" data-active="<%= on_settings_account_page? %>" data-hook="user-settings-account-navigation-html">
<li class="leaf <%= 'active' if on_settings_account_profile_page? %>" >
<span class="tree-link first-indent">
<%= link_to t("users.settings.sidebar.account_nav.profile"),
edit_user_registration_path,
class: "line-wrap #{'disabled' if on_settings_account_profile_page?}",
data: { 'no-turbolink' => 'true' } %>
</span>
</li>
<li class="leaf <%= 'active' if on_settings_account_preferences_page? %>" >
<span class="tree-link first-indent">
<%= link_to t("users.settings.sidebar.account_nav.preferences"),
preferences_path,
class: "line-wrap #{'disabled' if on_settings_account_preferences_page?}",
data: { 'no-turbolink' => 'true' } %>
</span>
</li>
<li class="leaf <%= 'active' if on_settings_account_addons_page? %>" >
<span class="tree-link first-indent">
<%= link_to t("users.settings.sidebar.account_nav.addons"),
addons_path,
class: "line-wrap #{'disabled' if on_settings_account_addons_page?}",
data: { 'no-turbolink' => 'true' } %>
</span>
</li>
<!-- Connected accounts -->
<li class="leaf <%= 'active' if on_settings_account_connected_accounts_page? %>" >
<span class="tree-link first-indent">
<%= link_to t("users.settings.sidebar.account_nav.connected_accounts"),
connected_accounts_path,
class: "line-wrap #{'disabled' if on_settings_account_connected_accounts_page?}",
data: { 'no-turbolink' => 'true' } %>
</span>
</li>
</ul>
</li>
<!-- Teams -->
<li class="branch <%= 'active' if on_settings_team_page? %>" >
<span class="tree-link no-indent">
<%= link_to t("users.settings.sidebar.teams"),
teams_path,
class: "line-wrap #{'all-teams-navigation-link' if on_settings_team_page?}",
data: { 'no-turbolink' => 'true' } %>
</span>
</li>
</ul>
</div>
</div>
<ul class="sidebar-branch" data-hook="user-settings-navigation-html">
<li class="sidebar-leaf" >
<%= link_to t("users.settings.sidebar.account_nav.profile"),
edit_user_registration_path,
class: "sidebar-link #{'selected' if on_settings_account_profile_page?}"
%>
</li>
<li class="sidebar-leaf" >
<%= link_to t("users.settings.sidebar.account_nav.preferences"),
preferences_path,
class: "sidebar-link #{'selected' if on_settings_account_preferences_page?}"
%>
</li>
<li class="sidebar-leaf" >
<%= link_to t("users.settings.sidebar.account_nav.addons"),
addons_path,
class: "sidebar-link #{'selected' if on_settings_account_addons_page?}"
%>
</li>
<li class="sidebar-leaf" >
<%= link_to t("users.settings.sidebar.account_nav.connected_accounts"),
connected_accounts_path,
class: "sidebar-link #{'selected' if on_settings_account_connected_accounts_page?}"
%>
</li>
<li class="delimiter"></li>
<li class="sidebar-leaf" >
<%= link_to t("users.settings.sidebar.teams"),
teams_path,
class: "sidebar-link #{'selected' if on_settings_team_page?}"
%>
</li>
</ul>
<% end %>

View file

@ -208,6 +208,8 @@ en:
branch_expand: "Expand this branch"
branch_collapse: "Collapse this branch"
no_module_group: "No workflow"
settings:
sidebar_title: "SETTINGS"
experiments:
sidebar_title: "EXPERIMENTS"
back_button: "Back to projects"