| DTabidze | 0d80259 | 2024-03-19 17:42:45 +0400 | [diff] [blame] | 1 | <!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> |
| DTabidze | 5d735e3 | 2024-03-26 16:01:06 +0400 | [diff] [blame^] | 46 | <td><a href="/user/{{ . }}">{{ . }}</a></td> |
| DTabidze | 0d80259 | 2024-03-19 17:42:45 +0400 | [diff] [blame] | 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> |
| DTabidze | 5d735e3 | 2024-03-26 16:01:06 +0400 | [diff] [blame^] | 59 | <td><a href="/user/{{ . }}">{{ . }}</a></td> |
| DTabidze | 0d80259 | 2024-03-19 17:42:45 +0400 | [diff] [blame] | 60 | <td>Delete</td> |
| 61 | </tr> |
| 62 | {{- end }} |
| 63 | </table> |
| DTabidze | c0b4d8f | 2024-03-22 17:25:10 +0400 | [diff] [blame] | 64 | <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> |
| DTabidze | 0d80259 | 2024-03-19 17:42:45 +0400 | [diff] [blame] | 90 | </body> |
| 91 | </html> |