forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_invitation.html.erb
More file actions
43 lines (42 loc) · 2.64 KB
/
Copy path_invitation.html.erb
File metadata and controls
43 lines (42 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<%
# 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('accept_or_reject', "When you're ready, you can either accept or reject the invitation.") %>
<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('buttons.accept', 'Accept Invitation') %></button>
<button type="submit" name="reject" class="btn btn-small reject_button"><%= t('buttons.reject', 'Reject Invitation') %></button>
<% end %>
</div>