diff options
| author | jpl | 2017-03-01 17:47:39 +0100 |
|---|---|---|
| committer | jpl | 2017-03-01 17:47:51 +0100 |
| commit | eafa377e1340ec7d60df463942c774e0f1addf27 (patch) | |
| tree | 7cea5ed307758e99cb3e18ce580b6f8c5a79ce95 | |
| parent | 5e350204ba6da50c78cf82e652b76698a852fde2 (diff) | |
| download | chouette-core-eafa377e1340ec7d60df463942c774e0f1addf27.tar.bz2 | |
Fix tests
| -rw-r--r-- | app/helpers/newapplication_helper.rb | 5 | ||||
| -rw-r--r-- | app/views/lines/index.html.slim | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index fcb5d26a3..2151f47b2 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -174,13 +174,16 @@ module NewapplicationHelper # Actions on select toolbox (for selectables tables) def select_toolbox(actions) tools = content_tag :ul do + dPath = nil + dPath = referentials_workbench_path if params[:controller] = 'workbenches' + actions.collect do |action| if action == :edit actitem = link_to('#', title: t("actions.#{action}")) do content_tag :span, '', class: 'fa fa-pencil' 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 + actitem = link_to('#', method: :delete, data: { path: dPath, 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 diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim index 056733a55..90a2168d9 100644 --- a/app/views/lines/index.html.slim +++ b/app/views/lines/index.html.slim @@ -35,8 +35,8 @@ @lines.human_attribute_name(:company) => Proc.new { |n| n.try(:company).try(:name) }, @lines.human_attribute_name(:transport_mode) => Proc.new { |n| n.transport_mode.nil? ? '-' : t("enumerize.line.transport_mode.#{n.try(:transport_mode)}") }, @lines.human_attribute_name(:transport_submode) => Proc.new { |n| n.transport_submode.nil? ? '-' : t("enumerize.line.transport_submode.#{n.try(:transport_submode)}") } }, - [:show], - [:delete], + [:show, :delete], + [], 'table' = new_pagination @lines, 'pull-right' |
