Admins can see the list of invited experts
This commit is contained in:
parent
2b06ee95e1
commit
8f6440f615
6 changed files with 95 additions and 2 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, :allow_expert_review]
|
||||
before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :allow_expert_review, :invited_expert_list]
|
||||
before_action :procedure_locked?, only: [:champs, :annotations]
|
||||
|
||||
ITEMS_PER_PAGE = 25
|
||||
|
@ -185,6 +185,11 @@ module NewAdministrateur
|
|||
end
|
||||
end
|
||||
|
||||
def invited_expert_list
|
||||
@invited_expert_emails = Avis.invited_expert_emails(@procedure)
|
||||
redirect_to admin_procedure_path(@procedure) if @invited_expert_emails.blank?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def apercu_tab
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
.container
|
||||
%h1.mt-2 Experts invités sur #{@procedure.libelle}
|
||||
%table.table.mt-2
|
||||
%thead
|
||||
%tr
|
||||
%th Liste des experts
|
||||
%tbody
|
||||
- @invited_expert_emails.each do |expert|
|
||||
%tr
|
||||
%td= expert
|
|
@ -156,6 +156,20 @@
|
|||
.card-admin-action
|
||||
= link_to "#{@procedure.allow_expert_review? ? 'Désactiver' : 'Activer'}", allow_expert_review_admin_procedure_path(@procedure), method: :put, class: 'button'
|
||||
|
||||
- if @procedure.allow_expert_review?
|
||||
.card-admin
|
||||
%div
|
||||
%span.icon.preview
|
||||
%p.card-admin-status-todo À voir
|
||||
|
||||
%div
|
||||
%p.card-admin-title Liste des experts
|
||||
%p.card-admin-subtitle Liste des experts invités par les instructeurs
|
||||
|
||||
.card-admin-action
|
||||
= link_to "Voir", invited_expert_list_admin_procedure_path(@procedure), class: 'button'
|
||||
|
||||
|
||||
.card-admin
|
||||
%div
|
||||
%span.icon.clock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue