2016-06-02 11:05:42 +05:30
|
|
|
= content_for :head do
|
2017-08-17 22:00:37 +05:30
|
|
|
= stylesheet_link_tag 'mailers/highlighted_diff_email'
|
2016-06-02 11:05:42 +05:30
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
%h3
|
2022-10-11 01:57:18 +05:30
|
|
|
= 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)))}
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
- if @message.compare
|
|
|
|
- if @message.reverse_compare?
|
2015-04-26 12:48:37 +05:30
|
|
|
%p
|
2022-10-11 01:57:18 +05:30
|
|
|
%strong
|
|
|
|
= _('WARNING:')
|
|
|
|
= s_('Notify|The push did not contain any new commits, but force pushed to delete the commits and changes below.')
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
%h4
|
2022-10-11 01:57:18 +05:30
|
|
|
= @message.reverse_compare? ? _("Deleted commits:") : _("Commits:")
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
%ul
|
2015-12-23 02:04:40 +05:30
|
|
|
- @message.commits.each do |commit|
|
2015-04-26 12:48:37 +05:30
|
|
|
%li
|
2017-09-10 17:25:29 +05:30
|
|
|
%strong= link_to(commit.short_id, project_commit_url(@message.project, commit))
|
2015-04-26 12:48:37 +05:30
|
|
|
%div
|
2022-10-11 01:57:18 +05:30
|
|
|
= 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}
|
2016-04-02 18:10:28 +05:30
|
|
|
%pre.commit-message
|
2015-04-26 12:48:37 +05:30
|
|
|
= commit.safe_message
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
%h4
|
|
|
|
- changed_files = n_('%d changed file', '%d changed files', @message.diffs_count) % @message.diffs_count
|
|
|
|
= s_('Notify|%{changed_files}:') % {changed_files: changed_files}
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
%ul
|
2017-09-10 17:25:29 +05:30
|
|
|
- @message.diffs.each do |diff_file|
|
2015-04-26 12:48:37 +05:30
|
|
|
%li.file-stats
|
2017-09-10 17:25:29 +05:30
|
|
|
%a{ href: "#{@message.target_url if @message.disable_diffs?}##{hexdigest(diff_file.file_path)}" }
|
|
|
|
- if diff_file.deleted_file?
|
2015-04-26 12:48:37 +05:30
|
|
|
%span.deleted-file
|
|
|
|
−
|
2017-09-10 17:25:29 +05:30
|
|
|
= diff_file.old_path
|
|
|
|
- elsif diff_file.renamed_file?
|
|
|
|
= diff_file.old_path
|
2015-04-26 12:48:37 +05:30
|
|
|
→
|
2017-09-10 17:25:29 +05:30
|
|
|
= diff_file.new_path
|
|
|
|
- elsif diff_file.new_file?
|
2015-04-26 12:48:37 +05:30
|
|
|
%span.new-file
|
2015-09-11 14:41:01 +05:30
|
|
|
+
|
2017-09-10 17:25:29 +05:30
|
|
|
= diff_file.new_path
|
2015-04-26 12:48:37 +05:30
|
|
|
- else
|
2017-09-10 17:25:29 +05:30
|
|
|
= diff_file.new_path
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
- unless @message.disable_diffs?
|
2016-06-02 11:05:42 +05:30
|
|
|
- if @message.compare_timeout
|
2022-10-11 01:57:18 +05:30
|
|
|
%h5
|
|
|
|
= s_('Notify|The diff was not included because it is too large.')
|
2016-06-02 11:05:42 +05:30
|
|
|
- else
|
2022-10-11 01:57:18 +05:30
|
|
|
%h4
|
|
|
|
= _('Changes:')
|
2017-09-10 17:25:29 +05:30
|
|
|
- @message.diffs.each do |diff_file|
|
2017-08-17 22:00:37 +05:30
|
|
|
- file_hash = hexdigest(diff_file.file_path)
|
|
|
|
%li{ id: file_hash }
|
|
|
|
%a{ href: @message.target_url + "##{file_hash}" }<
|
2017-09-10 17:25:29 +05:30
|
|
|
- if diff_file.deleted_file?
|
2016-06-02 11:05:42 +05:30
|
|
|
%strong<
|
|
|
|
= diff_file.old_path
|
2022-10-11 01:57:18 +05:30
|
|
|
= s_('deleted')
|
2017-09-10 17:25:29 +05:30
|
|
|
- elsif diff_file.renamed_file?
|
2016-06-02 11:05:42 +05:30
|
|
|
%strong<
|
|
|
|
= diff_file.old_path
|
|
|
|
→
|
|
|
|
%strong<
|
|
|
|
= diff_file.new_path
|
|
|
|
- else
|
|
|
|
%strong<
|
|
|
|
= diff_file.new_path
|
|
|
|
- if diff_file.too_large?
|
2022-10-11 01:57:18 +05:30
|
|
|
= s_('Notify|The diff for this file was not included because it is too large.')
|
2016-06-02 11:05:42 +05:30
|
|
|
- else
|
|
|
|
%hr
|
2016-08-24 12:49:21 +05:30
|
|
|
- blob = diff_file.blob
|
2017-08-17 22:00:37 +05:30
|
|
|
- if blob && blob.readable_text?
|
2016-06-02 11:05:42 +05:30
|
|
|
%table.code.white
|
2022-03-02 08:16:31 +05:30
|
|
|
= render partial: "projects/diffs/email_line", collection: diff_file.highlighted_diff_lines, as: :line, locals: { diff_file: diff_file }
|
2016-06-02 11:05:42 +05:30
|
|
|
- else
|
2022-10-11 01:57:18 +05:30
|
|
|
= s_('Notify|No preview for this file type')
|
2016-06-02 11:05:42 +05:30
|
|
|
%br
|