|
31 | 31 | )
|
32 | 32 |
|
33 | 33 | @standard_layout(user.username.asString, active = "users") {
|
| 34 | + @request.flash.get("error").map { msg => |
| 35 | + <div class="alert alert-danger alert-dismissible fade show mt-2" role="alert"> |
| 36 | + @msg |
| 37 | + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> |
| 38 | + </div> |
| 39 | + } |
| 40 | + |
34 | 41 | <h1 class="page-heading mt-4">@user.username.asString</h1>
|
35 | 42 |
|
36 | 43 | <section class="section-wrapper">
|
@@ -124,60 +131,93 @@ <h1 class="page-heading mt-4">@user.username.asString</h1>
|
124 | 131 | <div class="row mb-3">
|
125 | 132 | <div class="col-md-4">
|
126 | 133 | <div class="card mb-4">
|
127 |
| - <div class="card-header"> |
| 134 | + <div class="card-header d-flex justify-content-between align-items-center"> |
128 | 135 | <div class="h4 mb-0">Tooling</div>
|
129 |
| - </div> |
130 |
| - |
131 |
| - <div class="card-body"> |
132 | 136 | @if(canCreateUsers) {
|
133 |
| - <div class="btn-group float-end" role="group"> |
| 137 | + <div> |
134 | 138 | <a class="btn btn-success" href="@userRoutes.EditUserController.editUserLanding(user.username, user.organisation)">Edit</a>
|
135 | 139 | </div>
|
136 | 140 | }
|
137 |
| - <ul class="list-unstyled"> |
138 |
| - <li> |
139 |
| - <span class="glyphicon glyphicon-@{ |
140 |
| - if(userAccess.vpn) "ok text-success" else "minus text-secondary" |
141 |
| - } me-2"></span> |
142 |
| - <strong>VPN</strong> |
143 |
| - </li> |
144 |
| - <li> |
145 |
| - <span class="glyphicon glyphicon-@{ |
146 |
| - if(userAccess.jira) "ok text-success" else "minus text-secondary" |
147 |
| - } me-2"></span> |
148 |
| - <strong>Jira</strong> |
149 |
| - </li> |
150 |
| - <li> |
151 |
| - <span class="glyphicon glyphicon-@{ |
152 |
| - if(userAccess.confluence) "ok text-success" else "minus text-secondary" |
153 |
| - } me-2"></span> |
154 |
| - <strong>Confluence</strong> |
155 |
| - </li> |
156 |
| - <li> |
157 |
| - <span class="glyphicon glyphicon-@{ |
158 |
| - if(userAccess.devTools) "ok text-success" else "minus text-secondary" |
159 |
| - } me-2"></span> |
160 |
| - <strong>Developer Tools</strong> <i>(Kibana, Grafana, Jenkins)</i> |
161 |
| - </li> |
162 |
| - <li> |
163 |
| - <span class="glyphicon glyphicon-@{ |
164 |
| - if(userAccess.googleApps) "ok text-success" else "minus text-secondary" |
165 |
| - } me-2"></span> |
166 |
| - <strong>Google Workspace</strong> <i>(Gmail, Calendar, Hangouts, Drive etc)</i> |
167 |
| - </li> |
168 |
| - <li> |
169 |
| - <abbr style="text-decoration: none; |
170 |
| - border-bottom: none;" title="Unable to determine if BitWarden access has been granted"> |
171 |
| - <span class="glyphicon glyphicon-question-sign me-2"></span> |
172 |
| - </abbr> |
173 |
| - <strong>Bitwarden</strong> |
174 |
| - </li> |
175 |
| - </ul> |
176 | 141 | </div>
|
| 142 | + |
| 143 | + <div class="card-body"> |
| 144 | + <ul class="list-unstyled"> |
| 145 | + <li> |
| 146 | + <span class="glyphicon glyphicon-@{ |
| 147 | + if(userAccess.vpn) "ok text-success" else "minus text-secondary" |
| 148 | + } me-2"></span> |
| 149 | + <strong>VPN</strong> |
| 150 | + </li> |
| 151 | + <li> |
| 152 | + <span class="glyphicon glyphicon-@{ |
| 153 | + if(userAccess.jira) "ok text-success" else "minus text-secondary" |
| 154 | + } me-2"></span> |
| 155 | + <strong>Jira</strong> |
| 156 | + </li> |
| 157 | + <li> |
| 158 | + <span class="glyphicon glyphicon-@{ |
| 159 | + if(userAccess.confluence) "ok text-success" else "minus text-secondary" |
| 160 | + } me-2"></span> |
| 161 | + <strong>Confluence</strong> |
| 162 | + </li> |
| 163 | + <li> |
| 164 | + <span class="glyphicon glyphicon-@{ |
| 165 | + if(userAccess.devTools) "ok text-success" else "minus text-secondary" |
| 166 | + } me-2"></span> |
| 167 | + <strong>Developer Tools</strong> <i>(Kibana, Grafana, Jenkins)</i> |
| 168 | + </li> |
| 169 | + <li> |
| 170 | + <span class="glyphicon glyphicon-@{ |
| 171 | + if(userAccess.googleApps) "ok text-success" else "minus text-secondary" |
| 172 | + } me-2"></span> |
| 173 | + <strong>Google Workspace</strong> <i>(Gmail, Calendar, Hangouts, Drive etc)</i> |
| 174 | + </li> |
| 175 | + <li> |
| 176 | + <abbr style="text-decoration: none; |
| 177 | + border-bottom: none;" title="Unable to determine if BitWarden access has been granted"> |
| 178 | + <span class="glyphicon glyphicon-question-sign me-2"></span> |
| 179 | + </abbr> |
| 180 | + <strong>Bitwarden</strong> |
| 181 | + </li> |
| 182 | + </ul> |
| 183 | + </div> |
| 184 | + @if(canCreateUsers) { |
| 185 | + <div class="card-footer"> |
| 186 | + <div class="d-flex justify-content-between"> |
| 187 | + <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#vpnModal"> |
| 188 | + Request VPN Certificate |
| 189 | + </button> |
| 190 | + </div> |
| 191 | + </div> |
| 192 | + } |
177 | 193 | </div>
|
178 | 194 | </div>
|
179 | 195 | </div>
|
180 | 196 | }
|
181 | 197 | }
|
182 | 198 | </section>
|
| 199 | + |
| 200 | + <div class="modal fade" id="vpnModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="vpnModalTitle" aria-hidden="true"> |
| 201 | + <div class="modal-dialog"> |
| 202 | + <div class="modal-content"> |
| 203 | + <div class="modal-header"> |
| 204 | + <h5 class="modal-title" id="vpnModalTitle">Request New VPN Certificate</h5> |
| 205 | + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
| 206 | + </div> |
| 207 | + <div class="modal-body"> |
| 208 | + <p>You are about to request a new VPN certificate for @user.username.asString.</p> |
| 209 | + <p>If you continue you will invalidate @{user.username.asString}'s existing certificate.</p> |
| 210 | + <p>To proceed click 'Submit' and a new certificate will be sent to @user.primaryEmail shortly.</p> |
| 211 | + </div> |
| 212 | + <div class="modal-footer"> |
| 213 | + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> |
| 214 | + <form id="vpn-form" method="post" action="@userRoutes.UsersController.requestNewVpnCert"> |
| 215 | + @csrfFormField |
| 216 | + <input name="username" type="hidden" value="@user.username.asString"> |
| 217 | + <button id="vpn-submit" class="btn btn-success" type="submit">Submit</button> |
| 218 | + </form> |
| 219 | + </div> |
| 220 | + </div> |
| 221 | + </div> |
| 222 | + </div> |
183 | 223 | }
|
0 commit comments