scinote-web/app/views/shared/sidebar/_templates_sidebar.html.erb
2023-03-03 14:32:08 +01:00

30 lines
1.2 KiB
Text

<ul class="sidebar-branch">
<% if templates_view_mode_archived?(type: @type, protocol: @protocol) %>
<li class="sidebar-leaf">
<%= link_to protocols_path, class: "sidebar-link back-button" do %>
<%= t("protocols.index.back_to_active_protocols") %>
<% end %>
</li>
<% else %>
<li class="sidebar-leaf">
<i class="fas fa-caret-right toggle-branch collapsed"></i>
<%= link_to t('sidebar.templates.protocol_templates'),
protocols_path,
class: "sidebar-link #{'selected' if active == :protocol && params[:type] != 'archived'}" %>
<ul class="sidebar-branch">
<li class="sidebar-leaf">
<%= link_to protocols_path(type: :archived), class: "sidebar-link #{'selected' if active == :protocol && params[:type] == 'archived'}" do %>
<i class="fas fa-archive"></i>
<%= t("protocols.index.navigation.archive") %>
<% end %>
</ul>
</li>
<% if can_view_label_templates?(current_team) %>
<li class="sidebar-leaf">
<%= link_to t('sidebar.templates.label_templates'),
label_templates_path,
class: "sidebar-link #{'selected' if active == :label}" %>
</li>
<% end %>
<% end %>
</ul>