File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed
Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ def list_env(key):
125125 "APP_DIRS" : True ,
126126 "OPTIONS" : {
127127 "environment" : "manage_breast_screening.config.jinja2_env.environment" ,
128+ "context_processors" : [
129+ "manage_breast_screening.core.context_processors.nav_active" ,
130+ ],
128131 "undefined" : ChainableUndefined ,
129132 },
130133 },
Original file line number Diff line number Diff line change 1+ def nav_active (request ):
2+ if request .path .startswith ("/clinics/" ):
3+ active = "clinics"
4+ else :
5+ active = "home"
6+ return {"navActive" : active }
Original file line number Diff line number Diff line change 1515{% block header %}
1616 {{ header({
1717 "service": {
18- "name ": "Manage breast screening"
18+ "text ": "Manage breast screening"
1919 },
2020 "account": {
2121 "items": header_account_items(request.user)
2929 },
3030 {
3131 "href": "/clinics/",
32- "text": "Clinics ",
32+ "text": "Screening ",
3333 'current': true if navActive == "clinics"
3434 }
3535 ]
Original file line number Diff line number Diff line change @@ -130,6 +130,9 @@ def _user_name_and_role_item(user):
130130
131131def header_account_items (user ):
132132 items = []
133+ if user .is_authenticated :
134+ if user .current_provider :
135+ items .append ({"text" : user .current_provider .name , "icon" : False })
133136
134137 user_name_and_role = _user_name_and_role_item (user )
135138 if user_name_and_role :
You can’t perform that action at this time.
0 commit comments