Codeminer42/cm42-central

View on GitHub
app/views/projects/_navbar.html.erb

Summary

Maintainability
Test Coverage
<div class="menu">
  <ul class="nav nav-pills">
    <li role="presentation" class="nav-item <%= active_class(project_path(project)) %>">
      <%= link_to Story.model_name.human(count: 2), project_path(project), class: 'nav-link' %>
    </li>
    <li role="presentation" class="nav-item <%= active_class(project_users_path(project)) %>">
      <%= link_to User.model_name.human(count: 2), project_users_path(project), class: 'nav-link', data: {step: "members"} %>
    </li>
    <li role="presentation" class="nav-item <%= active_class(reports_project_path(project)) %>">
      <%= link_to t('reports'), reports_project_path(project, since: 3), class: 'nav-link' %>
    </li>
    <li role="presentation" class="nav-item">
      <%= link_to t('export'), project_stories_path(project, format: :csv), class: 'nav-link' %>
    </li>
    <% if policy(project).manage? %>
      <li role="presentation" class="nav-item <%= settings_active_class %>">
        <%= link_to t('settings'), edit_project_path(project), class: 'nav-link' %>
      </li>
    <% end %>
  </ul>
</div>