diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-12-06 08:51:30 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-07 11:16:58 +0800 |
commit | 3c026971149c95f076b8c50a52ddbfed139d5b20 (patch) | |
tree | 6bf0e1e8e28968887156dd524dc37e498229a9e6 /app/views/notify | |
parent | 876ab436fabf2f44e2a6912262f980256b7c9736 (diff) | |
download | gitlab-ce-3c026971149c95f076b8c50a52ddbfed139d5b20.tar.gz |
Import CSV Backend
Process CSV uploads async using a worker then email results
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/import_issues_csv_email.html.haml | 18 | ||||
-rw-r--r-- | app/views/notify/import_issues_csv_email.text.erb | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/app/views/notify/import_issues_csv_email.html.haml b/app/views/notify/import_issues_csv_email.html.haml new file mode 100644 index 00000000000..a6a797a5fb7 --- /dev/null +++ b/app/views/notify/import_issues_csv_email.html.haml @@ -0,0 +1,18 @@ +- text_style = 'font-size:16px; text-align:center; line-height:30px;' + +%p{ style: text_style } + Your CSV import for project + %a{ href: project_url(@project), style: "color:#3777b0; text-decoration:none;" } + = @project.full_name + has been completed. + +%p{ style: text_style } + #{pluralize(@results[:success], 'issue')} imported successfully. + +- if @results[:errors].present? + %p{ style: text_style } + Errors found on line #{'number'.pluralize(@results[:errors].size)}: #{@results[:errors].join(', ')}. + +- unless @results[:valid_file] + %p{ style: text_style } + Error parsing CSV file. diff --git a/app/views/notify/import_issues_csv_email.text.erb b/app/views/notify/import_issues_csv_email.text.erb new file mode 100644 index 00000000000..54a1762c4ec --- /dev/null +++ b/app/views/notify/import_issues_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], 'issue') %> imported successfully. + +<% if @results[:errors].present? %> +Errors found on line <%= 'number'.pluralize(@results[:errors].size) %>: <%= @results[:errors].join(', ') %>. +<% end %> + +<% unless @results[:valid_file] %> +Error parsing CSV file. +<% end %> |