From efb4e0c54929338ab2a36f29903cc49656fa4049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Zrim=C5=A1ek?= Date: Thu, 8 Nov 2018 21:01:09 +0100 Subject: [PATCH] Change indexing in task names in export-all PDF [SCI-2817] --- app/models/team_zip_export.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/team_zip_export.rb b/app/models/team_zip_export.rb index aa6ebe8c0..4c955cd6e 100644 --- a/app/models/team_zip_export.rb +++ b/app/models/team_zip_export.rb @@ -92,12 +92,10 @@ class TeamZipExport < ZipExport # Include all modules ex.my_modules.order(:workflow_order) - .each_with_index do |my_module, mod_ind| + .each_with_index do |my_module, mod_pos| - mod_pos = - my_module.workflow_order == -1 ? '' : my_module.workflow_order my_module_path = "#{experiment_path}/" \ - "#{mod_pos} #{to_filesystem_name(my_module.name)} (#{mod_ind})" + "(#{mod_pos}) #{to_filesystem_name(my_module.name)}" FileUtils.mkdir_p(my_module_path) # Create upper directories for both elements