DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: 7a32f00a299588fae87ae24fa61c91dac71011fa felu/internal/components/adminpartials.templ -rw-r--r-- 724 bytes
7a32f00aJonni Liljamo fix: typo in error 1 year, 25 days 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/internal/db"
import "strconv"

templ AdminPartialUsersList(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>
}