From 49a472835bf5bfe57c711dfd20b8e1a44afd6264 Mon Sep 17 00:00:00 2001 From: jpl Date: Wed, 1 Mar 2017 17:16:15 +0100 Subject: Refs #2623: updating selectable_table component, with js params injection to url --- app/helpers/newapplication_helper.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/helpers/newapplication_helper.rb') diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index 49b717beb..fcb5d26a3 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -175,11 +175,12 @@ module NewapplicationHelper def select_toolbox(actions) tools = content_tag :ul do actions.collect do |action| - - actitem = link_to '#', title: t("actions.#{action}") do - if action == :edit + if action == :edit + actitem = link_to('#', title: t("actions.#{action}")) do content_tag :span, '', class: 'fa fa-pencil' - elsif action == :delete + end + elsif action == :delete + actitem = link_to('#', method: :delete, data: { path: referentials_workbench_path, confirm: 'Etes-vous sûr(e) de vouloir effectuer cette action ?' }, title: t("actions.#{action}")) do content_tag :span, '', class: 'fa fa-trash' end end -- cgit v1.2.3