File: notify.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (51 lines) | stat: -rw-r--r-- 2,341 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
- note = local_assigns.fetch(:note, @note)
-# Diff preview text should only appear when a note is available. Default value to be false
- show_no_diff_preview_message = false
- unless note.nil?
  - discussion = local_assigns.fetch(:discussion) { note.discussion } if note.part_of_discussion?
  - project = local_assigns.fetch(:project, @project)
  - show_no_diff_preview_message = discussion&.diff_discussion? && discussion.on_text? && !project.show_diff_preview_in_email?

%html{ lang: I18n.locale }
  %head
    %meta{ content: "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
    %title
      GitLab
    - if Feature.enabled?(:enhanced_notify_css)
      = universal_stylesheet_link_tag 'mailers/notify_enhanced'
      %style{ type: 'text/css', 'data-premailer': 'ignore' }
        -# The MUA automatically turns some text into links.
        -# Match the color of explicit links ($blue-600 from typography.scss).
        a { color: #1068bf; }
    - else
      = universal_stylesheet_link_tag 'mailers/notify'
    = yield :head
  %body
    -# Test stub for RSpec testing of Notify and associated modules
    -# Sometimes we override the choosen layout via `determine_layout` in our Notify mailer
    -# but ActionMailer doesn't support testing layout in pure Ruby so this HTML comment is
    -# used for testing the determined layout
    - if Rails.env.test?
      / determine_layout returned template notify
    .content
      = html_header_message
      = yield
    .footer{ style: "margin-top: 10px;" }
      %p
        —
        %br
        - if show_no_diff_preview_message
          = _('This project does not include diff previews in email notifications.')
          %br
        - if @target_url
          - if @reply_by_email
            = _('Reply to this email directly or %{view_it_on_gitlab}.').html_safe % { view_it_on_gitlab: link_to(_("view it on GitLab"), @target_url) }
          - else
            #{link_to _('View it on GitLab'), @target_url}.
          %br
          = notification_reason_text(reason: @reason, show_manage_notifications_link: !@labels_url, show_help_link: true, manage_label_subscriptions_url: @labels_url, unsubscribe_url: @unsubscribe_url, format: :html)

          = email_action @target_url

        = render_if_exists 'layouts/email_additional_text'
        = html_footer_message