Skip to content

Commit 5779fa6

Browse files
Make user admin dynamic so that you can change your own permission level (#375)
1 parent e2f1e8b commit 5779fa6

File tree

3 files changed

+105
-232
lines changed

3 files changed

+105
-232
lines changed
Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{% extends 'layout.html' %}
22

3-
{% block pageTitle %}
4-
Add user
5-
{% endblock %}
3+
{% set pageName = "Change role for user" %}
64

75
{% set currentSection = "manage-users" %}
86

@@ -19,22 +17,22 @@
1917
<div class="nhsuk-grid-row">
2018
<div class="nhsuk-grid-column-two-thirds">
2119

22-
<h1 class="nhsuk-heading-l">Ben Benson</h1>
20+
<h1 class="nhsuk-heading-l">{{ user.firstName }} {{ user.lastName }}</h1>
2321

2422
<dl class="nhsuk-summary-list">
2523
<div class="nhsuk-summary-list__row">
2624
<dt class="nhsuk-summary-list__key">
2725
Email
2826
</dt>
2927
<dd class="nhsuk-summary-list__value">
30-
28+
{{ user.email }}
3129
</dd>
3230
</div>
3331
<div class="nhsuk-summary-list__row">
3432
<dt class="nhsuk-summary-list__key">
3533
Last log in
3634
</dt>
37-
<dd class="nhsuk-summary-list__value">
35+
<dd class="nhsuk-summary-list__value">
3836
86 days ago
3937
</dd>
4038
</div>
@@ -49,7 +47,7 @@ <h1 class="nhsuk-heading-l">Ben Benson</h1>
4947
"legend": {
5048
"text": "Are they a clinician?",
5149
classes: "nhsuk-fieldset__legend--s"
52-
50+
5351
}
5452
},
5553
hint: {
@@ -105,15 +103,11 @@ <h1 class="nhsuk-heading-l">Ben Benson</h1>
105103

106104
<p>Do they still need an account? <a href="/user-admin/{{ user.id }}/deactivate">Deactivate this account</a></p>
107105

108-
109-
110106
{{ button({
111107
"text": "Continue"
112108
}) }}
113109
</form>
114110

115-
116-
117111
</div>
118112
</div>
119113

app/views/user-admin/deactivated.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,37 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
4444

4545
<div class="nhsuk-grid-row">
4646
<div class="nhsuk-grid-column-full">
47-
47+
4848
<nav class="x-govuk-secondary-navigation" aria-label="Secondary menu">
4949
<ul class="x-govuk-secondary-navigation__list">
5050
<li class="x-govuk-secondary-navigation__list-item ">
51-
<a class="x-govuk-secondary-navigation__link" href="/user-admin/index" aria-current=page>
52-
Active (102)
51+
<a class="x-govuk-secondary-navigation__link" href="/user-admin" aria-current=page>
52+
Active (2)
5353
</a>
5454
</li>
5555
<li class="x-govuk-secondary-navigation__list-item x-govuk-secondary-navigation__list-item--current">
5656
<a class="x-govuk-secondary-navigation__link" href="/user-admin/deactivated">
5757
Deactivated (3)
5858
</a>
5959
</li>
60-
60+
6161
</ul>
6262
</nav>
6363

64-
65-
66-
64+
65+
66+
6767
<table class="nhsuk-table-responsive" role="table">
6868

6969
<br>
70-
70+
7171

7272
<caption class="nhsuk-table__caption">3 Deactivated users</caption>
7373

7474
<thead class="nhsuk-table__head" role="rowgroup">
7575
<thead role="rowgroup" class="nhsuk-table__head">
7676
<tr role="row">
77-
77+
7878
<th role="columnheader" class="" scope="col">
7979
Name
8080
</th>
@@ -91,23 +91,23 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
9191
Reason deactivated
9292
</th>
9393
<th role="columnheader" class="" scope="col">
94-
94+
9595
</th>
96-
96+
9797
</tr>
9898
</thead>
99-
99+
100100
<tbody class="nhsuk-table__body">
101-
101+
102102
<tr role="row" class="nhsuk-table__row">
103103
<td class="nhsuk-table__cell">
104104
Doe, Jane
105105
</td>
106-
106+
107107
<td class="nhsuk-table__cell">
108108
109109
</td>
110-
110+
111111
<td class="nhsuk-table__cell">
112112
Yes
113113
</td>
@@ -119,19 +119,19 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
119119
</td>
120120
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
121121
<a class="nhsuk-link" href="/user-admin/reactivate">Reactivate</a>
122-
</td>
122+
</td>
123123
</tr>
124124

125125

126126
<tr role="row" class="nhsuk-table__row">
127127
<td class="nhsuk-table__cell">
128128
West, Wallace
129129
</td>
130-
130+
131131
<td class="nhsuk-table__cell">
132132
133133
</td>
134-
134+
135135
<td class="nhsuk-table__cell">
136136
Yes
137137
</td>
@@ -143,18 +143,18 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
143143
</td>
144144
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
145145
<a class="nhsuk-link" href="/user-admin/reactivate">Reactivate</a>
146-
</td>
146+
</td>
147147
</tr>
148148

149149
<tr role="row" class="nhsuk-table__row">
150150
<td class="nhsuk-table__cell">
151151
Phillips, Zack
152152
</td>
153-
153+
154154
<td class="nhsuk-table__cell">
155155
156156
</td>
157-
157+
158158
<td class="nhsuk-table__cell">
159159
Yes
160160
</td>
@@ -166,18 +166,18 @@ <h1 class="nhsuk-heading-xl">Manage users</h1>
166166
</td>
167167
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
168168
<a class="nhsuk-link" href="/user-admin/reactivate">Reactivate</a>
169-
</td>
169+
</td>
170170
</tr>
171171

172-
172+
173173
</tbody>
174174
</table>
175-
176-
177-
175+
176+
177+
178178
</div>
179179
</div>
180-
180+
181181
<br>
182182

183183

0 commit comments

Comments
 (0)