diff options
| -rw-r--r-- | app/decorators/company_decorator.rb | 9 | ||||
| -rw-r--r-- | app/views/companies/index.html.slim | 2 | ||||
| -rw-r--r-- | app/views/referential_companies/index.html.slim | 2 |
3 files changed, 3 insertions, 10 deletions
diff --git a/app/decorators/company_decorator.rb b/app/decorators/company_decorator.rb index 9416c73ae..50b82d276 100644 --- a/app/decorators/company_decorator.rb +++ b/app/decorators/company_decorator.rb @@ -18,13 +18,6 @@ class CompanyDecorator < Draper::Decorator def action_links links = [] - if h.policy(Chouette::Company).create? - links << Link.new( - content: h.t('companies.actions.new'), - href: h.new_line_referential_company_path(context[:referential]) - ) - end - if h.policy(object).update? links << Link.new( content: h.t('companies.actions.edit'), @@ -37,7 +30,7 @@ class CompanyDecorator < Draper::Decorator if h.policy(object).destroy? links << Link.new( - content: t('companies.actions.destroy'), + content: h.destroy_link_content('companies.actions.destroy'), href: h.line_referential_company_path( context[:referential], object diff --git a/app/views/companies/index.html.slim b/app/views/companies/index.html.slim index 5d746642f..e031f3776 100644 --- a/app/views/companies/index.html.slim +++ b/app/views/companies/index.html.slim @@ -34,7 +34,7 @@ end \ ) \ ], - links: [:show, :edit], + links: [:show], cls: 'table has-search' = new_pagination @companies, 'pull-right' diff --git a/app/views/referential_companies/index.html.slim b/app/views/referential_companies/index.html.slim index de0f7de69..07de2bc9d 100644 --- a/app/views/referential_companies/index.html.slim +++ b/app/views/referential_companies/index.html.slim @@ -46,7 +46,7 @@ attribute: 'url' \ ) \ ], - links: [:show, :edit], + links: [:show], cls: 'table has-search' = new_pagination @companies, 'pull-right' |
