DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: 6b83684da956b580c5c32129848a1ff66f42e0c6 felu/internal/components/adminpartials.templ -rw-r--r-- 724 bytes
6b83684dJonni Liljamo docs: add README.md 1 year, 29 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>
}