warning.html.haml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. %table.email-table{ cellspacing: 0, cellpadding: 0 }
  2. %tbody
  3. %tr
  4. %td.email-body
  5. .email-container
  6. %table.content-section{ cellspacing: 0, cellpadding: 0 }
  7. %tbody
  8. %tr
  9. %td.content-cell.hero
  10. .email-row
  11. .col-6
  12. %table.column{ cellspacing: 0, cellpadding: 0 }
  13. %tbody
  14. %tr
  15. %td.column-cell.text-center.padded
  16. %table.hero-icon.alert-icon{ align: 'center', cellspacing: 0, cellpadding: 0 }
  17. %tbody
  18. %tr
  19. %td
  20. = image_tag full_pack_url('media/images/mailer/icon_flag.png'), alt: ''
  21. %h1= t "user_mailer.warning.title.#{@warning.action}"
  22. %table.email-table{ cellspacing: 0, cellpadding: 0 }
  23. %tbody
  24. %tr
  25. %td.email-body
  26. .email-container
  27. %table.content-section{ cellspacing: 0, cellpadding: 0 }
  28. %tbody
  29. %tr
  30. %td.content-cell.content-start
  31. .email-row
  32. .col-6
  33. %table.column{ cellspacing: 0, cellpadding: 0 }
  34. %tbody
  35. %tr
  36. %td.column-cell.text-center
  37. - unless @warning.none_action?
  38. %p= t "user_mailer.warning.explanation.#{@warning.action}", instance: @instance
  39. - unless @warning.text.blank?
  40. = linkify(@warning.text)
  41. - if @warning.report && !@warning.report.other?
  42. %p
  43. %strong= t('user_mailer.warning.reason')
  44. = t("user_mailer.warning.categories.#{@warning.report.category}")
  45. - if @warning.report.violation? && @warning.report.rule_ids.present?
  46. %ul.rules-list
  47. - @warning.report.rules.each do |rule|
  48. %li= rule.text
  49. - unless @statuses.empty?
  50. %p
  51. %strong= t('user_mailer.warning.statuses')
  52. - unless @statuses.empty?
  53. - @statuses.each_with_index do |status, i|
  54. = render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone.presence
  55. %table.email-table{ cellspacing: 0, cellpadding: 0 }
  56. %tbody
  57. %tr
  58. %td.email-body
  59. .email-container
  60. %table.content-section{ cellspacing: 0, cellpadding: 0 }
  61. %tbody
  62. %tr
  63. %td.content-cell{ class: @statuses.nil? || @statuses.empty? ? '' : 'content-start' }
  64. %table.column{ cellspacing: 0, cellpadding: 0 }
  65. %tbody
  66. %tr
  67. %td.column-cell.button-cell
  68. %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 }
  69. %tbody
  70. %tr
  71. %td.button-primary
  72. = link_to disputes_strike_url(@warning) do
  73. %span= t 'user_mailer.warning.appeal'
  74. %table.email-table{ cellspacing: 0, cellpadding: 0 }
  75. %tbody
  76. %tr
  77. %td.email-body
  78. .email-container
  79. %table.content-section{ cellspacing: 0, cellpadding: 0 }
  80. %tbody
  81. %tr
  82. %td.content-cell
  83. .email-row
  84. .col-6
  85. %table.column{ cellspacing: 0, cellpadding: 0 }
  86. %tbody
  87. %tr
  88. %td.column-cell.text-center
  89. %p= t 'user_mailer.warning.appeal_description', instance: @instance