<div class='widget-body no-padding'>
  <%= simple_form_for :filter, { url: custom_rounding_tables_path, method: :get, html: { class: 'filterable_search_form' } } do |f| %>
    <div class='table-responsive'>
      <table class='table table-bordered table-only-inner-bordered table-striped table-condensed table-hover' id='resources'>
        <thead>
          <tr>
            <th scope="col" style='width: 21%;'>
              <%= f.input :by_name, label: false, placeholder: t('.by_name') %>
            </th>
            <th scope="col" style='width: 26%;'>
              <%= f.input :by_unity, as: :select2, elements: @unities, label: false, placeholder: t('.by_unity') %>
            </th>
            <th scope="col" style='width: 19%;'>
              <%= f.input :by_course, as: :select2, elements: @courses, label: false, placeholder: t('.by_course') %>
            </th>
            <th scope="col" style='width: 12%;'>
              <%= f.input :by_grade, as: :select2, elements: @grades, label: false, placeholder: t('.by_grade') %>
            </th>
            <th scope="col" style='width: 12%;'>
              <%= f.input :by_avaliation, as: :select2, elements: @rounded_avaliations, label: false,
                placeholder: t('.by_avaliation') %>
            </th>
            <th scope="col" style='width: 10%;'>
              <%= f.input :by_year, label: false, placeholder: t('.by_year') %>
            </th>
            <th scope="col" class='actions' style='min-width: 155px;'><%= link_to t('.new_html'), new_custom_rounding_table_path, class: 'btn btn-primary' %></th>
          </tr>
          <tr>
            <th scope="col"><%= CustomRoundingTable.human_attribute_name :name %></th>
            <th scope="col"><%= CustomRoundingTable.human_attribute_name :unities %></th>
            <th scope="col"><%= CustomRoundingTable.human_attribute_name :courses %></th>
            <th scope="col"><%= CustomRoundingTable.human_attribute_name :grades %></th>
            <th scope="col"><%= CustomRoundingTable.human_attribute_name :avaliations %></th>
            <th scope="col"><%= CustomRoundingTable.human_attribute_name :year %></th>
            <th scope="col"></th>
          </tr>
        </thead>

        <%= render 'resources' %>

        <tfoot id='paginator' class='remote'>
          <td colspan='7'>
            <div id='page_entries_info' class='pull-left hidden-xs'>
              <%= page_entries_info @custom_rounding_tables %>
            </div>
            <div class='pull-right'>
              <%= paginate @custom_rounding_tables %>
            </div>
          </td>
        </tfoot>
      </table>
    </div>
  <% end %>
</div>
