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:
commit
d23740689f
2 changed files with 9 additions and 10 deletions
|
@ -25,11 +25,7 @@
|
|||
%li
|
||||
= 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
|
||||
%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]
|
||||
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
|
||||
|
||||
- if nav_bar_profile == :expert && expert_signed_in?
|
||||
%ul.header-tabs
|
||||
|
@ -38,16 +34,14 @@
|
|||
= active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
|
||||
|
||||
- if current_expert.avis_summary[:total] > 0
|
||||
%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]
|
||||
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
|
||||
|
||||
- if nav_bar_profile == :user
|
||||
%ul.header-tabs
|
||||
%li
|
||||
= 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
|
||||
- if params[:controller] == 'recherche'
|
||||
|
|
5
app/views/layouts/header/_avis_tab.html.haml
Normal file
5
app/views/layouts/header/_avis_tab.html.haml
Normal 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]
|
Loading…
Reference in a new issue