diff options
| author | jpl | 2017-02-02 17:57:25 +0100 | 
|---|---|---|
| committer | jpl | 2017-02-02 17:57:25 +0100 | 
| commit | f927afeb4fae68dea8bf621136f2708671d0e18e (patch) | |
| tree | 48d29795e6332284e9a0c8106218201b8ed4a973 /app/helpers/newapplication_helper.rb | |
| parent | bf02d526bd98f2e420b3e07fcc98e10b8ef409ce (diff) | |
| download | chouette-core-f927afeb4fae68dea8bf621136f2708671d0e18e.tar.bz2 | |
Refs #2482: upd/fix for table builder
Diffstat (limited to 'app/helpers/newapplication_helper.rb')
| -rw-r--r-- | app/helpers/newapplication_helper.rb | 18 | 
1 files changed, 15 insertions, 3 deletions
| diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index aadfc0b34..eee833562 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -53,7 +53,7 @@ module NewapplicationHelper          end          unless item.class.to_s == 'Calendar' or item.class.to_s == 'Referential' -          if item.respond_to? :current_referential +          if current_referential              polymorph_url << current_referential              polymorph_url << item.line if item.respond_to? :line            elsif item.respond_to? :referential @@ -68,10 +68,22 @@ module NewapplicationHelper          if action == :delete            if policy(item).present?              if policy(item).destroy? -              content_tag :li, link_to(t("table.#{action}"), polymorph_url, method: :delete, data: { confirm: 'Etes-vous sûr(e) de vouloir effectuer cette action ?' }) +              content_tag :li, '', class: 'delete-action' do +                link_to(polymorph_url, method: :delete, data: { confirm: 'Etes-vous sûr(e) de vouloir effectuer cette action ?' }) do +                  txt = t("table.#{action}") +                  pic = content_tag :span, '', class: 'fa fa-trash' +                  pic + txt +                end +              end              end            else -            content_tag :li, link_to(t("table.#{action}"), polymorph_url, method: :delete, data: { confirm: 'Etes-vous sûr(e) de vouloir effectuer cette action ?' }) +            content_tag :li, '', class: 'delete-action' do +              link_to(polymorph_url, method: :delete, data: { confirm: 'Etes-vous sûr(e) de vouloir effectuer cette action ?' }) do +                txt = t("table.#{action}") +                pic = content_tag :span, '', class: 'fa fa-trash' +                pic + txt +              end +            end            end          elsif action == :edit | 
