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
|
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)
|
tab_item(label, url, active: current_page?(url), badge: badge, notification: notification)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
%li= "#{dossier.procedure.libelle}, dossier nº #{dossier.id}"
|
%li= "#{dossier.procedure.libelle}, dossier nº #{dossier.id}"
|
||||||
|
|
||||||
%ul.tabs
|
%ul.tabs
|
||||||
= active_tab_item('Demande', gestionnaire_avis_path(avis))
|
= dynamic_tab_item('Demande', gestionnaire_avis_path(avis))
|
||||||
= active_tab_item('Avis', instruction_gestionnaire_avis_path(avis), notification: avis.answer.blank?)
|
= dynamic_tab_item('Avis', instruction_gestionnaire_avis_path(avis), notification: avis.answer.blank?)
|
||||||
= active_tab_item('Messagerie', messagerie_gestionnaire_avis_path(avis))
|
= dynamic_tab_item('Messagerie', messagerie_gestionnaire_avis_path(avis))
|
||||||
|
|
|
@ -21,23 +21,23 @@
|
||||||
%ul.tabs
|
%ul.tabs
|
||||||
- notifications_summary = current_gestionnaire.notifications_for_dossier(dossier)
|
- notifications_summary = current_gestionnaire.notifications_for_dossier(dossier)
|
||||||
|
|
||||||
= active_tab_item('Demande',
|
= dynamic_tab_item('Demande',
|
||||||
gestionnaire_dossier_path(dossier.procedure, dossier),
|
gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:demande])
|
notification: notifications_summary[:demande])
|
||||||
|
|
||||||
= active_tab_item('Annotations privées',
|
= dynamic_tab_item('Annotations privées',
|
||||||
annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier),
|
annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:annotations_privees])
|
notification: notifications_summary[:annotations_privees])
|
||||||
|
|
||||||
= active_tab_item('Avis externes',
|
= dynamic_tab_item('Avis externes',
|
||||||
avis_gestionnaire_dossier_path(dossier.procedure, dossier),
|
avis_gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:avis])
|
notification: notifications_summary[:avis])
|
||||||
|
|
||||||
= active_tab_item('Messagerie',
|
= dynamic_tab_item('Messagerie',
|
||||||
messagerie_gestionnaire_dossier_path(dossier.procedure, dossier),
|
messagerie_gestionnaire_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:messagerie])
|
notification: notifications_summary[:messagerie])
|
||||||
|
|
||||||
= active_tab_item('Personnes impliquées',
|
= dynamic_tab_item('Personnes impliquées',
|
||||||
personnes_impliquees_gestionnaire_dossier_path(dossier.procedure, dossier))
|
personnes_impliquees_gestionnaire_dossier_path(dossier.procedure, dossier))
|
||||||
|
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
%h2 Dossier nº #{dossier.id}
|
%h2 Dossier nº #{dossier.id}
|
||||||
|
|
||||||
%ul.tabs
|
%ul.tabs
|
||||||
= active_tab_item('Résumé', dossier_path(dossier))
|
= dynamic_tab_item('Résumé', dossier_path(dossier))
|
||||||
= active_tab_item('Demande', demande_dossier_path(dossier))
|
= dynamic_tab_item('Demande', demande_dossier_path(dossier))
|
||||||
= active_tab_item('Messagerie', messagerie_dossier_path(dossier))
|
= dynamic_tab_item('Messagerie', messagerie_dossier_path(dossier))
|
||||||
|
|
Loading…
Reference in a new issue