Sha256: 85e12c64d657dca8c09cab270419488723e5bbd305532bad78c8317a4d7abf84

Contents?: true

Size: 1.42 KB

Versions: 4

Compression:

Stored size: 1.42 KB

Contents

%table.table.table-condensed.table-striped
  %thead
    %tr
      %th.shrink Model Name
      %th.shrink Last Used
      %th Records
      %th.shrink Controls
  %tbody
    -unless @models.empty?
      -@max = 0
      -@models.each do |m|
        - unless m == nil
          %tr
            %td= m.class.to_s.split('::')[1].pluralize
            %td= "#{time_ago_in_words(m.updated_at)} ago"
            %td
              - count = m.class.model_name.name.constantize.count
              - @max = count > @max ? count : @max
              - percent = count > 0 ? (@max <= 1 ? count : ((Math.log(count+1) * 100.0) / Math.log(@max+1)).to_i) : -1
              .progress{style: "margin-bottom:0px", class: "progress-#{get_indicator(percent)} #{'active' && 'active progress-striped'}"  }
                .progress-bar.animate-width-to{:class => "progress-bar-#{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
            %td
              %ul.inline.list-inline
                %li{title:'add new', rel:'tooltip'}
                  %a{href:'#'}
                    %i.fa.fa-plus
                    %span{style:'display:none;'}= "Add New"
                %li{title:'export', rel:'tooltip'}
                  %a{href:'#'}
                    %i.fa.fa-share
                    %span{style:'display:none;'}= "Export"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hatchy-0.0.8.pre app/views/hatchy/admin/dashboard/_last_updated_table.html.haml
hatchy-0.0.7.pre app/views/hatchy/admin/dashboard/_last_updated_table.html.haml
hatchy-0.0.6.pre app/views/hatchy/admin/dashboard/_last_updated_table.html.haml
hatchy-0.0.5.pre app/views/hatchy/admin/dashboard/_last_updated_table.html.haml