Abstract the Procedure whitelisting
This commit is contained in:
parent
4f2ac6ac2e
commit
608a8eaf67
2 changed files with 5 additions and 1 deletions
|
@ -147,6 +147,10 @@ class Procedure < ActiveRecord::Base
|
||||||
publiee? || archivee?
|
publiee? || archivee?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def whitelisted?
|
||||||
|
whitelisted_at.present?
|
||||||
|
end
|
||||||
|
|
||||||
def total_dossier
|
def total_dossier
|
||||||
self.dossiers.state_not_brouillon.size
|
self.dossiers.state_not_brouillon.size
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
%header.header
|
%header.header
|
||||||
%h1.header__heading= content_for(:title)
|
%h1.header__heading= content_for(:title)
|
||||||
.header__actions
|
.header__actions
|
||||||
- if procedure.whitelisted_at.nil?
|
- if !procedure.whitelisted?
|
||||||
= link_to 'whitelister', manager_procedure_whitelist_path(procedure), method: :post, class: 'button'
|
= link_to 'whitelister', manager_procedure_whitelist_path(procedure), method: :post, class: 'button'
|
||||||
|
|
||||||
%dl
|
%dl
|
||||||
|
|
Loading…
Reference in a new issue