diff options
Diffstat (limited to 'app/views/routes/_route.html.slim')
| -rw-r--r-- | app/views/routes/_route.html.slim | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/app/views/routes/_route.html.slim b/app/views/routes/_route.html.slim index 251c92000..e273bfcfd 100644 --- a/app/views/routes/_route.html.slim +++ b/app/views/routes/_route.html.slim @@ -2,11 +2,13 @@    .panel-heading      .panel-title.clearfix        .btn-group.btn-group-sm.pull-right -        = link_to edit_referential_line_route_path(@referential, @line, route), class: 'btn btn-default' do -          span.fa.fa-pencil +        - if policy(route).edit? +          = link_to edit_referential_line_route_path(@referential, @line, route), class: 'btn btn-default' do +            span.fa.fa-pencil -        = link_to referential_line_route_path(@referential, @line, route), method: :delete, :data => {:confirm =>  t('routes.actions.destroy_confirm')}, class: 'btn btn-danger' do -          span.fa.fa-trash-o +        - if policy(route).destroy? +          = link_to referential_line_route_path(@referential, @line, route), method: :delete, :data => {:confirm =>  t('routes.actions.destroy_confirm')}, class: 'btn btn-danger' do +            span.fa.fa-trash-o        h5          = link_to [@referential, @line, route], class: 'preview', title: "#{Chouette::Route.model_name.human.capitalize} #{route.name}" do  | 
