From 35a13e6297fad7584567a2308d2b8672e50f78c7 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 24 Sep 2021 09:46:24 +0200 Subject: [PATCH] ID column in front of title column for expandable folders --- app/helpers/dmsf_queries_helper.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/helpers/dmsf_queries_helper.rb b/app/helpers/dmsf_queries_helper.rb index a0f79ad4..1b212ab4 100644 --- a/app/helpers/dmsf_queries_helper.rb +++ b/app/helpers/dmsf_queries_helper.rb @@ -113,7 +113,13 @@ module DmsfQueriesHelper tag = content_tag('span', tag, class: 'icon icon-folder') end unless filter_any? - tag = "".html_safe + tag + path = expand_folder_dmsf_path + columns = params['c'] + if columns.present? + path << '?' + path << columns.map{ |column| "c[]=#{column}" }.join('&') + end + tag = "".html_safe + tag tag = content_tag('div', tag, class: 'row-control dmsf-row-control') end tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download)) @@ -123,7 +129,13 @@ module DmsfQueriesHelper else tag = link_to(h(value), dmsf_folder_path(id: item.project, folder_id: item.id), class: 'icon icon-folder') unless filter_any? - tag = "".html_safe + tag + path = expand_folder_dmsf_path + columns = params['c'] + if columns.present? + path << '?' + path << columns.map{ |column| "c[]=#{column}" }.join('&') + end + tag = "".html_safe + tag tag = content_tag('div', tag, class: 'row-control dmsf-row-control') end end