mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
Preserve task order from project sidebar in export-all file structure [SCI-2817]
This commit is contained in:
parent
08396b2101
commit
dc91be3749
1 changed files with 6 additions and 2 deletions
|
@ -91,9 +91,13 @@ class TeamZipExport < ZipExport
|
||||||
FileUtils.mkdir_p(experiment_path)
|
FileUtils.mkdir_p(experiment_path)
|
||||||
|
|
||||||
# Include all modules
|
# Include all modules
|
||||||
ex.my_modules.each_with_index do |my_module, mod_ind|
|
ex.my_modules.order(:workflow_order)
|
||||||
|
.each_with_index do |my_module, mod_ind|
|
||||||
|
|
||||||
|
mod_pos =
|
||||||
|
my_module.workflow_order == -1 ? '' : my_module.workflow_order
|
||||||
my_module_path = "#{experiment_path}/" \
|
my_module_path = "#{experiment_path}/" \
|
||||||
"#{to_filesystem_name(my_module.name)} (#{mod_ind})"
|
"#{mod_pos} #{to_filesystem_name(my_module.name)} (#{mod_ind})"
|
||||||
FileUtils.mkdir_p(my_module_path)
|
FileUtils.mkdir_p(my_module_path)
|
||||||
|
|
||||||
# Create upper directories for both elements
|
# Create upper directories for both elements
|
||||||
|
|
Loading…
Reference in a new issue