diff options
| author | Teddy Wing | 2017-06-15 17:04:58 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-06-15 17:04:58 +0200 | 
| commit | 8e678905af6be3358069a9d51f7af88d3449f014 (patch) | |
| tree | 5239c7effdd735f57db9bfaad60e71e1ade4d197 | |
| parent | 4a67dc49135dc154078181155640a94afbb928f5 (diff) | |
| download | chouette-core-8e678905af6be3358069a9d51f7af88d3449f014.tar.bz2 | |
referentials/show.html.slim: Update `action_links` loop for Link#content
Now that the `Link` class no longer has a :name attribute, use the
:content attribute instead and get our delete button markup handling
from `ReferentialDecorator`.
TODO: This messes up the styles on this page as here there's a `<span>`
around the link text and in the tables there's no span.
Refs #3479
| -rw-r--r-- | app/views/referentials/show.html.slim | 18 | 
1 files changed, 5 insertions, 13 deletions
| diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim index 1bbf350b4..f3dcf6a69 100644 --- a/app/views/referentials/show.html.slim +++ b/app/views/referentials/show.html.slim @@ -27,19 +27,11 @@        /    span = t('actions.destroy')        /= leslinks.map { |l| link_to l.href, l.label }        - @referential.action_links.each do |link| -        - if link.method == :delete -          = link_to link.href, -              method: link.method, -              data: link.data, -              class: 'btn btn-primary' do -                span.fa.fa-trash -                span = t('actions.destroy') -        - else -          = link_to link.name, -              link.href, -              method: link.method, -              data: link.data, -              class: 'btn btn-primary' +        = link_to link.href, +            method: link.method, +            data: link.data, +            class: 'btn btn-primary' do +              = link.content  / PageContent  .page_content | 
