aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/referentials
diff options
context:
space:
mode:
authorRobert2018-01-09 12:24:23 +0100
committerRobert2018-01-09 12:24:36 +0100
commit0e91d206fd8278d0c43c34777f4a585481882b70 (patch)
tree9ef641b3455de5d6da2c22ffb702661e4e69ff8d /app/views/referentials
parent7ea0a6079017c561aa8286198bd77b258cb2d240 (diff)
downloadchouette-core-0e91d206fd8278d0c43c34777f4a585481882b70.tar.bz2
Refs: #5413@0.5h; Refactoring of #archived_or_finalised?
Diffstat (limited to 'app/views/referentials')
-rw-r--r--app/views/referentials/show.html.slim6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index 889ea7ad1..51041198c 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -1,7 +1,7 @@
- breadcrumb @referential
- page_header_content_for @referential
- content_for :page_header_actions do
- - unless (@referential.archived_or_finalised? || !policy(@referential).edit?)
+ - unless (@referential.referential_read_only? || !policy(@referential).edit?)
= link_to(t('actions.edit'), edit_referential_path(@referential), class: 'btn btn-default')
- content_for :page_header_content do
@@ -22,7 +22,7 @@
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
- { t('activerecord.attributes.referential.status') => @referential.archived_or_finalised? ? "<div class='td-block'><span class='fa fa-archive'></span><span>#{t('activerecord.attributes.referential.archived_at')}</span></div>".html_safe : "<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>#{t('activerecord.attributes.referential.archived_at_null')}</span></div>".html_safe,
+ { t('activerecord.attributes.referential.status') => @referential.referential_read_only? ? "<div class='td-block'><span class='fa fa-archive'></span><span>#{t('activerecord.attributes.referential.archived_at')}</span></div>".html_safe : "<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>#{t('activerecord.attributes.referential.archived_at_null')}</span></div>".html_safe,
@referential.human_attribute_name(:validity_period) => (@referential.validity_period.present? ? t('validity_range', debut: l(@referential.try(:validity_period).try(:begin), format: :short), end: l(@referential.try(:validity_period).try(:end), format: :short)) : '-'),
@referential.human_attribute_name(:organisation) => @referential.organisation.name,
@referential.human_attribute_name(:published_at) => '-' }
@@ -102,5 +102,5 @@
.modal-footer
button.btn.btn-link type='button' data-dismiss='modal' #{t('cancel')}
- - unless policy(@referential).archived_or_finalised?
+ - unless policy(@referential).referential_read_only?
= f.button :submit, t('actions.clean_up') , class: 'btn btn-primary'