1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-31 12:16:15 +00:00
mycorrhiza/views/admin.qtpl.go

702 lines
17 KiB
Go
Raw Normal View History

2021-06-29 10:34:36 +00:00
// Code generated by qtc from "admin.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line views/admin.qtpl:1
package views
//line views/admin.qtpl:1
2021-09-06 17:46:34 +00:00
import "fmt"
2021-06-29 19:26:36 +00:00
//line views/admin.qtpl:2
2021-09-06 17:46:34 +00:00
import "github.com/bouncepaw/mycorrhiza/cfg"
2021-06-29 10:34:36 +00:00
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:3
2021-09-06 17:46:34 +00:00
import "github.com/bouncepaw/mycorrhiza/l18n"
//line views/admin.qtpl:4
import "github.com/bouncepaw/mycorrhiza/user"
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:5
2021-09-06 17:46:34 +00:00
import "github.com/bouncepaw/mycorrhiza/util"
//line views/admin.qtpl:7
2021-06-29 10:34:36 +00:00
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:7
2021-06-29 10:34:36 +00:00
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:7
func StreamAdminPanelHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
//line views/admin.qtpl:7
2021-06-29 10:34:36 +00:00
qw422016.N().S(`
<div class="layout">
<main class="main-width">
2021-09-06 17:46:34 +00:00
<h1>`)
//line views/admin.qtpl:10
qw422016.E().S(lc.Get("admin.panel_title"))
//line views/admin.qtpl:10
qw422016.N().S(`</h1>
<section>
2021-09-06 17:46:34 +00:00
<h2>`)
//line views/admin.qtpl:12
qw422016.E().S(lc.Get("admin.panel_safe"))
//line views/admin.qtpl:12
qw422016.N().S(`</h2>
<ul>
2021-09-06 17:46:34 +00:00
<li><a href="/about">`)
//line views/admin.qtpl:14
qw422016.E().S(lc.Get("admin.panel_about"))
//line views/admin.qtpl:14
qw422016.N().S(`</a></li>
<li><a href="/user-list">`)
//line views/admin.qtpl:15
qw422016.E().S(lc.Get("admin.panel_userlist"))
//line views/admin.qtpl:15
qw422016.N().S(`</a></li>
<li><a href="/update-header-links">`)
//line views/admin.qtpl:16
qw422016.E().S(lc.Get("admin.panel_updateheader"))
//line views/admin.qtpl:16
qw422016.N().S(`</a></li>
<li><a href="/admin/users/">`)
//line views/admin.qtpl:17
qw422016.E().S(lc.Get("admin.panel_users"))
//line views/admin.qtpl:17
qw422016.N().S(`</a></li>
</ul>
</section>
<section>
2021-09-06 17:46:34 +00:00
<h2>`)
//line views/admin.qtpl:21
qw422016.E().S(lc.Get("admin.panel_unsafe"))
//line views/admin.qtpl:21
qw422016.N().S(`</h2>
<form action="/admin/shutdown" method="POST" style="float:left">
<fieldset>
2021-09-06 17:46:34 +00:00
<legend>`)
//line views/admin.qtpl:24
qw422016.E().S(lc.Get("admin.panel_shutdown"))
//line views/admin.qtpl:24
qw422016.N().S(`</legend>
<input type="submit" class="btn">
</fieldset>
</form>
<form action="/reindex" method="GET" style="float:left">
<fieldset>
2021-09-06 17:46:34 +00:00
<legend>`)
//line views/admin.qtpl:30
qw422016.E().S(lc.Get("admin.panel_reindex"))
//line views/admin.qtpl:30
qw422016.N().S(`</legend>
<input type="submit" class="btn">
</fieldset>
</form>
</section>
</main>
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
func WriteAdminPanelHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
//line views/admin.qtpl:37
qw422016 := qt422016.AcquireWriter(qq422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
StreamAdminPanelHTML(qw422016, lc)
//line views/admin.qtpl:37
qt422016.ReleaseWriter(qw422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
func AdminPanelHTML(lc *l18n.Localizer) string {
//line views/admin.qtpl:37
qb422016 := qt422016.AcquireByteBuffer()
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
WriteAdminPanelHTML(qb422016, lc)
//line views/admin.qtpl:37
qs422016 := string(qb422016.B)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
qt422016.ReleaseByteBuffer(qb422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
return qs422016
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:37
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:39
func StreamAdminUsersPanelHTML(qw422016 *qt422016.Writer, userList []*user.User, lc *l18n.Localizer) {
//line views/admin.qtpl:39
qw422016.N().S(`
<div class="layout">
2021-06-29 10:34:36 +00:00
<main class="main-width">
2021-09-06 17:46:34 +00:00
<h1>`)
//line views/admin.qtpl:42
qw422016.E().S(lc.Get("admin.users_title"))
//line views/admin.qtpl:42
qw422016.N().S(`</h1>
2021-06-29 10:34:36 +00:00
<form action="/admin/reindex-users" method="post">
2021-09-06 17:46:34 +00:00
<a class="btn" href="/admin/user/new">`)
//line views/admin.qtpl:45
qw422016.E().S(lc.Get("admin.users_create"))
//line views/admin.qtpl:45
qw422016.N().S(`</a>
<button class="btn" type="submit">`)
//line views/admin.qtpl:46
qw422016.E().S(lc.Get("admin.users_reindex"))
//line views/admin.qtpl:46
qw422016.N().S(`</button>
2021-06-29 10:34:36 +00:00
</form>
2021-07-02 12:02:42 +00:00
<br>
2021-06-29 10:34:36 +00:00
2021-06-30 12:56:38 +00:00
<table class="users-table">
2021-06-29 10:34:36 +00:00
<thead>
<tr>
2021-09-06 17:46:34 +00:00
<th>`)
//line views/admin.qtpl:54
qw422016.E().S(lc.Get("admin.users_name"))
//line views/admin.qtpl:54
qw422016.N().S(`</th>
<th>`)
//line views/admin.qtpl:55
qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:55
qw422016.N().S(`</th>
<th>`)
//line views/admin.qtpl:56
qw422016.E().S(lc.Get("admin.users_registered"))
//line views/admin.qtpl:56
qw422016.N().S(`</th>
<th aria-label="`)
//line views/admin.qtpl:57
qw422016.E().S(lc.Get("admin.users_actions"))
//line views/admin.qtpl:57
qw422016.N().S(`"></th>
2021-06-29 10:34:36 +00:00
</tr>
</thead>
<tbody>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:61
2021-06-29 10:34:36 +00:00
for _, u := range userList {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:61
2021-06-29 10:34:36 +00:00
qw422016.N().S(`
<tr>
2021-06-30 12:56:38 +00:00
<td class="table-cell--fill">
2021-06-29 19:26:36 +00:00
<a href="/hypha/`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:64
2021-06-30 12:56:38 +00:00
qw422016.N().U(cfg.UserHypha)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:64
2021-06-29 19:26:36 +00:00
qw422016.N().S(`/`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:64
2021-06-30 12:56:38 +00:00
qw422016.N().U(u.Name)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:64
2021-06-29 19:26:36 +00:00
qw422016.N().S(`">`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:64
2021-06-29 19:26:36 +00:00
qw422016.E().S(u.Name)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:64
2021-06-29 19:26:36 +00:00
qw422016.N().S(`</a>
</td>
2021-06-29 10:34:36 +00:00
<td>`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:66
qw422016.E().S(u.Group)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:66
2021-06-29 10:34:36 +00:00
qw422016.N().S(`</td>
2021-07-01 08:29:19 +00:00
<td>
`)
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:68
2021-09-06 17:46:34 +00:00
if u.RegisteredAt.IsZero() {
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:68
2021-07-01 08:29:19 +00:00
qw422016.N().S(`
`)
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:69
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("admin.users_notime"))
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:69
2021-07-01 08:29:19 +00:00
qw422016.N().S(`
`)
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:70
2021-09-06 17:46:34 +00:00
} else {
2021-07-02 12:02:42 +00:00
//line views/admin.qtpl:70
2021-09-06 17:46:34 +00:00
qw422016.N().S(`
`)
//line views/admin.qtpl:71
qw422016.E().S(u.RegisteredAt.UTC().Format("2006-01-02 15:04"))
//line views/admin.qtpl:71
qw422016.N().S(`
`)
//line views/admin.qtpl:72
}
//line views/admin.qtpl:72
2021-07-01 08:29:19 +00:00
qw422016.N().S(`
</td>
<td>
<a href="/admin/users/`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:75
qw422016.N().U(u.Name)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:75
qw422016.N().S(`/edit">`)
//line views/admin.qtpl:75
qw422016.E().S(lc.Get("admin.users_edit"))
//line views/admin.qtpl:75
qw422016.N().S(`</a>
</td>
2021-06-29 10:34:36 +00:00
</tr>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:78
2021-06-29 10:34:36 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:78
2021-06-29 10:34:36 +00:00
qw422016.N().S(`
</tbody>
</table>
</main>
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
2021-06-29 10:34:36 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
func WriteAdminUsersPanelHTML(qq422016 qtio422016.Writer, userList []*user.User, lc *l18n.Localizer) {
//line views/admin.qtpl:83
2021-06-29 10:34:36 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
StreamAdminUsersPanelHTML(qw422016, userList, lc)
//line views/admin.qtpl:83
2021-06-29 10:34:36 +00:00
qt422016.ReleaseWriter(qw422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
2021-06-29 10:34:36 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
func AdminUsersPanelHTML(userList []*user.User, lc *l18n.Localizer) string {
//line views/admin.qtpl:83
2021-06-29 10:34:36 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
WriteAdminUsersPanelHTML(qb422016, userList, lc)
//line views/admin.qtpl:83
qs422016 := string(qb422016.B)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
qt422016.ReleaseByteBuffer(qb422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
return qs422016
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:83
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:85
func StreamAdminUserNewHTML(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:85
2021-07-02 12:02:42 +00:00
qw422016.N().S(`
<div class="layout">
<main class="main-width form-wrap">
2021-09-06 17:46:34 +00:00
<h1>`)
//line views/admin.qtpl:88
qw422016.E().S(lc.Get("admin.newuser_title"))
//line views/admin.qtpl:88
qw422016.N().S(`</h1>
2021-07-02 12:02:42 +00:00
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:90
if f.HasError() {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:90
2021-07-02 12:02:42 +00:00
qw422016.N().S(`
<div class="notice notice--error">
2021-09-06 17:46:34 +00:00
<strong>`)
//line views/admin.qtpl:92
qw422016.E().S(lc.Get("ui.error"))
//line views/admin.qtpl:92
qw422016.N().S(`:</strong>
2021-07-02 12:02:42 +00:00
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:93
qw422016.E().S(f.Error())
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:93
2021-07-02 12:02:42 +00:00
qw422016.N().S(`
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:95
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:95
2021-07-02 12:02:42 +00:00
qw422016.N().S(`
<form class="form--double" action="" method="post">
2021-07-02 12:02:42 +00:00
<div class="form-field">
2021-09-06 17:46:34 +00:00
<label for="name">`)
//line views/admin.qtpl:99
qw422016.E().S(lc.Get("admin.users_name"))
//line views/admin.qtpl:99
qw422016.N().S(`:</label>
2021-07-02 12:02:42 +00:00
<input type="text" name="name" id="name" value="`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:100
qw422016.E().S(f.Get("name"))
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:100
qw422016.N().S(`" autofocus>
2021-07-02 12:02:42 +00:00
</div>
<div class="form-field">
2021-09-06 17:46:34 +00:00
<label for="password">`)
//line views/admin.qtpl:104
qw422016.E().S(lc.Get("admin.users_password"))
//line views/admin.qtpl:104
qw422016.N().S(`:</label>
2021-07-02 12:02:42 +00:00
<input type="password" name="password" id="password" value="`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:105
qw422016.E().S(f.Get("password"))
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:105
2021-07-02 12:02:42 +00:00
qw422016.N().S(`">
</div>
<div class="form-field">
2021-09-06 17:46:34 +00:00
<label for="group">`)
//line views/admin.qtpl:109
qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:109
qw422016.N().S(`:</label>
2021-07-02 12:02:42 +00:00
<select id="group" name="group">
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:111
if f.Get("group") == "anon" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:111
2021-07-02 12:02:42 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:111
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:111
2021-07-02 12:02:42 +00:00
qw422016.N().S(`>anon</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:112
if f.Get("group") == "editor" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:112
2021-07-02 12:02:42 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:112
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:112
2021-07-02 12:02:42 +00:00
qw422016.N().S(`>editor</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:113
if f.Get("group") == "trusted" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:113
2021-07-02 12:02:42 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:113
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:113
2021-07-02 12:02:42 +00:00
qw422016.N().S(`>trusted</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:114
if f.Get("group") == "moderator" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:114
2021-07-02 12:02:42 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:114
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:114
2021-07-02 12:02:42 +00:00
qw422016.N().S(`>moderator</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:115
if f.Get("group") == "admin" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:115
2021-07-02 12:02:42 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:115
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:115
2021-07-02 12:02:42 +00:00
qw422016.N().S(`>admin</option>
</select>
</div>
<div class="form-field">
<div class="form-field__input">
2021-09-06 17:46:34 +00:00
<button class="btn" type="submit">`)
//line views/admin.qtpl:121
qw422016.E().S(lc.Get("admin.newuser_create"))
//line views/admin.qtpl:121
qw422016.N().S(`</button>
<a class="btn btn_weak" href="/admin/users/">`)
//line views/admin.qtpl:122
qw422016.E().S(lc.Get("ui.cancel"))
//line views/admin.qtpl:122
qw422016.N().S(`</a>
2021-07-02 12:02:42 +00:00
</div>
</div>
</form>
</main>
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
func WriteAdminUserNewHTML(qq422016 qtio422016.Writer, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
StreamAdminUserNewHTML(qw422016, f, lc)
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
qt422016.ReleaseWriter(qw422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
func AdminUserNewHTML(f util.FormData, lc *l18n.Localizer) string {
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
WriteAdminUserNewHTML(qb422016, f, lc)
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
qs422016 := string(qb422016.B)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
return qs422016
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:128
2021-07-02 12:02:42 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:130
func StreamAdminUserEditHTML(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:130
qw422016.N().S(`
<div class="layout">
<main class="main-width form-wrap">
<h1>
<a href="/admin/users/">&larr;</a>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:135
qw422016.E().S(u.Name)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:135
qw422016.N().S(`
</h1>
2021-09-06 17:46:34 +00:00
<h2>`)
//line views/admin.qtpl:138
qw422016.E().S(lc.Get("admin.user_group_heading"))
//line views/admin.qtpl:138
qw422016.N().S(`</h2>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:140
if f.HasError() {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:140
qw422016.N().S(`
<div class="notice notice--error">
2021-09-06 17:46:34 +00:00
<strong>`)
//line views/admin.qtpl:142
qw422016.E().S(lc.Get("ui.error"))
//line views/admin.qtpl:142
qw422016.N().S(`:</strong>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:143
qw422016.E().S(f.Error())
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:143
qw422016.N().S(`
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:145
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:145
qw422016.N().S(`
<form action="" method="post">
2021-06-30 12:56:38 +00:00
<div class="form-field">
2021-09-06 17:46:34 +00:00
<select id="group" name="group" aria-label="`)
//line views/admin.qtpl:149
qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:149
qw422016.N().S(`">
2021-06-30 12:56:38 +00:00
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:150
2021-07-14 21:00:35 +00:00
if f.Get("group") == "anon" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:150
2021-07-14 21:00:35 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:150
2021-07-14 21:00:35 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:150
2021-07-14 21:00:35 +00:00
qw422016.N().S(`>anon</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:151
2021-07-14 21:00:35 +00:00
if f.Get("group") == "editor" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:151
2021-07-14 21:00:35 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:151
2021-07-14 21:00:35 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:151
2021-07-14 21:00:35 +00:00
qw422016.N().S(`>editor</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:152
2021-07-14 21:00:35 +00:00
if f.Get("group") == "trusted" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:152
2021-07-14 21:00:35 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:152
2021-07-14 21:00:35 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:152
2021-07-14 21:00:35 +00:00
qw422016.N().S(`>trusted</option>
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:153
2021-07-14 21:00:35 +00:00
if f.Get("group") == "moderator" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:153
2021-07-14 21:00:35 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:153
2021-07-14 21:00:35 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:153
2021-07-14 21:00:35 +00:00
qw422016.N().S(`>moderator</option>
2021-06-30 12:56:38 +00:00
<option`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:154
2021-07-14 21:00:35 +00:00
if f.Get("group") == "admin" {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:154
2021-07-14 21:00:35 +00:00
qw422016.N().S(` selected`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:154
2021-07-14 21:00:35 +00:00
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:154
2021-07-14 21:00:35 +00:00
qw422016.N().S(`>admin</option>
2021-06-30 12:56:38 +00:00
</select>
</div>
<div class="form-field">
2021-09-06 17:46:34 +00:00
<button class="btn" type="submit">`)
//line views/admin.qtpl:159
qw422016.E().S(lc.Get("admin.user_update"))
//line views/admin.qtpl:159
qw422016.N().S(`</button>
</div>
</form>
2021-09-06 17:46:34 +00:00
<h2>`)
//line views/admin.qtpl:163
qw422016.E().S(lc.Get("admin.user_delete_heading"))
//line views/admin.qtpl:163
qw422016.N().S(`</h2>
<p>`)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:164
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("admin.user_delete_tip"))
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:164
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</p>
<a class="btn btn_destructive" href="/admin/users/`)
//line views/admin.qtpl:165
qw422016.N().U(u.Name)
//line views/admin.qtpl:165
qw422016.N().S(`/delete">`)
//line views/admin.qtpl:165
qw422016.E().S(lc.Get("admin.user_delete"))
//line views/admin.qtpl:165
qw422016.N().S(`</a>
</main>
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
func WriteAdminUserEditHTML(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:168
qw422016 := qt422016.AcquireWriter(qq422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
StreamAdminUserEditHTML(qw422016, u, f, lc)
//line views/admin.qtpl:168
qt422016.ReleaseWriter(qw422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
func AdminUserEditHTML(u *user.User, f util.FormData, lc *l18n.Localizer) string {
//line views/admin.qtpl:168
qb422016 := qt422016.AcquireByteBuffer()
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
WriteAdminUserEditHTML(qb422016, u, f, lc)
//line views/admin.qtpl:168
2021-06-29 10:34:36 +00:00
qs422016 := string(qb422016.B)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
2021-06-29 10:34:36 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
2021-06-29 10:34:36 +00:00
return qs422016
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:168
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:170
func StreamAdminUserDeleteHTML(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:170
qw422016.N().S(`
<div class="layout">
<main class="main-width form-wrap">
2021-09-06 17:46:34 +00:00
<h1>`)
//line views/admin.qtpl:173
qw422016.E().S(lc.Get("admin.user_delete_heading"))
//line views/admin.qtpl:173
qw422016.N().S(`</h1>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:175
if f.HasError() {
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:175
qw422016.N().S(`
<div class="notice notice--error">
2021-09-06 17:46:34 +00:00
<strong>`)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:177
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("ui.error"))
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:177
2021-09-06 17:46:34 +00:00
qw422016.N().S(`:</strong>
`)
//line views/admin.qtpl:178
qw422016.E().S(f.Error())
//line views/admin.qtpl:178
qw422016.N().S(`
</div>
`)
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:180
}
2021-09-06 17:46:34 +00:00
//line views/admin.qtpl:180
qw422016.N().S(`
2021-09-06 17:46:34 +00:00
<p>`)
//line views/admin.qtpl:182
qw422016.N().S(lc.Get("admin.user_delete_warn", &l18n.Replacements{"name": fmt.Sprintf("<strong>%s</strong>", u.Name)}))
//line views/admin.qtpl:182
qw422016.N().S(`</p>
<form action="" method="post">
2021-09-06 17:46:34 +00:00
<button class="btn btn_destructive" type="submit">`)
//line views/admin.qtpl:185
qw422016.E().S(lc.Get("admin.user_delete"))
//line views/admin.qtpl:185
qw422016.N().S(`</button>
<a class="btn btn_weak" href="/admin/users/`)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:186
qw422016.N().U(u.Name)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:186
2021-09-06 17:46:34 +00:00
qw422016.N().S(`/edit">`)
//line views/admin.qtpl:186
qw422016.E().S(lc.Get("ui.cancel"))
//line views/admin.qtpl:186
qw422016.N().S(`</a>
</form>
</main>
</div>
`)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
}
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
2021-09-06 17:46:34 +00:00
func WriteAdminUserDeleteHTML(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
qw422016 := qt422016.AcquireWriter(qq422016)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
2021-09-06 17:46:34 +00:00
StreamAdminUserDeleteHTML(qw422016, u, f, lc)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
qt422016.ReleaseWriter(qw422016)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
}
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
2021-09-06 17:46:34 +00:00
func AdminUserDeleteHTML(u *user.User, f util.FormData, lc *l18n.Localizer) string {
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
qb422016 := qt422016.AcquireByteBuffer()
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
2021-09-06 17:46:34 +00:00
WriteAdminUserDeleteHTML(qb422016, u, f, lc)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
qs422016 := string(qb422016.B)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
qt422016.ReleaseByteBuffer(qb422016)
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
return qs422016
2021-07-14 21:00:35 +00:00
//line views/admin.qtpl:190
2021-06-29 10:34:36 +00:00
}