<div class="widget-body no-padding">
  <%= simple_form_for :filter, { url: complementary_exam_settings_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="max-width:85px"><%= f.input :by_year, label: false, placeholder: t('.by_year') %></th>
            <th scope="col"><%= f.input :by_description, label: false, placeholder: t('.by_description') %></th>
            <th scope="col"><%= f.input :by_initials, label: false, placeholder: t('.by_initials') %></th>
            <th scope="col"><%= f.input :by_calculation_type, as: :select2, elements: CalculationTypes.to_select.to_json, label: false, placeholder: t('.by_calculation_type') %></th>
            <th scope="col"><%= f.input :by_affected_score, as: :select2, elements: AffectedScoreTypes.to_select.to_json, label: false, placeholder: t('.by_affected_score') %></th>
            <th scope="col"><%= f.input :by_grade_id, as: :select2, elements: grades, label: false, placeholder: t('.by_grade_id') %></th>
            <th scope="col" class="actions" style="width: 160px;">
                <%= link_to t('.new_html'), new_complementary_exam_setting_path, class: "btn btn-primary" %>
            </th>
          </tr>
          <tr>
            <th scope="col"><%= ComplementaryExamSetting.human_attribute_name :year %></th>
            <th scope="col"><%= ComplementaryExamSetting.human_attribute_name :description %></th>
            <th scope="col"><%= ComplementaryExamSetting.human_attribute_name :initials %></th>
            <th scope="col"><%= ComplementaryExamSetting.human_attribute_name :calculation_type %></th>
            <th scope="col"><%= ComplementaryExamSetting.human_attribute_name :affected_score %></th>
            <th scope="col"><%= ComplementaryExamSetting.human_attribute_name :grades %></th>
            <th scope="col" style="width: 160px"></th>
          </tr>
        </thead>

        <%= render 'resources' %>

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