Sha256: 8a6497fd2a90a6a9071693764e08013267fb355d072b8860bed8006f96a14fc2

Contents?: true

Size: 936 Bytes

Versions: 8

Compression:

Stored size: 936 Bytes

Contents

<ul class="nav navbar-nav">
  <% Godmin.resources.each do |resource| %>
    <% if policy(resource).index? %>
      <% if controller.controller_name == resource.to_s %>
        <li class="active">
      <% else %>
        <li>
      <% end %>
        <%= link_to resource.to_s.classify.constantize.model_name.human(count: 2), resource %>
      </li>
    <% end %>
  <% end %>
</ul>
<ul class="nav navbar-nav navbar-right">
  <% if authentication_enabled? &&
        admin_user.singleton_class.include?(Godmin::Authentication::User) &&
        admin_user_signed_in? %>
    <li class="dropdown">
      <a href="#" class="dropdown-toggle" data-toggle="dropdown">
        <%= admin_user.login %> <span class="caret"></span>
      </a>
      <ul class="dropdown-menu" role="menu">
        <li>
          <%= link_to translate_scoped("sessions.sign_out"), session_path, method: :delete %>
        </li>
      </ul>
    </li>
  <% end %>
</ul>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
godmin-0.11.2 app/views/godmin/shared/_navigation.html.erb
godmin-0.11.1 app/views/godmin/shared/_navigation.html.erb
godmin-0.11.0 app/views/godmin/shared/_navigation.html.erb
godmin-0.10.3 app/views/godmin/shared/_navigation.html.erb
godmin-0.10.2 app/views/godmin/shared/_navigation.html.erb
godmin-0.10.1 app/views/godmin/shared/_navigation.html.erb
godmin-0.10.0 app/views/godmin/shared/_navigation.html.erb
godmin-0.9.9 app/views/godmin/shared/_navigation.html.erb