Sha256: c55ce0dd00c0f4d860a08e26c517d4d2144f7eb63d60272c6f8b115eea6b817e

Contents?: true

Size: 1.73 KB

Versions: 5

Compression:

Stored size: 1.73 KB

Contents

    <table class="table table-striped index">
      <tr>
        <th>
          <%= t('activerecord.models.library') %>
	</th>
	<th>
          <%= t('activerecord.models.shelf') %>
        </th>
        <% CheckoutType.order(:position).each do |checkout_type| %>
          <th><%= checkout_type.display_name %></th>
        <% end %>
        <th><%= t('page.total') %></th>
      </tr>
      <% Library.order(:position).each do |library| %>
        <% library.shelves.order(:position).each do |shelf| %>
          <tr>
            <td>
              <%= library.display_name %>
            </td>
            <td>
              <%= shelf.display_name %>
            </td>
            <% CheckoutType.order(:position).each do |checkout_type| %>
              <td>
                <%= @checkout_type_results[[shelf.id, checkout_type.id]] %>
              </td>
            <% end %>
            <td>
              <%= @checkout_type_results.select{|r| r[0] == shelf.id}.sum{|k, v| v} %>
            </td>
          </tr>
        <% end %>
      <% end %>
      <tr>
        <td colspan="2"><%= t('page.unknown') %></th>
        <% CheckoutType.order(:position).each do |checkout_type| %>
          <td>
            <%= @checkout_type_results[[nil, checkout_type.id]] %>
          </td>
        <% end %>
        <td>
          <%= @checkout_type_results.select{|r| r[0].nil?}.sum{|k, v| v} %>
        </td>
      </tr>
      <tr>
        <th colspan="2"><%= t('page.total') %></th>
        <% 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

5 entries across 5 versions & 1 rubygems

Version Path
enju_circulation-0.4.0.rc.1 app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb
enju_circulation-0.4.0.beta.4 app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb
enju_circulation-0.4.0.beta.3 app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb
enju_circulation-0.4.0.beta.2 app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb
enju_circulation-0.4.0.beta.1 app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb