$('#resources-tbody').replaceWith('<%= escape_javascript(render("resources")) %>');
$('#paginator .pagination').html('<%= escape_javascript(paginate(@absence_justifications, :remote => true).to_s) %>');
$('#page_entries_info').html('<%= escape_javascript(page_entries_info(@absence_justifications).to_s) %>');

$("[id^='show_more']").click(function () {
  var students_left = $(this).data('more');

  if ($(this).hasClass('collapsed')) {
    $(this).text('Mostrar menos')
  } else {
    $(this).text('Mostrar mais ' + students_left)
  }
});
