warning.html.haml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. = content_for :heading do
  2. = render 'application/mailer/heading',
  3. image_url: frontend_asset_url('images/mailer-new/heading/warning.png'),
  4. title: t("user_mailer.warning.title.#{@warning.action}")
  5. %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
  6. %tr
  7. %td.email-body-padding-td
  8. %table.email-inner-card-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
  9. %tr
  10. %td.email-inner-card-td-without-padding
  11. %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
  12. %tr
  13. %td.email-prose.email-padding-24
  14. - unless @warning.none_action?
  15. %p= t "user_mailer.warning.explanation.#{@warning.action}", instance: @instance
  16. - if @warning.text.present?
  17. = linkify(@warning.text)
  18. - if @warning.report && !@warning.report.other?
  19. %p
  20. %strong= t('user_mailer.warning.reason')
  21. = t("user_mailer.warning.categories.#{@warning.report.category}")
  22. - if @warning.report.violation? && @warning.report.rule_ids.present?
  23. %ul.rules-list
  24. - @warning.report.rules.each do |rule|
  25. %li= rule.text
  26. - unless @statuses.empty?
  27. %p
  28. %strong= t('user_mailer.warning.statuses')
  29. - unless @statuses.empty?
  30. %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
  31. %tr
  32. %td.email-border-top
  33. - @statuses.each_with_index do |status, i|
  34. %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
  35. %tr
  36. %td.email-border-bottom.email-padding-24
  37. = render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone.presence
  38. %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
  39. %tr
  40. %td.email-prose.email-padding-24
  41. %p= t 'user_mailer.warning.appeal_description', instance: @instance
  42. = render 'application/mailer/button', text: t('user_mailer.warning.appeal'), url: disputes_strike_url(@warning)