DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: 5774d421e3ce529080c6a381230080bd47b35d5c felu/components/adminpartials.templ -rw-r--r-- 716 bytes
5774d421Jonni Liljamo fix: swap AuthLogin to return the handler instead 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package components

import "git.src.quest/~skye/felu-ddns/db"
import "strconv"

templ AdminPartialsUsersList(users []db.User) {
	<table class="table-auto">
		<thead>
			<tr>
				<th class="text-start p-2">
					Id
				</th>
				<th class="text-start p-2">
					Email
				</th>
				<th class="text-start p-2">
					Is Admin
				</th>
			</tr>
		</thead>
		<tbody>
			for _, user := range users {
				<tr class="border">
					<td>
						<div class="p-2">
							{ user.Id }
						</div>
					</td>
					<td>
						<div class="p-2">
							{ user.Email }
						</div>
					</td>
					<td>
						<div class="p-2">
							{ strconv.FormatBool(user.IsAdmin) }
						</div>
					</td>
				</tr>
			}
		</tbody>
	</table>
}