forked from capability-boosters-dev/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appointment_reserved_by_user.email.erb
28 lines (24 loc) · 1.6 KB
/
appointment_reserved_by_user.email.erb
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
<% define_content :link do %>
<%= appointment_group_url(asset.appointment_group, :event_id => asset.to_param) %>
<% end %>
<% define_content :subject do %>
<%= t('subject', 'User signed up for "%{appointment_name}" (%{course})', :appointment_name => asset.title, :course => asset.appointment_group.contexts_for_user(user).map(&:name).join(", ")) %>
<% end %>
<%= t :message, '%{user} has signed up for "%{appointment_name}".', :user => data.updating_user_name || data.updating_user.name, :appointment_name => asset.title %>
<%= before_label :details, "Appointment details" %>
<%= before_label :date_and_time, "Date/time" %> <%= datetime_string(asset.start_at, asset.end_at) %>
<% if asset.appointment_group.participant_type == 'Group' -%>
<%= before_label :attendees, "Attendees" %> <%= asset.participants.map(&:name).to_sentence %>
<%= before_label :group, "Group" %> <%= asset.context.name %>
<% else -%>
<%= before_label :attendee, "Attendee" %> <%= asset.context.name %>
<% end -%>
<%= before_label :course, "Course" %> <%= courses = asset.appointment_group.participant_type == 'Group' ?
asset.appointment_group.contexts.first.name :
asset.appointment_group.contexts_for_user(user).map(&:name).join(", ") %>
<% if asset.grants_right?(user, :read) -%>
<% if asset.appointment_group.available_slots -%>
<%= before_label :slots_remaining, "Available time slots" %> <%= asset.appointment_group.available_slots %>
<% end -%>
<%= t :instructions, "View the appointment at the following link: %{link}", :link => content(:link) %>
<% end -%>