Welcome to mirror list, hosted at ThFree Co, Russian Federation.

repository_push_email.html.haml « notify « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ee219914513bc97f51ab8bdbb0e2b9c608998066 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
= content_for :head do
  = stylesheet_link_tag 'mailers/highlighted_diff_email'

%h3
  = s_('Notify|%{author_name} %{action_name} %{ref_type} %{ref_name} at %{project_link}').html_safe % {author_name: @message.author_name, action_name: @message.action_name, ref_type: @message.ref_type, ref_name: @message.ref_name, project_link: link_to(@message.project_name_with_namespace, strip_tags(project_url(@message.project)))}

- if @message.compare
  - if @message.reverse_compare?
    %p
      %strong
        = _('WARNING:')
      = s_('Notify|The push did not contain any new commits, but force pushed to delete the commits and changes below.')

  %h4
    = @message.reverse_compare? ? _("Deleted commits:") : _("Commits:")

  %ul
    - @message.commits.each do |commit|
      %li
        %strong= link_to(commit.short_id, project_commit_url(@message.project, commit))
        %div
          = html_escape(s_('Notify|%{committed_by_start} by %{author_name} %{committed_by_end} %{committed_at_start} at %{committed_date} %{committed_at_end}')) % {committed_by_start: '<span>'.html_safe, author_name: commit.author_name, committed_by_end: '</span>'.html_safe, committed_at_start: '<i>'.html_safe, committed_date: commit.committed_date.to_s(:iso8601), committed_at_end: '</i>'.html_safe}
        %pre.commit-message
          = commit.safe_message

  %h4
    - changed_files = n_('%d changed file', '%d changed files', @message.diffs_count) % @message.diffs_count
    = s_('Notify|%{changed_files}:') % {changed_files: changed_files}

  %ul
    - @message.diffs.each do |diff_file|
      %li.file-stats
        %a{ href: "#{@message.target_url if @message.disable_diffs?}##{hexdigest(diff_file.file_path)}" }
          - if diff_file.deleted_file?
            %span.deleted-file
              &minus;
              = diff_file.old_path
          - elsif diff_file.renamed_file?
            = diff_file.old_path
            &rarr;
            = diff_file.new_path
          - elsif diff_file.new_file?
            %span.new-file
              &#43;
              = diff_file.new_path
          - else
            = diff_file.new_path

  - unless @message.disable_diffs?
    - if @message.compare_timeout
      %h5
        = s_('Notify|The diff was not included because it is too large.')
    - else
      %h4
        = _('Changes:')
      - @message.diffs.each do |diff_file|
        - file_hash = hexdigest(diff_file.file_path)
        %li{ id: file_hash }
          %a{ href: @message.target_url + "##{file_hash}" }<
            - if diff_file.deleted_file?
              %strong<
                = diff_file.old_path
              = s_('deleted')
            - elsif diff_file.renamed_file?
              %strong<
                = diff_file.old_path
              &rarr;
              %strong<
                = diff_file.new_path
            - else
              %strong<
                = diff_file.new_path
          - if diff_file.too_large?
            = s_('Notify|The diff for this file was not included because it is too large.')
          - else
            %hr
            - blob = diff_file.blob
            - if blob && blob.readable_text?
              %table.code.white
                = render partial: "projects/diffs/email_line", collection: diff_file.highlighted_diff_lines, as: :line, locals: { diff_file: diff_file }
            - else
              = s_('Notify|No preview for this file type')
          %br