invitation.mustache 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <%
  2. # Copyright (C) 2012 - 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. case invitation.type
  20. when 'TeacherEnrollment'
  21. mt :body_teacher, "You've been invited to join %{course} as a **teacher** for the user account **%{email_address}**.", :course => invitation.long_name, :email_address => invitation.user.email
  22. when 'TaEnrollment'
  23. mt :body_ta, "You've been invited to join %{course} as a **TA** for the user account **%{email_address}**.", :course => invitation.long_name, :email_address => invitation.user.email
  24. when 'ObserverEnrollment'
  25. mt :body_observer, "You've been invited to join %{course} as an **observer** for the user account **%{email_address}**.", :course => invitation.long_name, :email_address => invitation.user.email
  26. when 'DesignerEnrollment'
  27. mt :body_designer, "You've been invited to join %{course} as a **designer** for the user account **%{email_address}**.", :course => invitation.long_name, :email_address => invitation.user.email
  28. else
  29. mt :body_student, "You've been invited to join %{course} as a **student** for the user account **%{email_address}**.", :course => invitation.long_name, :email_address => invitation.user.email
  30. end
  31. %>
  32. <% if !@domain_root_account || @domain_root_account.allow_invitation_previews? %>
  33. <%= mt('wander_around_dont_get_lost', "Feel free to [wander around](%{link_to_course}) and see what it's like.", :link_to_course => course_path(invitation.course_id, :invitation => invitation.uuid)) %>
  34. <% end %>
  35. {{#t}}When you're ready, you can either accept or reject the invitation.{{/t}}
  36. <div class="button-container">
  37. <%= form_tag course_enrollment_invitation_path(invitation.course_id) do %>
  38. <input type="hidden" name="invitation" value="<%= invitation.uuid %>" />
  39. <button type="submit" name="accept" class="btn btn-small positive btn-primary">{{#t}}Accept Invitation{{/t}}</button>
  40. <button type="submit" name="reject" class="btn btn-small reject_button">{{#t}}Reject Invitation{{/t}}</button>
  41. <% end %>
  42. </div>