add the possibility for administrator to refuse external review on a specific procedure
This commit is contained in:
parent
1ba85e6080
commit
57adb90c8f
8 changed files with 52 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
module NewAdministrateur
|
||||
class ProceduresController < AdministrateurController
|
||||
before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert]
|
||||
before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :allow_expert_review]
|
||||
before_action :procedure_locked?, only: [:champs, :annotations]
|
||||
|
||||
ITEMS_PER_PAGE = 25
|
||||
|
@ -158,6 +158,12 @@ module NewAdministrateur
|
|||
def transfert
|
||||
end
|
||||
|
||||
def allow_expert_review
|
||||
@procedure.update!(allow_expert_review: !@procedure.allow_expert_review)
|
||||
flash.notice = @procedure.allow_expert_review? ? "Avis externes activés" : "Avis externes désactivés"
|
||||
redirect_to admin_procedure_path(@procedure)
|
||||
end
|
||||
|
||||
def transfer
|
||||
admin = Administrateur.by_email(params[:email_admin].downcase)
|
||||
if admin.nil?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue