Sha256: 107d20ed7e49d693dce93dfc8f0cd892645e3d78091d9141afe7cf6adcf5cf11

Contents?: true

Size: 1.01 KB

Versions: 9

Compression:

Stored size: 1.01 KB

Contents

<% colors = [ :first, :second, :third, :fourth ] %>
<% index = 0 %>
<% allowed_models = Settings.models_in_dashboard %>
<% allowed_models_cleaned = allowed_models.split.join.split(",") %>
<% @abstract_models.each do |abstract_model| %>
  <% if allowed_models.blank? || allowed_models_cleaned.include?(abstract_model.model_name) %>
    <% index_path = index_path(model_name: abstract_model.to_param) %>
    <% if authorized?(:index, abstract_model) %>
      <% if index == colors.length %>
        <% index = 0 %>
      <% end %>
      <div class="col-sm-4 dashboard-element">
        <a class="box pjax <%= colors[index] %>" href="<%= index_path %>">
          <div class="text-center">
            <p class="model">
              <%= abstract_model.config.label_plural %>
            </p>
            <i class="icon-block <%= abstract_model.config.navigation_icon.present? ? abstract_model.config.navigation_icon : 'file'  %>"></i>
          </div>
        </a>
      </div>
      <% index += 1 %>
    <% end %>
  <% end %>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
thecore_ui_rails_admin-3.1.3 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.1.2 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.1.1 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.1.0 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.0.19 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.0.18 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.0.17 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.0.16 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.0.15 app/views/rails_admin/main/_dashboard_block.html.erb