active_tab_item → dynamic_tab_item
This commit is contained in:
parent
3604ee5453
commit
59e809f029
4 changed files with 12 additions and 12 deletions
|
@ -9,7 +9,7 @@ module TabsHelper
|
|||
}
|
||||
end
|
||||
|
||||
def active_tab_item(label, url, badge: nil, notification: false)
|
||||
def dynamic_tab_item(label, url, badge: nil, notification: false)
|
||||
tab_item(label, url, active: current_page?(url), badge: badge, notification: notification)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
%li= "#{dossier.procedure.libelle}, dossier nº #{dossier.id}"
|
||||
|
||||
%ul.tabs
|
||||
= active_tab_item('Demande', gestionnaire_avis_path(avis))
|
||||
= active_tab_item('Avis', instruction_gestionnaire_avis_path(avis), notification: avis.answer.blank?)
|
||||
= active_tab_item('Messagerie', messagerie_gestionnaire_avis_path(avis))
|
||||
= dynamic_tab_item('Demande', gestionnaire_avis_path(avis))
|
||||
= dynamic_tab_item('Avis', instruction_gestionnaire_avis_path(avis), notification: avis.answer.blank?)
|
||||
= dynamic_tab_item('Messagerie', messagerie_gestionnaire_avis_path(avis))
|
||||
|
|
|
@ -21,23 +21,23 @@
|
|||
%ul.tabs
|
||||
- notifications_summary = current_gestionnaire.notifications_for_dossier(dossier)
|
||||
|
||||
= active_tab_item('Demande',
|
||||
= dynamic_tab_item('Demande',
|
||||
gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:demande])
|
||||
|
||||
= active_tab_item('Annotations privées',
|
||||
= dynamic_tab_item('Annotations privées',
|
||||
annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:annotations_privees])
|
||||
|
||||
= active_tab_item('Avis externes',
|
||||
= dynamic_tab_item('Avis externes',
|
||||
avis_gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:avis])
|
||||
|
||||
= active_tab_item('Messagerie',
|
||||
= dynamic_tab_item('Messagerie',
|
||||
messagerie_gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||
notification: notifications_summary[:messagerie])
|
||||
|
||||
= active_tab_item('Personnes impliquées',
|
||||
= dynamic_tab_item('Personnes impliquées',
|
||||
personnes_impliquees_gestionnaire_dossier_path(dossier.procedure, dossier))
|
||||
|
||||
.container
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
%h2 Dossier nº #{dossier.id}
|
||||
|
||||
%ul.tabs
|
||||
= active_tab_item('Résumé', dossier_path(dossier))
|
||||
= active_tab_item('Demande', demande_dossier_path(dossier))
|
||||
= active_tab_item('Messagerie', messagerie_dossier_path(dossier))
|
||||
= dynamic_tab_item('Résumé', dossier_path(dossier))
|
||||
= dynamic_tab_item('Demande', demande_dossier_path(dossier))
|
||||
= dynamic_tab_item('Messagerie', messagerie_dossier_path(dossier))
|
||||
|
|
Loading…
Reference in a new issue