<tbody id="resources-tbody">
  <% if @absence_justifications.empty? %>
    <tr>
      <td class="no_record_found" colspan="6"> <%= t('views.index.no_record_found')%></td>
    </tr>
  <% else %>
    <% @absence_justifications.each do |absence_justification| %>
      <tr>
        <td><%= absence_justification.unity ? absence_justification.unity : "Não informado" %></td>
        <td><%= absence_justification.classroom ? absence_justification.classroom : "Não informado" %></td>
        <td><span class="multiline"><%= absence_justification.decorator.students_labels %></span></td>
        <td width="70"><%= l absence_justification.absence_date %></td>
        <td width="70"><%= l absence_justification.absence_date_end %></td>
        <td><span class="label label-info label-list"><%= absence_justification.class_number || 'Todas' %></span></td>
        <td><%= absence_justification.user %></td>
        <td class="actions">

          <%= link_to(
                t('helpers.links.show_html'),
                absence_justification_path(absence_justification),
                class: 'btn btn-info apply_tooltip',
                data: { original_title: t('views.index.tooltips.show') }) %>
          <%= link_to(
                t('helpers.links.edit_html'),
                edit_absence_justification_path(absence_justification),
                class: 'btn btn-success apply_tooltip',
                data: { original_title: t('views.index.tooltips.edit') }
              ) %>
          <%= link_to(
                t('helpers.links.destroy_html'),
                absence_justification_path(absence_justification),
                class: 'btn btn-danger apply_tooltip',
                disabled: !absence_justification_destroy?(absence_justification),
                method: 'delete',
                data: {
                  confirm: t('views.index.confirm'),
                  original_title: t('views.index.tooltips.delete')
                }
              ) %>
        </td>
      </tr>
    <% end %>
  <% end %>
</tbody>
