Sha256: c3508ee7bbd754d401e159a46388fbeae357752b1ba641d188424cf250d2f5cd
Contents?: true
Size: 1.77 KB
Versions: 1
Compression:
Stored size: 1.77 KB
Contents
<table class="table table-striped index"> <tr> <th> <%= t('activerecord.models.library') %> - <%= t('activerecord.models.shelf') %> </th> <% CheckoutType.order(:position).each do |checkout_type| %> <th><%= checkout_type.display_name.localize %></th> <% end %> <th><%= t('page.total') %></th> </tr> <% (Shelf.order(:position) << nil).each do |shelf| %> <tr> <td> <% if shelf %> <strong> <%= shelf.library.display_name.localize %> - <%= shelf.display_name.localize %> </strong> <% else %> <strong><%= t('page.unknown') %></strong> <% end %> </td> <% CheckoutType.order(:position).each do |checkout_type| %> <td> <% if shelf %> <%= @checkout_type_results[[shelf.id, checkout_type.id]] %> <% else %> <%= @checkout_type_results[[nil, checkout_type.id]] %> <% end %> </td> <% end %> <td> <% if shelf %> <%= @checkout_type_results.select{|r| r[0] == shelf.id}.sum{|k, v| v} %> <% else %> <%= @checkout_type_results.select{|r| r[0].nil?}.sum{|k, v| v} %> <% end %> </td> </tr> <% end %> <tr> <td><strong><%= t('page.total') %></strong></td> <% CheckoutType.order(:position).each do |checkout_type| %> <td> <%= @checkout_type_results.select{|r| r[1] == checkout_type.id}.sum{|k, v| v} %> </td> <% end %> <td><%= @checkout_type_results.sum{|k, v| v} %></td> </tr> </table>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enju_circulation-0.1.0.pre41 | app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb |