diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-03 08:17:07 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-07 06:21:30 +0300 |
commit | f54290de751e365be0928c66bb75fd106bb7aa88 (patch) | |
tree | da09c1505ede95633e7312080ab48986ae7382cb /app/views | |
parent | e2698d5d7455d91fa94f9bbf1fc838f8cb142700 (diff) |
Remove caching of CSV file
Load whole file in memory to simplify code
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/issues/import_csv/_modal.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/empty_states/_issues.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/issues/import_csv/_modal.html.haml b/app/views/projects/issues/import_csv/_modal.html.haml index bef34c93e63..18768307341 100644 --- a/app/views/projects/issues/import_csv/_modal.html.haml +++ b/app/views/projects/issues/import_csv/_modal.html.haml @@ -15,7 +15,7 @@ .form-group = label_tag :file, _('Upload CSV file'), class: 'label-bold' %div - = file_field_tag :file, accept: 'text/csv', required: true + = file_field_tag :file, accept: '.csv,text/csv', required: true %p.text-secondary = _('It must have a header row and at least two columns: the first column is the issue title and the second column is the issue description. The separator is automatically detected.') = _('The maximum file size allowed is %{size}.') % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml index 76f6a294cb3..0434860dec4 100644 --- a/app/views/shared/empty_states/_issues.html.haml +++ b/app/views/shared/empty_states/_issues.html.haml @@ -1,6 +1,6 @@ - button_path = local_assigns.fetch(:button_path, false) - project_select_button = local_assigns.fetch(:project_select_button, false) -- show_import_button = local_assigns.fetch(:show_import_button, false) +- show_import_button = local_assigns.fetch(:show_import_button, false) && Feature.enabled?(:issues_import_csv) && can?(current_user, :import_issues, @project) - has_button = button_path || project_select_button .row.empty-state |