12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <%
- # Copyright (C) 2012 - present Instructure, Inc.
- #
- # This file is part of Canvas.
- #
- # Canvas is free software: you can redistribute it and/or modify it under
- # the terms of the GNU Affero General Public License as published by the Free
- # Software Foundation, version 3 of the License.
- #
- # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
- # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
- # details.
- #
- # You should have received a copy of the GNU Affero General Public License along
- # with this program. If not, see <http://www.gnu.org/licenses/>.
- %>
- <%=
- case invitation.type
- when 'TeacherEnrollment'
- 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
- when 'TaEnrollment'
- 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
- when 'ObserverEnrollment'
- 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
- when 'DesignerEnrollment'
- 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
- else
- 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
- end
- %>
- <% if !@domain_root_account || @domain_root_account.allow_invitation_previews? %>
- <%= 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)) %>
- <% end %>
- {{#t}}When you're ready, you can either accept or reject the invitation.{{/t}}
- <div class="button-container">
- <%= form_tag course_enrollment_invitation_path(invitation.course_id) do %>
- <input type="hidden" name="invitation" value="<%= invitation.uuid %>" />
- <button type="submit" name="accept" class="btn btn-small positive btn-primary">{{#t}}Accept Invitation{{/t}}</button>
- <button type="submit" name="reject" class="btn btn-small reject_button">{{#t}}Reject Invitation{{/t}}</button>
- <% end %>
- </div>
|