blob: ac432d885983479c37168a67c2b767625cde9a2c [file] [log] [blame]
DTabidze0d802592024-03-19 17:42:45 +04001<!DOCTYPE html>
2<html lang="en" data-theme="light">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Group Membership Managment</title>
7 <link rel="stylesheet" href="/static/pico.2.0.6.min.css">
8 <link rel="stylesheet" href="/static/main.css">
9</head>
10<body class="container">
11 <div>
12 <h2 class="headline">{{ .GroupName }} Group Management</h2>
13 <p class="description">{{ .Description }}</p>
14 </div>
15 <hr class="divider">
16 <form action="/add-user" method="post">
17 <input type="hidden" id="group-name" name="group" value="{{ .GroupName }}">
18 <label for="group-name">Username:</label>
19 <input type="text" id="username" name="username" required>
20 <label for="status">Status:</label>
21 <select id="status" name="status" required>
22 <option value="Member" selected>Member</option>
23 <option value="Owner">Owner</option>
24 </select>
25 <button type="submit">Add Member</button>
26 </form>
27 <hr class="divider">
28 <form action="/add-child-group" method="post">
29 <input type="hidden" id="parent-group" name="parent-group" value="{{ .GroupName }}">
30 <label for="child-group">Select Child Group:</label>
31 <select id="child-group" name="child-group" required>
32 {{- range .AvailableGroups }}
33 <option value="{{ . }}">{{ . }}</option>
34 {{- end }}
35 </select>
36 <button type="submit">Create Child Group</button>
37 </form>
38 <h4>Owners</h4>
39 <table>
40 <tr>
41 <th>Username</th>
42 <th>Action</th>
43 </tr>
44 {{- range .Owners }}
45 <tr>
46 <td>{{ . }}</td>
47 <td>Delete</td>
48 </tr>
49 {{- end }}
50 </table>
51 <h4>Members</h4>
52 <table>
53 <tr>
54 <th>Username</th>
55 <th>Action</th>
56 </tr>
57 {{- range .Members }}
58 <tr>
59 <td>{{ . }}</td>
60 <td>Delete</td>
61 </tr>
62 {{- end }}
63 </table>
DTabidzec0b4d8f2024-03-22 17:25:10 +040064 <h4>Transitive Groups</h4>
65 <table>
66 <tr>
67 <th>Group Name</th>
68 <th>Description</th>
69 </tr>
70 {{- range .TransitiveGroups }}
71 <tr>
72 <td><a href="/group/{{ .Name }}">{{ .Name }}</a></td>
73 <td>{{ .Description }}</td>
74 </tr>
75 {{- end }}
76 </table>
77 <h3>Child Groups</h3>
78 <table>
79 <tr>
80 <th>Group Name</th>
81 <th>Description</th>
82 </tr>
83 {{- range .ChildGroups }}
84 <tr>
85 <td><a href="/group/{{ .Name }}">{{ .Name }}</a></td>
86 <td>{{ .Description }}</td>
87 </tr>
88 {{- end }}
89 </table>
DTabidze0d802592024-03-19 17:42:45 +040090</body>
91</html>