prior_users.mustache 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. <%
  19. add_crumb(t('#crumbs.people', "People"), context_url(@context, :context_users_url))
  20. add_crumb(t('#crumbs.prior_users', "Prior Users"))
  21. @active_tab="people"
  22. %>
  23. <% content_for :page_title, t('titles.prior_users', "Prior Users") %>
  24. <% content_for :right_side do %>
  25. <a href="<%= context_url(@context, :context_users_url) %>" class="btn button-sidebar-wide">
  26. <i class="icon-arrow-left"></i>
  27. {{#t}}Back to People{{/t}}
  28. </a>
  29. <% end %>
  30. <% css_bundle :prior_users %>
  31. <h1>{{#t}}Prior Users{{/t}}</h1>
  32. <table id="users">
  33. <thead>
  34. <tr>
  35. <th scope="col">{{#t}}Name{{/t}}</th>
  36. <th scope="col">{{#t}}Type{{/t}}</th>
  37. <th scope="col">{{#t}}Total{{/t}}</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <% @prior_users.each do |user| %>
  42. <tr>
  43. <td class="name">
  44. <%= link_to(user.last_name_first, context_url(@context, :context_user_url, user.id)) %>
  45. <div class="email">
  46. <%= user.email %>
  47. </div>
  48. </td>
  49. <td class="type">
  50. <%= user.prior_enrollment.readable_type %>
  51. </td>
  52. <td class="score"><%= link_to(user.prior_enrollment.computed_final_score || '--', context_url(@context, :context_student_grades_url, user.id)) if user.prior_enrollment.student? %></td>
  53. </tr>
  54. <% end %>
  55. </tbody>
  56. </table>
  57. <%= will_paginate(@prior_users) %>