diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-09 07:40:06 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-09 07:40:06 +0000 |
commit | b540046ed7084ba50f5ca280f3ffae0751af8142 (patch) | |
tree | 4bc946090d4940a219e84f70ca72c5655de5be42 /app/views/imports/mapping.html.erb | |
parent | bcc60805c97104f44a37b92321d7aa1e5c51b622 (diff) | |
download | redmine-b540046ed7084ba50f5ca280f3ffae0751af8142.tar.gz redmine-b540046ed7084ba50f5ca280f3ffae0751af8142.zip |
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
Diffstat (limited to 'app/views/imports/mapping.html.erb')
-rw-r--r-- | app/views/imports/mapping.html.erb | 23 |
1 files changed, 3 insertions, 20 deletions
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 @@ -<h2><%= l(:label_import_issues) %></h2> +<h2><%= import_title %></h2> <%= form_tag(import_mapping_path(@import), :id => "import-form") do %> - <fieldset class="box tabular"> - <legend><%= l(:label_fields_mapping) %></legend> - <div id="fields-mapping"> - <%= render :partial => 'fields_mapping' %> - </div> - </fieldset> + <%= render :partial => "#{import_partial_prefix}_mapping" %> <div class="autoscroll"> <fieldset class="box"> @@ -28,25 +23,13 @@ </p> <% 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 %> |