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