diff options
| author | teddywing | 2017-12-08 17:31:07 +0100 |
|---|---|---|
| committer | GitHub | 2017-12-08 17:31:07 +0100 |
| commit | 579e404e3171dd35268b03cf392f4e4f705036e8 (patch) | |
| tree | 59889c723605af236fc8c0f023b13ad14d2296c3 /app | |
| parent | 8680f61e8bd0a9cde4b3fa5d438fc86476daae56 (diff) | |
| parent | b07c6d9c198c9417981a143b04698ff52db91024 (diff) | |
| download | chouette-core-579e404e3171dd35268b03cf392f4e4f705036e8.tar.bz2 | |
Merge pull request #142 from af83/5198-workbench-view-spec-modal-action-box
Refs: #5198@1.5h; Specing the presence of the Modal Action Box
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' |
