Sha256: 89f565694c34243597b2b2efc186f1f12837f53b3040cbad41253a96ae413c01

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

%table.zebra-striped
  %thead
    %tr
      %th.shrink.model-name= t "admin.dashboard.model_name"
      %th.shrink.last-used= t "admin.dashboard.last_used"
      %th.records= t "admin.dashboard.records"
      %th.shrink.controls
  %tbody
    - @abstract_models.each do |abstract_model|
      - if authorized? :index, abstract_model
        - index_path = index_path(:model_name => abstract_model.to_param)
        - row_class = "#{cycle("odd", "even")}#{" link" if index_path}"

        %tr{:class => row_class, :"data-link" => index_path}
          %td
            %span.show= link_to RailsAdmin.config(abstract_model).label_plural, index_path
          %td
            - if (last_used = @most_recent_changes[abstract_model.pretty_name])
              = time_ago_in_words last_used
              = t "admin.dashboard.ago"
          %td
            - count = @count[abstract_model.pretty_name]
            - percent = count > 0 ? (@max < 2.0 ? count : ((Math.log(count) * 100.0) / Math.log(@max))) : -1
            .label.animate-width-to{:class => get_indicator(percent), :'data-animate-length' => ([1.0, percent].max.to_i * 20), :'data-animate-width-to' => "#{[2.0, percent].max.to_i}%", :style => "width:2%"}= @count[abstract_model.pretty_name]
          %td.links
            %ul.inline= render :partial => 'rails_admin/main/models_links', :locals => { :abstract_model => abstract_model }
- if authorized? :history
  #block-tables.block
    .content
      %h2= t("admin.history.name")
      = render :partial => 'rails_admin/history/dashboard'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elucid-rails_admin-0.0.1 app/views/rails_admin/main/dashboard.html.haml