Skip to content

Commit 1793634

Browse files
Updates to Manage users section (#431)
This makes some changes: * move the text about deactivating users after 90 days above the search box, and use inset text, to make this stand out some more (as it will be a new feature) * Add a new 'Invited' tab, and move invited users who have not logged in there rather than in 'Active' * On the invited users table, add a link to resend invitation ## Before <img width="1076" height="457" alt="Screenshot 2025-08-28 at 14 20 02" src="https://github.com/user-attachments/assets/47598adc-9d0b-4db9-b72a-c4611e8c73a9" /> ## After <img width="1044" height="544" alt="Screenshot 2025-08-28 at 14 20 43" src="https://github.com/user-attachments/assets/791fb95c-112b-4357-82e4-9695d7ea6503" /> <img width="1035" height="443" alt="Screenshot 2025-08-28 at 14 25 57" src="https://github.com/user-attachments/assets/bccbb9cd-ab4d-43ed-8453-08c4fb9676cd" /> --------- Co-authored-by: Frankie Roberto <[email protected]>
1 parent 632225e commit 1793634

File tree

8 files changed

+347
-155
lines changed

8 files changed

+347
-155
lines changed

app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const appViews = [
5757
path.join(__dirname, 'node_modules/nhsuk-frontend/dist/nhsuk/macros'),
5858
path.join(__dirname, 'node_modules/nhsuk-frontend/dist/nhsuk'),
5959
path.join(__dirname, 'node_modules/nhsuk-frontend/dist'),
60+
path.join(__dirname, 'node_modules/@x-govuk/govuk-prototype-components/src/x-govuk/components'),
6061
path.join(__dirname, 'app/components/'),
6162
];
6263

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% from 'secondary-navigation/macro.njk' import xGovukSecondaryNavigation %}
2+
3+
{{ xGovukSecondaryNavigation({
4+
visuallyHiddenTitle: "Secondary menu",
5+
items: [{
6+
text: "Invited (4)",
7+
href: "/user-admin/invited",
8+
current: (currentSubSection == "invited")
9+
}, {
10+
text: "Active (2)",
11+
href: "/user-admin",
12+
current: (currentSubSection == "active")
13+
}, {
14+
text: "Deactivated (3)",
15+
href: "/user-admin/deactivated",
16+
current: (currentSubSection == "deactivated")
17+
}]
18+
}) }}

app/views/user-admin/change.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{% block beforeContent %}
88
{{ backLink({
9-
href: "/user-admin/index1",
9+
href: "/user-admin",
1010
text: "Back"
1111
}) }}
1212
{% endblock %}

app/views/user-admin/deactivated.html

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
{% set currentSection = "manage-users" %}
11+
{% set currentSubSection = "deactivated" %}
12+
1113

1214
{% block content %}
1315
<div class="nhsuk-grid-row">
@@ -19,6 +21,11 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
1921
"href": "/user-admin/add-user"
2022
}) }}
2123

24+
<div class="nhsuk-inset-text">
25+
<span class="nhsuk-u-visually-hidden">Information: </span>
26+
27+
<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
28+
</div>
2229

2330
<div class="app-filters nhsuk-u-margin-top-5">
2431
<form action="/user-admin" method="get" novalidate>
@@ -37,37 +44,17 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
3744
</div>
3845
<br>
3946

40-
<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
41-
42-
<br>
4347

4448

4549
<div class="nhsuk-grid-row">
4650
<div class="nhsuk-grid-column-full">
4751

48-
<nav class="x-govuk-secondary-navigation" aria-label="Secondary menu">
49-
<ul class="x-govuk-secondary-navigation__list">
50-
<li class="x-govuk-secondary-navigation__list-item ">
51-
<a class="x-govuk-secondary-navigation__link" href="/user-admin" aria-current=page>
52-
Active (2)
53-
</a>
54-
</li>
55-
<li class="x-govuk-secondary-navigation__list-item x-govuk-secondary-navigation__list-item--current">
56-
<a class="x-govuk-secondary-navigation__link" href="/user-admin/deactivated">
57-
Deactivated (3)
58-
</a>
59-
</li>
60-
61-
</ul>
62-
</nav>
63-
64-
52+
{% include "user-admin/_secondary-nav.html" %}
6553

6654

6755
<table class="nhsuk-table-responsive" role="table">
6856

69-
<br>
70-
57+
<br>
7158

7259
<caption class="nhsuk-table__caption">3 Deactivated users</caption>
7360

@@ -101,11 +88,11 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
10188

10289
<tr role="row" class="nhsuk-table__row">
10390
<td class="nhsuk-table__cell">
104-
Jane Doe
91+
Adam Atkins
10592
</td>
10693

10794
<td class="nhsuk-table__cell">
108-
jane.doe@nhs.net
95+
adam.atkins@nhs.net
10996
</td>
11097

11198
<td class="nhsuk-table__cell">
@@ -125,13 +112,12 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
125112

126113
<tr role="row" class="nhsuk-table__row">
127114
<td class="nhsuk-table__cell">
128-
Wallace West
115+
Alice Benson
129116
</td>
130117

131118
<td class="nhsuk-table__cell">
132-
wallace.west@nhs.net
119+
alice.benson@nhs.net
133120
</td>
134-
135121
<td class="nhsuk-table__cell">
136122
Yes
137123
</td>
@@ -144,8 +130,7 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
144130
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
145131
<a class="nhsuk-link" href="/user-admin/reactivate">Reactivate</a>
146132
</td>
147-
</tr>
148-
133+
</tr>
149134
<tr role="row" class="nhsuk-table__row">
150135
<td class="nhsuk-table__cell">
151136
Zack Phillips
@@ -154,7 +139,6 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
154139
<td class="nhsuk-table__cell">
155140
156141
</td>
157-
158142
<td class="nhsuk-table__cell">
159143
Yes
160144
</td>

app/views/user-admin/index.html

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
{% set currentSection = "manage-users" %}
11+
{% set currentSubSection = "active" %}
1112

1213
{% block content %}
1314
<div class="nhsuk-grid-row">
@@ -23,6 +24,12 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
2324
"href": "/user-admin/add-user"
2425
}) }}
2526

27+
<div class="nhsuk-inset-text">
28+
<span class="nhsuk-u-visually-hidden">Information: </span>
29+
30+
<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
31+
</div>
32+
2633

2734
<div class="app-filters nhsuk-u-margin-top-5">
2835
<form action="/user-admin" method="get" novalidate>
@@ -42,28 +49,12 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
4249

4350
<br>
4451

45-
<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
4652

47-
<br>
4853

4954
<div class="nhsuk-grid-row">
5055
<div class="nhsuk-grid-column-full">
5156

52-
<nav class="x-govuk-secondary-navigation" aria-label="Secondary menu">
53-
<ul class="x-govuk-secondary-navigation__list">
54-
<li class="x-govuk-secondary-navigation__list-item x-govuk-secondary-navigation__list-item--current">
55-
<a class="x-govuk-secondary-navigation__link" href="/user-admin/index" aria-current=page>
56-
Active ({{ totalUsers }})
57-
</a>
58-
</li>
59-
<li class="x-govuk-secondary-navigation__list-item ">
60-
<a class="x-govuk-secondary-navigation__link" href="/user-admin/deactivated">
61-
Deactivated (3)
62-
</a>
63-
</li>
64-
65-
</ul>
66-
</nav>
57+
{% include "user-admin/_secondary-nav.html" %}
6758

6859
{% if totalUsers > 0 %}
6960

0 commit comments

Comments
 (0)