JordanHatch/maslow-redux

View on GitHub
app/views/layouts/_default_navigation.html.erb

Summary

Maintainability
Test Coverage
<ul class="navigation-list">
  <%= nav_link_to 'All needs', needs_path, icon: 'th-list' %>
  <%= nav_link_to 'Bookmarked needs', bookmarks_path, icon: 'star' %>

  <% if current_user.can?(:create, Need) %>
    <%= nav_link_to 'Add user need', new_need_path, icon: 'plus' %>
  <% end %>
</ul>

<% if tag_types_with_index_pages.any? %>
<h3>Collections</h3>
<ul class="navigation-list">
  <% tag_types_with_index_pages.each do |tag_type| %>
    <%= nav_link_to tag_type.name, tag_type_path(tag_type.identifier), icon: 'tags', match_prefix: true %>
  <% end %>
</ul>
<% end %>

<% if current_user.can?(:manage, :settings) %>
  <ul class="navigation-list">
    <%= nav_link_to 'Project settings', settings_root_path, icon: 'cog' %>
  </ul>
<% end %>