user_notes.mustache 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <% add_crumb t('crumbs.faculty_journal', "Faculty Journal") %>
  19. <% @active_tab = "faculty-journal" %>
  20. <% content_for :page_title do %><%= t :page_title, "Faculty Journal" %><% end %>
  21. <h1 class="screenreader-only"><%= t :journal_header, "Faculty Journal" %></h1>
  22. <p><%= @is_course ? t(:details_this_course, "Last Faculty Journal entries for students currently enrolled in this course.") :
  23. t(:details_a_course, "Last Faculty Journal entries for students currently enrolled in a course.") %></p>
  24. <%= will_paginate(@users, :style=>"margin-bottom: 1em;") %>
  25. <% css_bundle("syllabus") %>
  26. <table id="syllabus">
  27. <thead>
  28. <tr>
  29. <th><%= t 'headers.student', "Student" %></th>
  30. <th><%= t 'headers.last_entry', "Last Faculty Journal Entry" %></th>
  31. <th><%= t 'headers.current_courses', "Current Courses" %></th>
  32. </tr>
  33. </thead>
  34. <% @users.each do |user| %>
  35. <tr class="date">
  36. <td class="details"><a href="<%= user_user_notes_path(user)%>"><%= user.last_name_first %></a></td>
  37. <td style="text-align:left;"><%= datetime_string(user.try_rescue(:last_user_note)) || t("Never") %></td>
  38. <td class="courses" style="text-align:left;">
  39. <% user.courses.each_with_index do |course, i| %><%= ", " if i > 0 %><a href="<%= course_user_notes_path(course) %>"><%= course.short_name %></a><% end %>
  40. </td>
  41. </tr>
  42. <% end %>
  43. </table>
  44. <%= will_paginate(@users, :style=>"margin-top: 1em;") %>