Sha256: 9dd6380f0067ff397bf3e7391c5f99a2ed9e8b474feda29e804913e15fea2de7

Contents?: true

Size: 1.16 KB

Versions: 13

Compression:

Stored size: 1.16 KB

Contents

<ul class="nav">

  <li class="<%= params[:controller].eql?('admin/dashboard') ? 'active' : 'inactive' %>">
    <%= link_to admin_dashboard_index_path do %>
      <i class="icon-home"></i>
      <%= Typus::I18n.t("Dashboard") %>
    <% end %>
  </li>

  <% admin_user.applications.each do |application| %>

    <%
      app_id, apps = application.parameterize, admin_user.application(application)
      if (params[:application] == app_id) || (@resource && apps.include?(@resource.model_name))
        klass = 'active'
      end
    %>

    <li class="<%= klass %> dropdown" data-dropdown="dropdown">
      <%= link_to "#", :class => "dropdown-toggle", "data-toggle" => "dropdown" do %>
        <%= Typus::I18n.t(application) %>
        <b class="caret"></b>
      <% end %>

      <ul class="dropdown-menu">
        <% admin_user.application(application).map(&:constantize).each do |klass| %>
          <% if klass.typus_options_for(:hide_from_dashboard) == false %>
            <li>
                <%= link_to klass.model_name.human(count: 2), :controller => "/admin/#{klass.to_resource}" %>
            </li>
          <% end %>
        <% end %>
      </ul>
    </li>

  <% end %>

</ul>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
brainsome_typus-4.0.0.beta13 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta12 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta11 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta10 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta9 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta8 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta7 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta6 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta5 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta4 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta3 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta2 app/views/helpers/admin/base/_apps.html.erb
brainsome_typus-4.0.0.beta1 app/views/helpers/admin/base/_apps.html.erb