<ul class="sidebar-branch">
  <% if params[:view_mode] == 'archived' %>
    <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="sn-icon sn-icon-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="sn-icon sn-icon-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>
