<commit_before><% content_for :secondary_navigation do %>
<nav class="navbar navbar-default navbar-secondary">
  <div class="container-fluid">

    <div class="navbar-header">
      <!-- Small devices dropdown button -->
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#secondary-menu" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>

      <!-- Breadcrumbs, displayed on small screens -->
      <ul class="breadcrumb hidden-sm hidden-md hidden-lg">
        <li>
          <% if can_view_projects(@project.team) %>
            <a href="<%= projects_path :team => @project.team.id %>">
          <% end %>
          <span class="glyphicon glyphicon-folder-open"></span>
          <% if can_view_projects(@project.team) %>
            </a>
          <% end %>
        </li>
        <% if project_page? ||
              sample_types_page_project? ||
              sample_groups_page_project? %>
          <li class="active">
            <span class="glyphicon glyphicon-blackboard"></span>
          </li>
        <% else %>
          <li>
           <% if can_view_project(@project) %>
              <a href="<%= project_url(@project) %>">
            <% end %>
            <span class="glyphicon glyphicon-blackboard"></span>
            <% if can_view_project(@project) %>
              </a>
            <% end %>
          </li>
        <% end %>
        <% if experiment_page? ||
              module_page? %>
          <% if !module_page? %>
            <li class="active">
              <%= fa_icon 'fa-flask' %>
            </li>
          <% else %>
            <li>
              <% if can_view_experiment(@experiment) %>
                <%= link_to canvas_experiment_path(@experiment) do %>
                  <%= fa_icon 'fa-flask' %>
                <% end %>
              <% else %>
                <%= fa_icon 'fa-flask' %>
              <% end %>
            </li>
          <% end %>
        <% end %>
        <% if module_page? %>
          <li class="active">
            <span class="glyphicon glyphicon-credit-card"></span>
          </li>
        <% end %>
      </ul>
    </div>

    <!-- buttons -->
    <div class="collapse navbar-collapse" id="secondary-menu">

      <!-- True secondary navigation (buttons on the right side) -->
      <ul class="nav navbar-nav navbar-right" style="vertical-align: bottom">
        <% if project_page? ||
              sample_types_page_project? ||
              sample_groups_page_project? %>
          <% if can_view_project(@project) then %>
            <li id="canvas-nav-tab" class="<%= "active" if is_project_show? %>">
              <a href="<%= project_url(@project) %>" title="<%=t "nav2.projects.show" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.show" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-blackboard"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_project_samples(@project) then %>
            <li id="project-samples-nav-tab" class="<%= "active" if is_project_samples? ||
                                                                    sample_types_page_project? ||
                                                                    sample_groups_page_project? %>">
              <a href="<%= samples_project_url(@project) %>" title="<%=t "nav2.projects.samples" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.samples" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-tint"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_reports(@project) then %>
            <li id="reports-nav-tab" class="<%= "active" if is_project_reports? %>">
              <a href="<%= project_reports_url(@project) %>" title="<%=t "nav2.projects.reports" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.reports" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-list-alt"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_project_archive(@project) then %>
            <li id="project-archive-nav-tab" class="<%= "active" if is_project_archive? %>">
              <a href="<%= experiment_archive_project_url(@project) %>" title="<%=t "nav2.projects.archive" %>">
                <span class="glyphicon glyphicon-briefcase"></span>
              </a>
            </li>
          <% end %>

        <% elsif experiment_page? ||
                 sample_groups_page_experiment? ||
                 sample_types_page_expermient? %>
          <% if can_view_experiment(@experiment) then %>
              <li id="canvas-nav-tab" class="<%= "active" if is_experiment_canvas? %>">
                <a href="<%= canvas_experiment_url(@experiment) %>" title="<%=t "nav2.experiments.canvas" %>">
                  <span class="hidden-sm hidden-md"><%=t "nav2.experiments.canvas" %></span>
                  <span class="hidden-xs hidden-lg glyphicon glyphicon-blackboard"></span>
                </a>
              </li>
          <% end %>
          <% if can_view_experiment_samples(@experiment) then %>
            <li id="experiment-samples-nav-tab" class="<%= "active" if is_experiment_samples? ||
                                                                       sample_groups_page_experiment? ||
                                                                       sample_types_page_expermient? %>">
              <a href="<%= samples_experiment_url(@experiment) %>" title="<%=t "nav2.projects.samples" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.samples" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-tint"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_reports(@experiment.project) then %>
              <li id="reports-nav-tab" class="<%= "active" if is_project_reports? %>">
                <a href="<%= project_reports_url(@experiment.project) %>" title="<%=t "nav2.projects.reports" %>">
                  <span class="hidden-sm hidden-md"><%=t "nav2.projects.reports" %></span>
                  <span class="hidden-xs hidden-lg glyphicon glyphicon-list-alt"></span>
                </a>
              </li>
          <% end %>
          <% if can_view_experiment_archive(@experiment) then %>
              <li id="project-archive-nav-tab" class="<%= "active" if is_experiment_archive? %>">
                <a href="<%= module_archive_experiment_url(@experiment) %>" title="<%=t "nav2.projects.archive" %>">
                  <span class="glyphicon glyphicon-briefcase"></span>
                </a>
              </li>
          <% end %>

        <% elsif module_page? ||
                 sample_types_page_my_module? ||
                 sample_groups_page_my_module? %>
          <% if can_view_module_protocols(@my_module) then %>
            <li id="steps-nav-tab" class="<%= "active" if is_module_protocols? %>">
              <a href="<%= protocols_my_module_url(@my_module) %>" title="<%=t "nav2.modules.steps" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.steps" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-circle-arrow-right"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_results_in_module(@my_module) then %>
            <li id="results-nav-tab" class="<%= "active" if is_module_results? %>">
              <a href="<%= results_my_module_url(@my_module) %>" title="<%=t "nav2.modules.results" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.results" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-th"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_module_activities(@my_module) then %>
            <li id="activities-nav-tab" class="<%= "active" if is_module_activities? %>">
              <a href="<%= activities_my_module_url(@my_module) %>" title="<%=t "nav2.modules.activities" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.activities" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-equalizer"></span>
              </a>
            </li>
          <% end %>

          <li data-hook="secondary-navigation-tabs"></li>

          <% if can_view_module_samples(@my_module) then %>
            <li id="module-samples-nav-tab" class="<%= "active" if is_module_samples? ||
                                                                   sample_types_page_my_module? ||
                                                                   sample_groups_page_my_module? %>">
              <a href="<%= samples_my_module_url(@my_module) %>" title="<%=t "nav2.modules.samples" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.samples" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-tint"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_reports(@my_module.experiment.project) then %>
            <li id="reports-nav-tab" >
              <a href="<%= project_reports_url(@my_module.experiment.project) %>" title="<%=t "nav2.projects.reports" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.reports" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-list-alt"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_team_repositories(@my_module.experiment.project.team) &&
                @my_module.experiment.project.team.repositories.exists? %>
            <li id="repositories-nav-tab" class="<%= "active" if module_repository_page? %>">
              <a href="#" id="repositoriesDropdownMenuLink" title="<%=t "nav2.modules.repositories" %>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.repositories" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-list"></span>
                <span class="caret"></span>
              </a>
              <ul class="dropdown-menu repositories-dropdown-menu" aria-labelledby="repositoriesDropdownMenuLink">
                <% @my_module.experiment.project.team.repositories.order(created_at: :asc).each do |repository| %>
                  <li>
                    <a class="dropdown-item" href="<%= repository_my_module_url(repository_id: repository) %>" title="<%= repository.name %>">
                      <%= truncate(repository.name) %>
                    </a>
                  </li>
                  <% unless @my_module.experiment.project.team.repositories.last == repository %>
                    <li class="divider"></li>
                  <% end %>
                <% end %>
              </ul><commit_msg>Fixed sample types page load error, when viewing them on a task level. [SCI-1419]<commit_after><% content_for :secondary_navigation do %>
