2018-03-14 21:33:34 +08:00
|
|
|
<div id="left-menu-bar" class="menu-bar">
|
2018-05-27 21:24:49 +08:00
|
|
|
<div class="scroll-wrapper">
|
|
|
|
<ul class="nav">
|
2021-07-23 17:56:28 +08:00
|
|
|
<% if current_user.teams.blank? %>
|
2020-02-13 20:50:29 +08:00
|
|
|
<li class="disabled">
|
|
|
|
<span>
|
|
|
|
<span class="fas fa-thumbtack"></span>
|
|
|
|
<span><%= t('left_menu_bar.dashboard') %></span>
|
|
|
|
</span>
|
|
|
|
</li>
|
2018-12-10 22:42:05 +08:00
|
|
|
<li class="disabled">
|
|
|
|
<span>
|
|
|
|
<span class="fas fa-folder"></span>
|
|
|
|
<span><%= t('left_menu_bar.projects') %></span>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li class="disabled">
|
|
|
|
<span>
|
|
|
|
<span class="fas fa-list-alt" aria-hidden="true"></span>
|
|
|
|
<span><%= t('left_menu_bar.repositories') %></span>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li class="disabled">
|
|
|
|
<span>
|
|
|
|
<span class="fas fa-edit"></span>
|
|
|
|
<span><%= t('left_menu_bar.templates') %></span>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li class="disabled">
|
|
|
|
<span>
|
|
|
|
<span class="fas fa-clipboard-check"></span>
|
|
|
|
<span><%= t('left_menu_bar.reports') %></span>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<% else %>
|
2020-02-13 20:50:29 +08:00
|
|
|
<li class="<%= "active" if dashboard_are_selected? %>">
|
|
|
|
<%= link_to dashboard_path, id: "dashboard-link", title: t('left_menu_bar.dashboard') do %>
|
|
|
|
<span class="fas fa-thumbtack"></span>
|
|
|
|
<span><%= t('left_menu_bar.dashboard') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2018-12-10 22:42:05 +08:00
|
|
|
<li class="<%= "active" if projects_are_selected? %>">
|
|
|
|
<%= link_to projects_path, id: "projects-link", title: t('left_menu_bar.projects') do %>
|
|
|
|
<span class="fas fa-folder"></span>
|
|
|
|
<span><%= t('left_menu_bar.projects') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<li class="<%= "active" if repositories_are_selected? %>">
|
|
|
|
<%= link_to repositories_path, id: "repositories-link", title: t('left_menu_bar.repositories') do %>
|
|
|
|
<span class="fas fa-list-alt" aria-hidden="true"></span>
|
|
|
|
<span><%= t('left_menu_bar.repositories') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<li class="<%= "active" if templates_are_selected? %>">
|
|
|
|
<%= link_to protocols_path, id: "templates-link", title: t('left_menu_bar.templates'),
|
|
|
|
data: { turbolinks: false } do %>
|
|
|
|
<span class="fas fa-edit"></span>
|
|
|
|
<span><%= t('left_menu_bar.templates') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<li class="<%= "active" if reports_are_selected? %>">
|
|
|
|
<%= link_to reports_path, id: "reports-link", title: t('left_menu_bar.reports') do %>
|
|
|
|
<span class="fas fa-clipboard-check"></span>
|
|
|
|
<span><%= t('left_menu_bar.reports') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2018-05-27 21:24:49 +08:00
|
|
|
</ul>
|
|
|
|
<ul class="nav nav-bottom">
|
|
|
|
<li class="<%= "active" if activities_are_selected? %>">
|
2019-03-20 17:33:22 +08:00
|
|
|
<%= link_to global_activities_path, id: "activities-link", title: t('left_menu_bar.activities') do %>
|
2018-05-27 21:24:49 +08:00
|
|
|
<span class="fas fa-list"></span>
|
|
|
|
<span><%= t('left_menu_bar.activities') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2020-03-17 22:44:57 +08:00
|
|
|
<!-- settings -->
|
|
|
|
<li class="<%= "active" if settings_are_selected? %>">
|
|
|
|
<%= link_to edit_user_registration_path, id: "settings-link", title: t('left_menu_bar.settings') do %>
|
|
|
|
<span class="fas fa-cog"></span>
|
|
|
|
<span><%= t('left_menu_bar.settings') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2018-05-27 21:24:49 +08:00
|
|
|
<!-- support -->
|
|
|
|
<li class="dropup">
|
|
|
|
<a href="#"
|
|
|
|
id="support-link"
|
|
|
|
class="dropdown-toggle"
|
|
|
|
title="<%= t('left_menu_bar.support') %>"
|
|
|
|
data-toggle="dropdown"
|
|
|
|
role="button"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false">
|
|
|
|
<span class="fas fa-question-circle"></span>
|
|
|
|
<span><%= t('left_menu_bar.support') %></span>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu" data-hook="support-dropdown">
|
2021-06-08 21:34:19 +08:00
|
|
|
<li>
|
|
|
|
<%= link_to Constants::SUPPORT_URL, target: "_blank", id: "knowledge-center-link" do %>
|
|
|
|
<i class="fas fa-question-circle"></i>
|
|
|
|
<%= t('left_menu_bar.support_links.support') %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2018-05-27 21:24:49 +08:00
|
|
|
<li><%= link_to t('left_menu_bar.support_links.tutorials'),
|
|
|
|
Constants::TUTORIALS_URL,
|
|
|
|
target: "_blank" %></li>
|
2020-03-06 21:36:22 +08:00
|
|
|
<li role="separator" class="divider" data-hook="support-dropdown-separator">
|
|
|
|
<li>
|
|
|
|
<%= link_to '#', class: "about-scinote", data: { toggle: 'modal', target: '#aboutModal' } do %>
|
|
|
|
<span class="core-version"><%= t('left_menu_bar.support_links.core_version', version: Scinote::Application::VERSION ) %></span>
|
|
|
|
<%= t('left_menu_bar.support_links.about') %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2018-05-27 21:24:49 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
2020-03-17 22:44:57 +08:00
|
|
|
<!-- academy -->
|
2019-07-12 17:15:34 +08:00
|
|
|
<li>
|
2019-08-13 20:05:55 +08:00
|
|
|
<%= link_to Constants::ACADEMY_BL_LINK,
|
|
|
|
id: "academy-link",
|
|
|
|
class: "academy-color",
|
2019-07-12 17:15:34 +08:00
|
|
|
title: I18n.t('nav.academy_tooltip'),
|
2019-08-13 20:05:55 +08:00
|
|
|
target: :_blank do
|
2019-07-12 17:15:34 +08:00
|
|
|
%>
|
|
|
|
<span class="fas fa-graduation-cap"></span>
|
|
|
|
<span><%= t('left_menu_bar.academy') %></span>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2018-05-27 21:24:49 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-03-14 21:33:34 +08:00
|
|
|
</div>
|
2018-03-28 20:12:11 +08:00
|
|
|
|
|
|
|
<%= javascript_include_tag("sidebar_toggle") %>
|