<% content_for :js do %>
  <%= javascript_include_tag 'views/knowledge_area_content_records/index' %>
<% end %>
<div class="widget-body no-padding">
  <%= simple_form_for :filter, { url: knowledge_area_content_records_path, method: :get, html: { class: 'filterable_search_form' } } do |f| %>
    <div class="table-responsive">
      <table id="resources" class="table table-bordered table-only-inner-bordered table-striped table-condensed table-hover">
        <thead>
          <tr>
            <th scope="col">
              <%= f.input :by_classroom_id, as: :select2, elements: @classrooms,
              label: false, placeholder: t('.by_classroom_description') %></th>
            <th scope="col">
              <%= f.input :by_knowledge_area_id, as: :select2, elements: @knowledge_areas,
               label: false, placeholder: t('.by_knowledge_area_description') %></th>
            <th scope="col"><%= f.input :by_date, as: :date, label: false, placeholder: t('.by_date') %></th>
            <th scope="col">
              <%= f.input :by_author, as: :select2_plans, label: false %>
            </th>
            <th scope="col">
              <%= link_to t('.new_html'), new_knowledge_area_content_record_path,
                class: 'btn btn-primary pull-right', style: 'width: 165px;' %>
            </th>
          </tr>

          <tr>
            <th scope="col"><%= ContentRecord.human_attribute_name :classroom %></th>
            <th scope="col"><%= KnowledgeAreaContentRecord.human_attribute_name :knowledge_areas %>
            <th scope="col"><%= ContentRecord.human_attribute_name :record_date %></th>
            <th scope="col" style="width: 10%"><%= KnowledgeAreaContentRecord.human_attribute_name :author %></th>
            <th scope="col" style="width: 160px"></th>
          </tr>
        </thead>

        <%= render 'resources' %>

        <tfoot id="paginator" class="remote">
          <td id="pagination-tfoot" colspan="5">
            <%= render 'shared/pagination', records: @knowledge_area_content_records %>
          </td>
        </tfoot>
      </table>
    </div>
  <% end %>
</div>
<%= render 'copy_knowledge_area_content_record_modal' %>
