lens @ 64603aa1e13ba82b9393b9eb91b6332237f45821

 1{% import "git.sr.ht/~gabrielgio/img/pkg/database/repository" %}
 2
 3{% code
 4type SettingsPage struct {
 5    Settings *repository.Settings
 6    Users    []*repository.User
 7}
 8%}
 9
10{% func (p *SettingsPage) Title() %}Settings{% endfunc %}
11
12{% func (p *SettingsPage) Content() %}
13<div class="columns">
14    <div class="column is-one-third">
15        <form action="/settings/", method="post">
16            <div class="field">
17                <div class="control">
18                    <label class="checkbox">
19                        <input type="checkbox" id="showMode" name="showMode" {% if p.Settings.ShowMode %}checked{% endif %}>
20                        Show File Modes
21                    </label>
22                </div>
23            </div>
24            <div class="field">
25                <div class="control">
26                    <label class="checkbox">
27                        <input type="checkbox" id="showOwner" name="showOwner" {% if p.Settings.ShowOwner %}checked{% endif %}>
28                        Show File Owner
29                    </label>
30                </div>
31            </div>
32            <div class="field">
33                <input class="button" value="save" type="submit">
34            </div>
35        </form>
36    </div>
37    <div class="column">
38    {% for _, user := range p.Users %}
39        <div class="panel-block">
40            <div class="columns wide-column is-gapless is-mobile">
41                <div class="column">
42                    {%s user.Username %}
43                </div>
44                <div class="column">
45                    {%s user.Path %}
46                </div>
47                <div class="column  has-text-right"><a href="#">Edit</a> / <a href="#" class="is-danger">Delete</a></div>
48            </div>
49        </div>
50    {% endfor %}
51    </div>
52</div>
53{% endfunc %}
54
55{% func (p *SettingsPage) Script() %}
56{% endfunc %}