appointment_canceled_by_user.email.mustache 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. <% define_content :link do %>
  2. <%= appointment_group_url(asset.appointment_group) %>
  3. <% end %>
  4. <% courses = asset.appointment_group.participant_type == 'Group' ?
  5. asset.appointment_group.contexts.first.name :
  6. asset.appointment_group.contexts_for_user(user).map(&:name).join(", ") %>
  7. <% define_content :subject do %>
  8. <%= t('subject', 'Reservation canceled for "%{appointment_name}" (%{course})', :appointment_name => asset.title, :course => courses) %>
  9. <% end %>
  10. <%= t :message, '%{user} canceled his/her reservation for "%{appointment_name}".', :user => data.updating_user_name || data.updating_user.name, :appointment_name => asset.title %>
  11. <%= before_label :details, "Appointment details" %>
  12. <%= before_label :date_and_time, "Date/time" %> <%= datetime_string(asset.start_at, asset.end_at) %>
  13. <% if asset.appointment_group.participant_type == 'Group' -%>
  14. <%= before_label :attendees, "Attendees" %> <%= asset.participants.map(&:name).to_sentence %>
  15. <%= before_label :group, "Group" %> <%= asset.context.name %>
  16. <% else -%>
  17. <%= before_label :attendee, "Attendee" %> <%= asset.context.name %>
  18. <% end -%>
  19. <%= before_label :course, "Course" %> <%= courses %>
  20. <% if asset.appointment_group.available_slots && asset.grants_right?(user, :read) -%>
  21. <%= before_label :slots_remaining, "Available time slots" %> <%= asset.appointment_group.available_slots %>
  22. <% end -%>
  23. <%= before_label :cancel_reason, "Reason for canceling" %>
  24. <%= data.cancel_reason || t(:no_reason_given, "none given") %>
  25. <% if asset.grants_right?(user, :read) -%>
  26. <%= t :instructions, "View the appointment at the following link: %{link}", :link => content(:link) %>
  27. <% end -%>