Skip to content

Commit 4f6062c

Browse files
Pause appt button on pause appt screen
- Add check to hide button on pause appt screen
1 parent fc12634 commit 4f6062c

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

manage_breast_screening/core/jinja2/layout-app.jinja

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,25 @@
2222
"items": header_account_items(request.user)
2323
},
2424
"navigation": {
25-
"items": [
26-
{
27-
"href": url('mammograms:pause_appointment', kwargs={'pk': presented_appointment.pk}),
28-
"text": "Pause appointment",
29-
},
30-
] if presented_appointment.status_bar and presented_appointment.status_bar.show_status_bar_for(request.user) else [
31-
{
32-
"href": "/",
33-
"text": "Home",
34-
"current": true if navActive == "home"
35-
},
36-
{
37-
"href": "/clinics/",
38-
"text": "Screening",
39-
'current': true if navActive == "clinics"
40-
}
41-
]
25+
"items": [] if request.resolver_match.url_name == 'pause_appointment' else (
26+
[
27+
{
28+
"href": url('mammograms:pause_appointment', kwargs={'pk': presented_appointment.pk}),
29+
"text": "Pause appointment",
30+
},
31+
] if presented_appointment.status_bar and presented_appointment.status_bar.show_status_bar_for(request.user) else [
32+
{
33+
"href": "/",
34+
"text": "Home",
35+
"current": true if navActive == "home"
36+
},
37+
{
38+
"href": "/clinics/",
39+
"text": "Screening",
40+
'current': true if navActive == "clinics"
41+
}
42+
]
43+
)
4244
},
4345
"containerClasses": containerClasses
4446
}) }}

0 commit comments

Comments
 (0)