2017-06-22 14:56:59 +02:00
|
|
|
.new-header{ class: current_page?(root_path) ? nil : "new-header-with-border" }
|
2017-04-04 14:37:16 +02:00
|
|
|
.header-inner-content
|
2017-07-03 16:01:44 +02:00
|
|
|
|
|
|
|
.flex.align-center
|
2017-09-19 15:31:31 +02:00
|
|
|
-# TODO delete new_ui when old UI is no longer used
|
|
|
|
= link_to root_path(new_ui: 1), class: "header-logo" do
|
2017-07-03 16:01:44 +02:00
|
|
|
%img{ src: image_url("header/logo-tps.svg") }
|
|
|
|
|
|
|
|
- if gestionnaire_signed_in?
|
2017-08-28 10:46:27 +02:00
|
|
|
%ul.header-tabs
|
2017-07-03 16:01:44 +02:00
|
|
|
%li
|
|
|
|
= link_to "Procédures", procedures_path, class: "active"
|
2017-08-28 17:54:48 +02:00
|
|
|
%li
|
|
|
|
= link_to "Ancienne interface", backoffice_dossiers_path
|
2017-04-04 14:37:16 +02:00
|
|
|
|
2017-06-22 14:56:59 +02:00
|
|
|
%ul.header-right-content
|
|
|
|
- if gestionnaire_signed_in?
|
|
|
|
%li
|
|
|
|
.header-search
|
2017-07-31 11:58:52 +02:00
|
|
|
= form_tag recherche_path, method: :get, class: "form" do
|
2017-09-07 16:50:02 +02:00
|
|
|
= text_field_tag "q", "#{@search_terms unless @search_terms.nil?}", placeholder: "Rechercher un dossier"
|
2017-06-22 14:56:59 +02:00
|
|
|
%button{ title: "Rechercher" }
|
|
|
|
= image_tag "icons/search-blue.svg"
|
2017-06-22 16:45:57 +02:00
|
|
|
%li
|
|
|
|
.header-menu-opener
|
|
|
|
= image_tag "icons/account-circle.svg", onclick: "javascript:TPS.toggleHeaderMenu(event);", title: "Mon compte"
|
|
|
|
%ul.header-menu
|
|
|
|
%li
|
|
|
|
.menu-item{ title: current_email }
|
|
|
|
= current_email
|
2017-09-05 16:31:32 +02:00
|
|
|
- if administration_signed_in?
|
|
|
|
%li
|
|
|
|
= link_to administrations_path, class: "menu-item menu-link" do
|
|
|
|
= image_tag "icons/super-admin.svg"
|
|
|
|
Passer en super-admin
|
2017-06-26 14:01:54 +02:00
|
|
|
- if SwitchDeviseProfileService.new(warden).multiple_devise_profile_connect?
|
|
|
|
- if user_signed_in?
|
|
|
|
%li
|
|
|
|
= link_to users_dossiers_path, class: "menu-item menu-link" do
|
|
|
|
= image_tag "icons/switch-profile.svg"
|
|
|
|
Passer en usager
|
|
|
|
- if gestionnaire_signed_in?
|
|
|
|
%li
|
2017-07-04 14:29:38 +02:00
|
|
|
= link_to procedures_path, class: "menu-item menu-link" do
|
2017-06-26 14:01:54 +02:00
|
|
|
= image_tag "icons/switch-profile.svg"
|
|
|
|
Passer en accompagnateur
|
|
|
|
- if administrateur_signed_in?
|
|
|
|
%li
|
|
|
|
= link_to admin_procedures_path, class: "menu-item menu-link" do
|
|
|
|
= image_tag "icons/switch-profile.svg"
|
|
|
|
Passer en administrateur
|
|
|
|
|
2017-06-22 16:45:57 +02:00
|
|
|
%li
|
|
|
|
= link_to destroy_user_session_path, method: :delete, class: "menu-item menu-link" do
|
|
|
|
= image_tag "icons/sign-out.svg"
|
|
|
|
Se déconnecter
|
2017-06-22 14:56:59 +02:00
|
|
|
|
|
|
|
- elsif request.path != new_user_session_path
|
|
|
|
%li
|
2017-06-26 11:40:28 +02:00
|
|
|
= link_to "Connexion", new_user_session_path, class: "button secondary"
|