<%= stylesheet_link_tag "resources/lessons_boards" %>
<% content_for :js do %>
  <%= javascript_include_tag 'views/lessons_boards/index' %>
<% end %>

<div class="widget-body no-padding">
  <%= simple_form_for :search, { url: lessons_boards_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"><%= f.input :by_year, label: false, placeholder: t('.by_year') %></th>
            <th scope="col"><%= f.input :by_unity, as: :select2, elements: lesson_unities, label: false, placeholder: t('.by_unity') %></th>
            <th scope="col"><%= f.input :by_grade, as: :select2, elements: lesson_grades, label: false, placeholder: t('.by_grade') %></th>
            <th scope="col"><%= f.input :by_classroom, as: :select2, elements: lesson_classrooms, label: false, placeholder: t('.by_classroom') %></th>
            <th scope="col"></th>
            <th scope="col"><%= link_to t('.new_html'), new_lessons_board_path, class: "btn btn-primary pull-right" %></th>
          </tr>
          <tr>
            <th scope="col" style="width: 110px"><%= t('.year') %></th>
            <th scope="col" style="width: 340px"><%= t('.unity') %></th>
            <th scope="col"><%= t('.grade') %></th>
            <th scope="col"><%= t('.classroom') %></th>
            <th scope="col" style="width: 150px"><%= t('lessons_boards.form.period') %></th>
            <th scope="col" style="width: 120px"></th>
          </tr>
        </thead>

        <%= render 'resources' %>

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