From 38172106498c150ccbc4135e40d8b168f618051f Mon Sep 17 00:00:00 2001 From: kara Diaby Date: Thu, 11 Feb 2021 20:23:11 +0100 Subject: [PATCH] layout --- app/assets/stylesheets/procedure_form.scss | 4 +++ .../procedures/invited_expert_list.html.haml | 28 ++++++++++++++++--- .../procedures/show.html.haml | 2 +- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/procedure_form.scss b/app/assets/stylesheets/procedure_form.scss index e5b9b750a..fff8e74e4 100644 --- a/app/assets/stylesheets/procedure_form.scss +++ b/app/assets/stylesheets/procedure_form.scss @@ -23,6 +23,10 @@ flex: 10; padding: 0 $default-padding; background-color: $light-grey; + + &.no-background { + background-color: transparent; + } } .procedure-form__column--preview { diff --git a/app/views/new_administrateur/procedures/invited_expert_list.html.haml b/app/views/new_administrateur/procedures/invited_expert_list.html.haml index 6c1b82e64..d783e8caf 100644 --- a/app/views/new_administrateur/procedures/invited_expert_list.html.haml +++ b/app/views/new_administrateur/procedures/invited_expert_list.html.haml @@ -1,16 +1,36 @@ += render partial: 'new_administrateur/breadcrumbs', + locals: { steps: [link_to('Démarches', admin_procedures_path), + link_to(@procedure.libelle, admin_procedure_path(@procedure)), + 'Liste des experts'] } + .container - %h1.mt-2 Experts invités sur #{@procedure.libelle} - - if @invited_expert_emails.present? + %h1.page-title.mt-2 Experts invités sur #{@procedure.libelle} + - if @experts_procedure.present? %table.table.mt-2 %thead %tr %th Liste des experts + - if feature_enabled_for?(:make_experts_notifiable, @procedure) + %th Notifier des décisions sur les dossiers %tbody - - @invited_expert_emails.each do |expert| + - @experts_procedure.each do |expert_procedure| %tr %td %span.icon.person - = expert + = expert_procedure.expert.email + - if feature_enabled_for?(:make_experts_notifiable, @procedure) + %td + = form_for expert_procedure, + url: admin_procedure_update_allow_decision_access_path(expert_procedure: expert_procedure), + remote: true, + method: :put, + authenticity_token: true, + html: { class: 'form procedure-form__column--form no-background' } do |f| + %label.toggle-switch + = f.check_box :allow_decision_access, class: 'toggle-switch-checkbox', onchange: 'this.form.submit()' + %span.toggle-switch-control.round + %span.toggle-switch-label.on + %span.toggle-switch-label.off - else .blank-tab %h2.empty-text Aucun expert invité pour le moment. diff --git a/app/views/new_administrateur/procedures/show.html.haml b/app/views/new_administrateur/procedures/show.html.haml index 834fe6adf..83a5ca28f 100644 --- a/app/views/new_administrateur/procedures/show.html.haml +++ b/app/views/new_administrateur/procedures/show.html.haml @@ -167,7 +167,7 @@ %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' + = link_to "Voir", admin_procedure_invited_expert_list_path(@procedure), class: 'button' .card-admin