diff options
| author | Alban Peignier | 2016-11-20 17:14:15 +0100 |
|---|---|---|
| committer | Alban Peignier | 2016-11-20 17:14:15 +0100 |
| commit | b27bbee7fa921a4400fa6111cc78978bbee4fd4a (patch) | |
| tree | 3d231a359b6354ebb51a8c6a1cde06b2b9008c84 | |
| parent | 396ac1f09cd8c9675d8fc34e512b2a1ffeae3b86 (diff) | |
| download | chouette-core-b27bbee7fa921a4400fa6111cc78978bbee4fd4a.tar.bz2 | |
Prevent edit action on Referential. Should be managed by a policy. Refs #1998
| -rw-r--r-- | app/views/referentials/show.html.slim | 10 | ||||
| -rw-r--r-- | app/views/workbenches/show.html.slim | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim index 62fba47e1..94c463d74 100644 --- a/app/views/referentials/show.html.slim +++ b/app/views/referentials/show.html.slim @@ -37,19 +37,21 @@ h2 / - if @referential.api_keys.present? / h3.api_keys = t('.api_keys') - / + / / .api_keys.paginated_content / = paginated_content(@referential.api_keys, "api_keys/api_key") - content_for :sidebar do ul.actions - li = link_to t('referentials.actions.edit'), edit_referential_path(@referential), class: 'edit' + - unless @referential.archived? # FIXME + li = link_to t('referentials.actions.edit'), edit_referential_path(@referential), class: 'edit' li = link_to t('referentials.actions.destroy'), referential_path(@referential), method: :delete, data: {:confirm => t('referentials.actions.destroy_confirm')}, class: "remove" / li = link_to t('api_keys.actions.new'), new_referential_api_key_path(@referential), class: 'add' li = link_to t('referentials.actions.clone'), new_referential_path(from: @referential.id), class: 'add' br - h4 = t('.clean_up') + - unless @referential.archived? # FIXME + h4 = t('.clean_up') - == render 'clean' + == render 'clean' diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 06f64d3c4..2f9937452 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -50,7 +50,8 @@ ul.dropdown-menu li = link_to "Voir", referential_path(referential) - li = link_to "Editer", edit_referential_path(referential) + - unless referential.archived? # FIXME + li = link_to "Editer", edit_referential_path(referential) li = link_to "Cloner", new_referential_path(from: referential) |
