aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorRobert2017-12-07 08:08:11 +0100
committerRobert2017-12-07 20:53:43 +0100
commitb07c6d9c198c9417981a143b04698ff52db91024 (patch)
treec7a900c4dc0f663b04c74548a15296773bd88c25 /app/helpers
parent0bb71d8146126f4f2c53ca0c7145f0e7d5eaeda5 (diff)
downloadchouette-core-b07c6d9c198c9417981a143b04698ff52db91024.tar.bz2
Refs: #5198@1.5h; Specing the presence of the Modal Action Box
- verifying the visibility of the action box - no dynamic behavior of the action box is verified (yet?) - would need javascript execution - refactoring suggestions --> https://projects.af83.io/issues/5206
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/multiple_selection_toolbox_helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/helpers/multiple_selection_toolbox_helper.rb b/app/helpers/multiple_selection_toolbox_helper.rb
index 85294af6d..e0a1d2dd4 100644
--- a/app/helpers/multiple_selection_toolbox_helper.rb
+++ b/app/helpers/multiple_selection_toolbox_helper.rb
@@ -1,7 +1,11 @@
module MultipleSelectionToolboxHelper
# Box of links that floats at the bottom right of the page
- def multiple_selection_toolbox(actions)
+ # c.f. https://projects.af83.io/issues/5206
+ # #5206 method too long
+ def multiple_selection_toolbox(actions, collection_name:)
links = content_tag :ul do
+
+ # #5206 `if params[:controller]` mieux passer comme parametre si besoin
delete_path = nil
if params[:controller] = 'workbenches'
@@ -15,6 +19,7 @@ module MultipleSelectionToolboxHelper
method: :delete,
data: {
path: delete_path,
+ # #5206 Missing Translations
confirm: 'Etes-vous sûr(e) de vouloir effectuer cette action ?'
},
title: t("actions.#{action}")
@@ -33,7 +38,9 @@ module MultipleSelectionToolboxHelper
class: 'info-msg'
)
- content_tag :div, '', class: 'select_toolbox noselect' do
+ content_tag :div, '',
+ class: 'select_toolbox noselect',
+ id: "selected-#{collection_name}-action-box" do
links + label
end
end