Sha256: e99a3409006bf570cf7a8b1e76f4a9351eef92242d3058f24ace72ce22498cde

Contents?: true

Size: 592 Bytes

Versions: 9

Compression:

Stored size: 592 Bytes

Contents

<ul>

  <% dashboard = 'active' if params[:controller].include?('dashboard') %>

  <li><%= link_to Typus::I18n.t("Dashboard"), admin_dashboard_path, :class => dashboard %></li>

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

    <%
      apps = admin_user.application(application)
      klass = (@resource && apps.include?(@resource.model_name)) ? 'active' : nil
    %>

    <%
      url = { :controller => "/admin/#{apps.first.tableize}" }
      html_options = { :class => klass }
    %>

    <li><%= link_to Typus::I18n.t(application), url, html_options %></li>

  <% end %>

</ul>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
typus-3.0.12 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.11 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.11.rc5 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.11.rc4 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.11.rc3 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.11.rc2 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.11.rc1 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.10 app/views/admin/helpers/base/_apps.html.erb
typus-3.0.9 app/views/admin/helpers/base/_apps.html.erb