appointment_reserved_for_user.email.mustache 1.5 KB

123456789101112131415161718192021222324252627
  1. <% define_content :link do %>
  2. <%= appointment_group_url(asset.appointment_group, :event_id => asset.to_param) %>
  3. <% end %>
  4. <% define_content :subject do %>
  5. <%= t('subject', 'You have been signed up for "%{appointment_name}"', :appointment_name => asset.title) %>
  6. <% end %>
  7. <%= t :message, '%{user} has signed you up for "%{appointment_name}".', :user => data.updating_user_name || data.updating_user.name, :appointment_name => asset.title %>
  8. <%= before_label :details, "Appointment details" %>
  9. <%= before_label :date_and_time, "Date/time" %> <%= datetime_string(asset.start_at, asset.end_at) %>
  10. <% if asset.appointment_group.participant_type == 'Group' -%>
  11. <%= before_label :attendees, "Attendees" %> <%= asset.participants.map(&:name).to_sentence %>
  12. <%= before_label :group, "Group" %> <%= asset.context.name %>
  13. <% else -%>
  14. <%= before_label :attendee, "Attendee" %> <%= asset.context.name %>
  15. <% end -%>
  16. <%= before_label :course, "Course" %> <%= asset.appointment_group.participant_type == 'Group' ?
  17. asset.appointment_group.contexts.first.name :
  18. asset.appointment_group.contexts_for_user(user).map(&:name).join(", ") %>
  19. <% if asset.appointment_group.available_slots -%>
  20. <%= before_label :slots_remaining, "Available time slots" %> <%= asset.appointment_group.available_slots %>
  21. <% end -%>
  22. <%= t :instructions, 'Sign up for a different time slot at the following link: %{link}', :link => content(:link) %>