Sha256: d93fa8e8dbd1f499e18e5f62f106c7cdb26977ede6a5faea238ee7ef53334eae

Contents?: true

Size: 1.01 KB

Versions: 13

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 <%= 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

13 entries across 13 versions & 1 rubygems

Version Path
thecore_ui_rails_admin-3.2.9 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.8 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.7 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.6 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.5 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.4 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.3 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.2 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.1 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.2.0 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.1.6 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.1.5 app/views/rails_admin/main/_dashboard_block.html.erb
thecore_ui_rails_admin-3.1.4 app/views/rails_admin/main/_dashboard_block.html.erb