diff options
| author | Robert | 2017-12-07 08:08:11 +0100 |
|---|---|---|
| committer | Robert | 2017-12-07 20:53:43 +0100 |
| commit | b07c6d9c198c9417981a143b04698ff52db91024 (patch) | |
| tree | c7a900c4dc0f663b04c74548a15296773bd88c25 /app | |
| parent | 0bb71d8146126f4f2c53ca0c7145f0e7d5eaeda5 (diff) | |
| download | chouette-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')
| -rw-r--r-- | app/helpers/multiple_selection_toolbox_helper.rb | 11 | ||||
| -rw-r--r-- | app/views/workbenches/show.html.slim | 2 |
2 files changed, 10 insertions, 3 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 diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 22869b2d7..af312fc08 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -61,7 +61,7 @@ links: [:show, :edit], cls: 'table has-filter has-search' - = multiple_selection_toolbox([:delete]) + = multiple_selection_toolbox([:delete], collection_name: 'referentials') = new_pagination @wbench_refs, 'pull-right' |
