From b540046ed7084ba50f5ca280f3ffae0751af8142 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 9 May 2019 07:40:06 +0000 Subject: Generalize issues imports (#28234). Extend import controller to support arbitrary imports based on Import subclasses. This way, we may add other kinds of imports, by providing some views and a custom import class. This may also be done from within plugins. Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@18145 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/imports/mapping.html.erb | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'app/views/imports/mapping.html.erb') diff --git a/app/views/imports/mapping.html.erb b/app/views/imports/mapping.html.erb index 2e225d6c2..1822f2802 100644 --- a/app/views/imports/mapping.html.erb +++ b/app/views/imports/mapping.html.erb @@ -1,12 +1,7 @@ -

<%= l(:label_import_issues) %>

+

<%= import_title %>

<%= form_tag(import_mapping_path(@import), :id => "import-form") do %> -
- <%= l(:label_fields_mapping) %> -
- <%= render :partial => 'fields_mapping' %> -
-
+ <%= render :partial => "#{import_partial_prefix}_mapping" %>
@@ -28,25 +23,13 @@

<% end %> -<% content_for :sidebar do %> - <%= render :partial => 'issues/sidebar' %> -<% end %> - +<%= render :partial => "#{import_partial_prefix}_sidebar" %> <%= javascript_tag do %> $(document).ready(function() { - $('#fields-mapping').on('change', '#import_mapping_project_id, #import_mapping_tracker', function(){ - $.ajax({ - url: '<%= import_mapping_path(@import, :format => 'js') %>', - type: 'post', - data: $('#import-form').serialize() - }); - }); - $('#import-form').submit(function(){ $('#import-details').show().addClass('ajax-loading'); $('#import-progress').progressbar({value: 0, max: <%= @import.total_items || 0 %>}); }); - }); <% end %> -- cgit v1.2.3