views: extract partial for the 'Avis' tab
This commit is contained in:
parent
aecb591e7c
commit
4422d989a6
2 changed files with 7 additions and 10 deletions
|
@ -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,11 +34,7 @@
|
||||||
= 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
|
||||||
|
|
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…
Add table
Reference in a new issue