(1) Take care the "cancel" of import redirects to the WP list,

(2) A successful import redirects to the import summary page and not directly back to the list,
(3) Shorten button labels
pull/7498/head
Henriette Dinger 5 years ago
parent a7bf4b1244
commit 0663aa19d5
  1. 3
      modules/bcf/app/controllers/bcf/issues_controller.rb
  2. 2
      modules/bcf/app/views/bcf/issues/configure_invalid_people.html.erb
  3. 4
      modules/bcf/app/views/bcf/issues/configure_non_members.html.erb
  4. 4
      modules/bcf/app/views/bcf/issues/configure_unknown_mails.html.erb
  5. 2
      modules/bcf/app/views/bcf/issues/configure_unknown_priorities.html.erb
  6. 2
      modules/bcf/app/views/bcf/issues/configure_unknown_statuses.html.erb
  7. 2
      modules/bcf/app/views/bcf/issues/configure_unknown_types.html.erb
  8. 2
      modules/bcf/app/views/bcf/issues/diff_on_work_packages.html.erb
  9. 22
      modules/bcf/app/views/bcf/issues/perform_import.html.erb
  10. 2
      modules/bcf/app/views/bcf/issues/upload.html.erb
  11. 6
      modules/bcf/config/locales/en.yml
  12. 2
      modules/bcf/config/locales/js-en.yml

@ -81,7 +81,6 @@ module ::Bcf
@issues[:successful] << issue
end
end
redirect_to project_work_packages_bcf_issues_path(@project)
rescue StandardError => e
flash[:error] = I18n.t('bcf.bcf_xml.import_failed', error: e.message)
end
@ -98,7 +97,7 @@ module ::Bcf
unknown_mails_action
non_members_action].map { |key| params.dig(:import_options, key) }.include? 'cancel'
flash[:notice] = I18n.t('bcf.bcf_xml.import_canceled')
redirect_to action: :index
redirect_to project_work_packages_bcf_issues_path(@project)
end
end

@ -27,7 +27,7 @@
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>

@ -42,14 +42,14 @@
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% else %>
<p>
<%= I18n.t('text_no_roles_defined') %>
</p>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>
<% end %>

@ -49,14 +49,14 @@
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% else %>
<p>
<%= I18n.t('text_no_roles_defined') %>
</p>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>
<% end %>

@ -32,7 +32,7 @@
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>

@ -32,7 +32,7 @@
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>

@ -32,7 +32,7 @@
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>

@ -65,7 +65,7 @@
<p><%= t('bcf.bcf_xml.import.perform_description') %></p>
<%= submit_tag t('bcf.bcf_xml.import.button_perform_import'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>

@ -1,13 +1,21 @@
<%= stylesheet_link_tag 'bcf/bcf.css' %>
<link rel="stylesheet" href="/highlighting/styles.css" />
<h3>Failed imports of BCF topics</h3>
<%= render partial: 'render_issues', locals: { issues: @issues[:failed] } %>
<p></p>
<h3>Successfully imported BCF topics</h3>
<%= render partial: 'render_issues', locals: { issues: @issues[:successful] } %>
<p></p>
<hr class="form--separator" />
<%= toolbar title: l(:label_summary) %>
<%= link_to t('bcf.bcf_xml.import.button_back_to_list'),
project_work_packages_bcf_issues_path(@project),
class: 'button -highlight' %>
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"><%= I18n.t('bcf.label_imported_successfully') %></legend>
<%= render partial: 'render_issues', locals: { issues: @issues[:successful] } %>
</fieldset>
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"><%= I18n.t('bcf.label_imported_failed') %></legend>
<%= render partial: 'render_issues', locals: { issues: @issues[:failed] } %>
</fieldset>

@ -14,6 +14,6 @@
<%= submit_tag t('bcf.bcf_xml.import.button_prepare'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
{ action: :index },
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>

@ -2,6 +2,8 @@
en:
bcf:
label_bcf: 'BCF'
label_imported_failed: 'Failed imports of BCF topics'
label_imported_successfully: 'Successfully imported BCF topics'
issues: "Issues"
experimental_badge: "Experimental"
exceptions:
@ -14,8 +16,8 @@ en:
bcf_xml:
xml_file: 'BCF XML File'
import_title: 'Import from BCF file'
export: 'Export all to BCF-XML'
import_title: 'Import'
export: 'Export'
import_update_comment: '(Updated in BCF import)'
import_failed: 'Cannot import BCF file: %{error}'
import_successful: 'Imported %{count} BCF issues'

@ -3,7 +3,7 @@ en:
js:
bcf:
import: 'Import'
export: 'Export BCF-XML'
export: 'Export'
work_packages:
default_queries:
bcf: 'BCF issues'

Loading…
Cancel
Save