diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-25 00:08:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-25 00:08:03 +0300 |
commit | 0b5e5c78a9d7acbf773d7ba5fd5c2ce9b6ffdb52 (patch) | |
tree | 64e092630aca6e42462003414519f22266dcbc25 /app/views/notify | |
parent | d48b87d4675d6b8b56dd9b40afa9eb2dce32ad3b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/import_work_items_csv_email.html.haml | 18 | ||||
-rw-r--r-- | app/views/notify/import_work_items_csv_email.text.erb | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/app/views/notify/import_work_items_csv_email.html.haml b/app/views/notify/import_work_items_csv_email.html.haml new file mode 100644 index 00000000000..425cf42fbd0 --- /dev/null +++ b/app/views/notify/import_work_items_csv_email.html.haml @@ -0,0 +1,18 @@ +- text_style = 'font-size:16px; text-align:center; line-height:30px;' + +%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 of work items for project %{project_link} has been completed.').html_safe % { project_link: project_link } + +%p{ style: text_style } + - work_items = n_('%d work item', '%d work items', @results[:success]) % @results[:success] + = s_('Notify|%{work_items} imported.') % { work_items: work_items } + +- if @results[:error_lines].present? + %p{ style: text_style } + = s_('Notify|Errors found on %{singular_or_plural_line}: %{error_lines}. Please check that these lines have the following fields: %{required_headers}.') % { singular_or_plural_line: n_('line', 'lines', @results[:error_lines].size), required_headers: WorkItems::ImportCsvService.required_headers.join(', '), + 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.') diff --git a/app/views/notify/import_work_items_csv_email.text.erb b/app/views/notify/import_work_items_csv_email.text.erb new file mode 100644 index 00000000000..5793131af89 --- /dev/null +++ b/app/views/notify/import_work_items_csv_email.text.erb @@ -0,0 +1,11 @@ +Your CSV import for project <%= @project.full_name %> (<%= project_url(@project) %>) has been completed. + +<%= pluralize(@results[:success], 'work item') %> imported. + +<% if @results[:error_lines].present? %> +Errors found on line <%= 'number'.pluralize(@results[:error_lines].size) %>: <%= @results[:error_lines].join(', ') %>. Please check that these lines have the following fields: <%= WorkItems::ImportCsvService.required_headers.join(', ') %>. +<% end %> + +<% if @results[:parse_error] %> +Error parsing CSV file. Please make sure it has the correct format: a delimited text file that uses a comma to separate values. +<% end %> |