diff options
| author | Vlatka Pavisic | 2017-02-06 11:42:12 +0100 |
|---|---|---|
| committer | Vlatka Pavisic | 2017-02-07 11:25:29 +0100 |
| commit | d94b1271d147fdb5bbd1e616e116173198e858db (patch) | |
| tree | e1b5631e72e009ffd80fdf4e47159b2b11cd899e /app/views/access_links | |
| parent | 9c3095c20aaef122212ed71ce8818e3a18b13308 (diff) | |
| download | chouette-core-d94b1271d147fdb5bbd1e616e116173198e858db.tar.bz2 | |
Refs #2476 : Disable modification and deletion of resources from another referential; in progress
Diffstat (limited to 'app/views/access_links')
| -rw-r--r-- | app/views/access_links/show.html.slim | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/views/access_links/show.html.slim b/app/views/access_links/show.html.slim index a7e296dde..59f72a55f 100644 --- a/app/views/access_links/show.html.slim +++ b/app/views/access_links/show.html.slim @@ -2,7 +2,7 @@ .access_link_show = @map.to_html - + .summary p label = "#{@access_link.human_attribute_name('access_link_type')} : " @@ -44,12 +44,12 @@ p label = "#{@access_link.human_attribute_name('mobility_restricted_suitability')}: " - - if !@access_link.mobility_restricted_suitability.nil?) + - if !@access_link.mobility_restricted_suitability.nil? = t((@access_link.mobility_restricted_suitability == true).to_s) - else = t('unknown') - p + p label = "#{@access_link.human_attribute_name('stairs_availability')} : " - if !@access_link.stairs_availability.nil? = t((@access_link.stairs_availability == true).to_s) @@ -66,9 +66,11 @@ - content_for :sidebar do ul.actions li - = link_to t('access_links.actions.edit'), edit_referential_access_point_access_link_path(@referential, @access_link.access_point, @access_link), class: 'edit' + - if policy(@access_link).edit? + = link_to t('access_links.actions.edit'), edit_referential_access_point_access_link_path(@referential, @access_link.access_point, @access_link), class: 'edit' li - = link_to t('access_links.actions.destroy'), referential_access_point_access_link_path(@referential, @access_link.access_point, @access_link), method: :delete, data: {:confirm => t('access_links.actions.destroy_confirm')}, class: 'remove' + - if policy(@access_link).destroy? + = link_to t('access_links.actions.destroy'), referential_access_point_access_link_path(@referential, @access_link.access_point, @access_link), method: :delete, data: {:confirm => t('access_links.actions.destroy_confirm')}, class: 'remove' br - = creation_tag(@access_link)
\ No newline at end of file + = creation_tag(@access_link) |