<nav class="navbar navbar-default navbar-secondary">
  <div class="container-fluid">

    <div class="navbar-header">
      <!-- Small devices dropdown button -->
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#secondary-menu" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>

      <!-- Breadcrumbs, displayed on small screens -->
      <ul class="breadcrumb hidden-sm hidden-md hidden-lg">
        <li>
          <% if can_view_projects(@project.team) %>
            <a href="<%= projects_path :team => @project.team.id %>">
          <% end %>
          <span class="glyphicon glyphicon-folder-open"></span>
          <% if can_view_projects(@project.team) %>
            </a>
          <% end %>
        </li>
        <% if project_page? ||
              sample_types_page_project? ||
              sample_groups_page_project? %>
          <li class="active">
            <span class="glyphicon glyphicon-blackboard"></span>
          </li>
        <% else %>
          <li>
           <% if can_view_project(@project) %>
              <a href="<%= project_url(@project) %>">
            <% end %>
            <span class="glyphicon glyphicon-blackboard"></span>
            <% if can_view_project(@project) %>
              </a>
            <% end %>
          </li>
        <% end %>
        <% if experiment_page? ||
              module_page? %>
          <% if !module_page? %>
            <li class="active">
              <%= fa_icon 'fa-flask' %>
            </li>
          <% else %>
            <li>
              <% if can_view_experiment(@experiment) %>
                <%= link_to canvas_experiment_path(@experiment) do %>
                  <%= fa_icon 'fa-flask' %>
                <% end %>
              <% else %>
                <%= fa_icon 'fa-flask' %>
              <% end %>
            </li>
          <% end %>
        <% end %>
        <% if module_page? %>
          <li class="active">
            <span class="glyphicon glyphicon-credit-card"></span>
          </li>
        <% end %>
      </ul>
    </div>

    <!-- buttons -->
    <div class="collapse navbar-collapse" id="secondary-menu">

      <!-- True secondary navigation (buttons on the right side) -->
      <ul class="nav navbar-nav navbar-right" style="vertical-align: bottom">
        <% if project_page? ||
              sample_types_page_project? ||
              sample_groups_page_project? %>
          <% if can_view_project(@project) then %>
            <li id="canvas-nav-tab" class="<%= "active" if is_project_show? %>">
              <a href="<%= project_url(@project) %>" title="<%=t "nav2.projects.show" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.show" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-blackboard"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_project_samples(@project) then %>
            <li id="project-samples-nav-tab" class="<%= "active" if is_project_samples? ||
                                                                    sample_types_page_project? ||
                                                                    sample_groups_page_project? %>">
              <a href="<%= samples_project_url(@project) %>" title="<%=t "nav2.projects.samples" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.samples" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-tint"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_reports(@project) then %>
            <li id="reports-nav-tab" class="<%= "active" if is_project_reports? %>">
              <a href="<%= project_reports_url(@project) %>" title="<%=t "nav2.projects.reports" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.reports" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-list-alt"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_project_archive(@project) then %>
            <li id="project-archive-nav-tab" class="<%= "active" if is_project_archive? %>">
              <a href="<%= experiment_archive_project_url(@project) %>" title="<%=t "nav2.projects.archive" %>">
                <span class="glyphicon glyphicon-briefcase"></span>
              </a>
            </li>
          <% end %>

        <% elsif experiment_page? ||
                 sample_groups_page_experiment? ||
                 sample_types_page_expermient? %>
          <% if can_view_experiment(@experiment) then %>
              <li id="canvas-nav-tab" class="<%= "active" if is_experiment_canvas? %>">
                <a href="<%= canvas_experiment_url(@experiment) %>" title="<%=t "nav2.experiments.canvas" %>">
                  <span class="hidden-sm hidden-md"><%=t "nav2.experiments.canvas" %></span>
                  <span class="hidden-xs hidden-lg glyphicon glyphicon-blackboard"></span>
                </a>
              </li>
          <% end %>
          <% if can_view_experiment_samples(@experiment) then %>
            <li id="experiment-samples-nav-tab" class="<%= "active" if is_experiment_samples? ||
                                                                       sample_groups_page_experiment? ||
                                                                       sample_types_page_expermient? %>">
              <a href="<%= samples_experiment_url(@experiment) %>" title="<%=t "nav2.projects.samples" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.samples" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-tint"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_reports(@experiment.project) then %>
              <li id="reports-nav-tab" class="<%= "active" if is_project_reports? %>">
                <a href="<%= project_reports_url(@experiment.project) %>" title="<%=t "nav2.projects.reports" %>">
                  <span class="hidden-sm hidden-md"><%=t "nav2.projects.reports" %></span>
                  <span class="hidden-xs hidden-lg glyphicon glyphicon-list-alt"></span>
                </a>
              </li>
          <% end %>
          <% if can_view_experiment_archive(@experiment) then %>
              <li id="project-archive-nav-tab" class="<%= "active" if is_experiment_archive? %>">
                <a href="<%= module_archive_experiment_url(@experiment) %>" title="<%=t "nav2.projects.archive" %>">
                  <span class="glyphicon glyphicon-briefcase"></span>
                </a>
              </li>
          <% end %>

        <% elsif module_page? ||
                 sample_types_page_my_module? ||
                 sample_groups_page_my_module? %>
          <% if can_view_module_protocols(@my_module) then %>
            <li id="steps-nav-tab" class="<%= "active" if is_module_protocols? %>">
              <a href="<%= protocols_my_module_url(@my_module) %>" title="<%=t "nav2.modules.steps" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.steps" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-circle-arrow-right"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_results_in_module(@my_module) then %>
            <li id="results-nav-tab" class="<%= "active" if is_module_results? %>">
              <a href="<%= results_my_module_url(@my_module) %>" title="<%=t "nav2.modules.results" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.results" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-th"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_module_activities(@my_module) then %>
            <li id="activities-nav-tab" class="<%= "active" if is_module_activities? %>">
              <a href="<%= activities_my_module_url(@my_module) %>" title="<%=t "nav2.modules.activities" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.activities" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-equalizer"></span>
              </a>
            </li>
          <% end %>

          <li data-hook="secondary-navigation-tabs"></li>

          <% if can_view_module_samples(@my_module) then %>
            <li id="module-samples-nav-tab" class="<%= "active" if is_module_samples? ||
                                                                   sample_types_page_my_module? ||
                                                                   sample_groups_page_my_module? %>">
              <a href="<%= samples_my_module_url(@my_module) %>" title="<%=t "nav2.modules.samples" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.samples" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-tint"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_reports(@my_module.experiment.project) then %>
            <li id="reports-nav-tab" >
              <a href="<%= project_reports_url(@my_module.experiment.project) %>" title="<%=t "nav2.projects.reports" %>">
                <span class="hidden-sm hidden-md"><%=t "nav2.projects.reports" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-list-alt"></span>
              </a>
            </li>
          <% end %>
          <% if can_view_team_repositories(@my_module.experiment.project.team) &&
                @my_module.experiment.project.team.repositories.exists? %>
            <li id="repositories-nav-tab" class="<%= "active" if module_repository_page? %>">
              <a href="#" id="repositoriesDropdownMenuLink" title="<%=t "nav2.modules.repositories" %>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="hidden-sm hidden-md"><%=t "nav2.modules.repositories" %></span>
                <span class="hidden-xs hidden-lg glyphicon glyphicon-list"></span>
                <span class="caret"></span>
              </a>
              <ul class="dropdown-menu repositories-dropdown-menu" aria-labelledby="repositoriesDropdownMenuLink">
                <% @my_module.experiment.project.team.repositories.order(created_at: :asc).each do |repository| %>
                  <li>
                    <a class="dropdown-item" href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>" title="<%= repository.name %>">
                      <%= truncate(repository.name) %>
                    </a>
                  </li>
                  <% unless @my_module.experiment.project.team.repositories.last == repository %>
                    <li class="divider"></li>
                  <% end %>
                <% end %>
              </ul>
{'fraction_non_alphanumeric': 0.16393589399230013, 'fraction_numerical': 0.0025069388485988004, 'mean_word_length': 1.8184456220035328, 'pattern_counts': {'":': 0, '<': 569, '<?xml version=': 0, '>': 571, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5443119', 'n_tokens_mistral': 6867, 'n_tokens_neox': 6200, 'n_words': 1122}