This repository was archived by the owner on Jul 12, 2023. It is now read-only.
File tree 17 files changed +505
-245
lines changed
17 files changed +505
-245
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {{define "admin/navbar"}}
2
+ < ul class ="nav nav-pills justify-content-center mb-3 ">
3
+ < li class ="nav-item ">
4
+ < a class ="nav-link{{if stringContains .currentPath "/admin/realms"}} active{{end}}" href="/admin/realms"> Realms</ a >
5
+ </ li >
6
+
7
+ < li class ="nav-item ">
8
+ < a class ="nav-link{{if stringContains .currentPath "/admin/users"}} active{{end}}" href="/admin/users"> System admins</ a >
9
+ </ li >
10
+
11
+ < li class ="nav-item ">
12
+ < a class ="nav-link{{if stringContains .currentPath "/admin/info"}} active{{end}}" href="/admin/info"> Info</ a >
13
+ </ li >
14
+ </ ul >
15
+ {{end}}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {{define "admin/realms/index"}}
2
+
3
+ {{$realms := .realms}}
4
+
5
+ <!doctype html>
6
+ < html lang ="en ">
7
+ < head >
8
+ {{template "head" .}}
9
+ </ head >
10
+
11
+ < body class ="bg-light ">
12
+ {{template "navbar" .}}
13
+ {{template "admin/navbar" .}}
14
+
15
+ < main role ="main " class ="container ">
16
+ {{template "flash" .}}
17
+
18
+ < div class ="card mb-3 shadow-sm ">
19
+ < div class ="card-header "> Realms</ div >
20
+ < div class ="card-body ">
21
+ < div class ="clearfix mb-3 ">
22
+ < a class ="btn btn-outline-secondary btn-sm float-right " href ="/admin/realms/new ">
23
+ < span class ="oi oi-plus " aria-hidden ="true "> </ span >
24
+ New realm
25
+ </ a >
26
+ </ div >
27
+
28
+ {{if $realms}}
29
+ < div class ="table-responsive ">
30
+ < table class ="table table-bordered table-striped bg-white ">
31
+ < thead >
32
+ < tr >
33
+ < th scope ="col "> Name</ th >
34
+ < th scope ="col " width ="125 "> Region code</ th >
35
+ < th scope ="col " width ="125 "> Signing key</ th >
36
+ </ tr >
37
+ </ thead >
38
+ < tbody >
39
+ {{range $realms}}
40
+ < tr >
41
+ < td > {{.Name}}</ td >
42
+ < td > {{.RegionCode}}</ td >
43
+ < td >
44
+ {{if .UseRealmCertificateKey}}Realm{{else}}System{{end}}
45
+ </ td >
46
+ </ tr >
47
+ {{end}}
48
+ </ tbody >
49
+ </ table >
50
+ </ div >
51
+ {{else}}
52
+ < p class ="text-center ">
53
+ < em > There are no realms.</ em >
54
+ </ p >
55
+ {{end}}
56
+ </ div >
57
+ </ div >
58
+ </ main >
59
+
60
+ {{template "scripts" .}}
61
+ </ body >
62
+ </ html >
63
+ {{end}}
Original file line number Diff line number Diff line change 1
- {{define "admin/newrealm "}}
1
+ {{define "admin/realms/new "}}
2
2
3
3
{{$realm := .realm}}
4
4
11
11
12
12
< body class ="bg-light ">
13
13
{{template "navbar" .}}
14
+ {{template "admin/navbar" .}}
14
15
15
16
< main role ="main " class ="container ">
16
17
{{template "flash" .}}
@@ -23,7 +24,7 @@ <h1>New realm</h1>
23
24
< div class ="card mb-3 shadow-sm ">
24
25
< div class ="card-header "> Details</ div >
25
26
< div class ="card-body ">
26
- < form method ="POST " action ="/admin/realms/create ">
27
+ < form method ="POST " action ="/admin/realms ">
27
28
{{ .csrfField }}
28
29
29
30
< div class ="form-label-group ">
Original file line number Diff line number Diff line change
1
+ {{define "admin/users/index"}}
2
+
3
+ {{$currentUser := .currentUser}}
4
+ {{$admins := .admins}}
5
+
6
+ <!doctype html>
7
+ < html lang ="en ">
8
+ < head >
9
+ {{template "head" .}}
10
+ </ head >
11
+
12
+ < body class ="bg-light ">
13
+ {{template "navbar" .}}
14
+ {{template "admin/navbar" .}}
15
+
16
+ < main role ="main " class ="container ">
17
+ {{template "flash" .}}
18
+
19
+ < div class ="card mb-3 shadow-sm ">
20
+ < div class ="card-header "> System admins</ div >
21
+ < div class ="card-body ">
22
+ < div class ="clearfix mb-3 ">
23
+ < a class ="btn btn-outline-secondary btn-sm float-right " href ="/admin/users/new ">
24
+ < span class ="oi oi-plus " aria-hidden ="true "> </ span >
25
+ New system admin
26
+ </ a >
27
+ </ div >
28
+
29
+ < div class ="table-responsive ">
30
+ < table class ="table table-bordered table-striped mb-0 ">
31
+ < thead >
32
+ < tr >
33
+ < th scope ="col "> Name</ th >
34
+ < th scope ="col " width ="300 "> Email</ th >
35
+ < th scope ="col " width ="40 "> </ th >
36
+ </ tr >
37
+ </ thead >
38
+ < tbody >
39
+ {{range $admins}}
40
+ < tr >
41
+ < td > {{.Name}}</ td >
42
+ < td > {{.Email}}</ td >
43
+ < td class ="text-center ">
44
+ {{- /* cannot delete yourself */ -}}
45
+ {{if not (eq .ID $currentUser.ID)}}
46
+ < a href ="/admin/users/{{.ID}} "
47
+ class ="d-block text-danger "
48
+ data-method ="DELETE "
49
+ data-confirm ="Are you sure you want to remove this system admin? "
50
+ data-toggle ="tooltip "
51
+ title ="Remove this system admin ">
52
+ < span class ="oi oi-trash " aria-hidden ="true "> </ span >
53
+ </ a >
54
+ {{end}}
55
+ </ td >
56
+ </ tr >
57
+ {{end}}
58
+ </ tbody >
59
+ </ table >
60
+ </ div >
61
+ </ div >
62
+ </ div >
63
+ </ main >
64
+
65
+ {{template "scripts" .}}
66
+ </ body >
67
+ </ html >
68
+ {{end}}
You can’t perform that action at this time.
0 commit comments