Merge pull request #6315 from betagouv/show-avis-tab-on-all-profiles

Experts : l'onglet "Avis" est maintenant visible quel que soit le profil (#6315)
This commit is contained in:
Pierre de La Morinerie 2021-07-06 09:02:14 +02:00 committed by GitHub
commit d23740689f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View file

@ -25,11 +25,7 @@
%li %li
= active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link' = active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
- if current_instructeur.user.expert && current_expert.avis_summary[:total] > 0 - if current_instructeur.user.expert && current_expert.avis_summary[:total] > 0
%li = render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
= active_link_to expert_all_avis_path, active: controller_name == 'avis', class: 'tab-link' do
Avis
- if current_expert.avis_summary[:unanswered] > 0
%span.badge.warning= current_expert.avis_summary[:unanswered]
- if nav_bar_profile == :expert && expert_signed_in? - if nav_bar_profile == :expert && expert_signed_in?
%ul.header-tabs %ul.header-tabs
@ -38,16 +34,14 @@
= active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link' = active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
- if current_expert.avis_summary[:total] > 0 - if current_expert.avis_summary[:total] > 0
%li = render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
= active_link_to expert_all_avis_path, active: controller_name == 'avis', class: 'tab-link' do
Avis
- if current_expert.avis_summary[:unanswered] > 0
%span.badge.warning= current_expert.avis_summary[:unanswered]
- if nav_bar_profile == :user - if nav_bar_profile == :user
%ul.header-tabs %ul.header-tabs
%li %li
= active_link_to "Dossiers", dossiers_path, active: :inclusive, class: 'tab-link' = active_link_to "Dossiers", dossiers_path, active: :inclusive, class: 'tab-link'
- if current_user.expert && current_expert.avis_summary[:total] > 0
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
%ul.header-right-content %ul.header-right-content
- if params[:controller] == 'recherche' - if params[:controller] == 'recherche'

View file

@ -0,0 +1,5 @@
%li
= active_link_to expert_all_avis_path, active: controller_name == 'avis', class: 'tab-link' do
Avis
- if current_expert.avis_summary[:unanswered] > 0
%span.badge.warning= current_expert.avis_summary[:unanswered]