<tbody id="resources-tbody">
  <% if @discipline_content_records.empty? %>
    <tr>
      <td class="no_record_found" colspan="5"><%= t('views.index.no_record_found')%></td>
    </tr>
  <% else %>
    <% @discipline_content_records.each do |discipline_content_record| %>
      <tr>
        <td class="classroom"><%= discipline_content_record.content_record.classroom %></td>
        <td class="discipline"><%= discipline_content_record.discipline %></td>
        <td class="record_date"><%= l(discipline_content_record.content_record.record_date) %></td>
        <td><%= discipline_content_record.content_record.decorator.author(current_teacher) %></td>

        <% if @allow_class_number %>
          <td><%= discipline_content_record.class_number %></td>
        <% end %>

        <td class="actions">
          <%= link_to(
                t('helpers.links.copy_html'),
                '#',
                class: 'btn btn-primary apply_tooltip open_copy_modal',
                data: { original_title: t('views.index.tooltips.copy'),
                        discipline_content_record_id: discipline_content_record.id,
                        discipline_id: discipline_content_record.discipline_id,
                        classroom_id: discipline_content_record.content_record.classroom.id,
                        grade_id: discipline_content_record.content_record.classroom.grade_ids
                      }) %>
          <%= link_to(
                t('helpers.links.show_html'),
                discipline_content_record_path(discipline_content_record),
                class: 'btn btn-info apply_tooltip',
                data: { original_title: t('views.index.tooltips.show') }) %>
          <%= link_to(
                t('helpers.links.edit_html'),
                edit_discipline_content_record_path(discipline_content_record),
                class: 'btn btn-success apply_tooltip',
                data: { original_title: t('views.index.tooltips.edit') }
              ) %>
          <%= link_to(
                  t('helpers.links.destroy_html'),
                  discipline_content_record_path(discipline_content_record),
                  class: 'btn btn-danger apply_tooltip',
                  disabled: !content_record_destroy?(discipline_content_record.content_record),
                  method: 'delete',
                  data: {
                    confirm: t('views.index.confirm_deletion'),
                    original_title: t('views.index.tooltips.delete')
                  }
                ) %>
        </td>
      </tr>
    <% end %>
  <% end %>
</tbody>
