File: import_issues_csv_email.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 (34 lines) | stat: -rw-r--r-- 1,889 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
- text_style = 'font-size:16px; text-align:center;  line-height:30px;'
- error_style = 'font-size:13px; text-align:center; line-height:16px; color:#dd2b0e;'

%p{ style: text_style }
  - project_link = link_to(@project.full_name, project_url(@project), style: "color:#3777b0; text-decoration:none;")
  = s_('Notify|Your CSV import for project %{project_link} has been completed.').html_safe % { project_link: project_link }

%p{ style: text_style }
  - issues = n_('%d issue', '%d issues', @results[:success]) % @results[:success]
  = s_('Notify|%{issues} imported.') % { issues: issues }

- if @results[:error_lines].present?
  %p{ style: text_style }
    = s_('Notify|Errors found on %{singular_or_plural_line}: %{error_lines}. Please check if these lines have an issue title.') % { singular_or_plural_line: n_('line', 'lines', @results[:error_lines].size),
      error_lines: @results[:error_lines].join(', ') }

- if @results[:parse_error]
  %p{ style: text_style }
    = s_('Notify|Error parsing CSV file. Please make sure it has the correct format: a delimited text file that uses a comma to separate values.')

- preprocess_errors = @results[:preprocess_errors]
- if preprocess_errors.present?

  - missing_milestone_errors = preprocess_errors.dig(:milestone_errors, :missing) || []

  - if missing_milestone_errors.present?
    %p{ style: error_style }
      = s_('Notify|Could not find the following %{column} values in %{project}%{parent_groups_clause}: %{error_lines}') % { error_lines: missing_milestone_errors[:titles].join(', '),
        column: missing_milestone_errors[:header].downcase, project: @project.full_name,
        parent_groups_clause: @project.group.present? ? ' or its parent groups' : ''}

- if @results[:error_lines].present? || preprocess_errors.present?
  %p{ style: text_style }
    = s_('Notify|Please fix the errors above and try the CSV import again.')