mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-05 17:40:26 +00:00
Get rid of div.layout, center header on two-columnar layout
This commit is contained in:
parent
fe360f582d
commit
bbee985cd4
@ -1,17 +1,15 @@
|
||||
{{define "backlinks to text"}}Backlinks to {{.}}{{end}}
|
||||
{{define "title"}}{{template "backlinks to text" .HyphaName}}{{end}}
|
||||
{{define "body"}}
|
||||
<div class="layout">
|
||||
<main class="main-width backlinks">
|
||||
<h1>{{block "backlinks to link" .HyphaName}}Backlinks to <a href="/hypha/{{.}}">{{beautifulName .}}</a>{{end}}</h1>
|
||||
<p>{{block "description" .}}Hyphae which have a link to this hypha, embed it as an image or transclude it are listed below.{{end}}</p>
|
||||
<ol class="backlinks__list">
|
||||
{{range .Backlinks}}
|
||||
<li class="backlinks__entry">
|
||||
<a class="backlinks__link wikilink" href="/hypha/{{.}}">{{beautifulName .}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</main>
|
||||
</div>
|
||||
<main class="main-width backlinks">
|
||||
<h1>{{block "backlinks to link" .HyphaName}}Backlinks to <a href="/hypha/{{.}}">{{beautifulName .}}</a>{{end}}</h1>
|
||||
<p>{{block "description" .}}Hyphae which have a link to this hypha, embed it as an image or transclude it are listed below.{{end}}</p>
|
||||
<ol class="backlinks__list">
|
||||
{{range .Backlinks}}
|
||||
<li class="backlinks__entry">
|
||||
<a class="backlinks__link wikilink" href="/hypha/{{.}}">{{beautifulName .}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</main>
|
||||
{{end}}
|
@ -1,50 +1,48 @@
|
||||
{{define "title"}}Help{{end}}
|
||||
{{define "body"}}
|
||||
<div class="layout">
|
||||
<main class="main-width help">
|
||||
<article>
|
||||
{{if .ContentsHTML}}
|
||||
{{.ContentsHTML}}
|
||||
{{else}}
|
||||
<h1>{{block "entry not found" .}}Entry not found{{end}}</h1>
|
||||
<p>{{block "entry not found invitation" .}}If you want to write this entry by yourself, consider <a class="wikilink wikilink_external wikilink_https" href="https://github.com/bouncepaw/mycorrhiza">contributing</a> it directly.{{end}}</p>
|
||||
{{end}}
|
||||
</article>
|
||||
</main>
|
||||
<aside class="help-topics layout-card">
|
||||
<h2 class="layout-card__title">{{block "topics" .}}Help topics{{end}}</h2>
|
||||
<ul class="help-topics__list">
|
||||
<li><a href="/help/en">{{block "main" .}}Main{{end}}</a></li>
|
||||
<li><a href="/help/en/hypha">{{block "hypha" .}}Hypha{{end}}</a>
|
||||
<ul>
|
||||
<a href="/help/en/media">{{block "media" .}}Media{{end}}</a>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/help/en/mycomarkup">{{block "mycomarkup" .}}Mycomarkup{{end}}</a></li>
|
||||
<li><a href="/help/en/category">{{block "category" .}}Categories{{end}}</a></li>
|
||||
<li>{{block "interface" .}}Interface{{end}}
|
||||
<ul>
|
||||
<li><a href="/help/en/prevnext">{{block "prevnext" .}}Previous/next{{end}}</a></li>
|
||||
<li><a href="/help/en/top_bar">{{block "top_bar" .}}Top bar{{end}}</a></li>
|
||||
<li><a href="/help/en/sibling_hyphae_section">{{block "sibling_hyphae" .}}Sibling hyphae{{end}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>{{block "special pages" .}}Special pages{{end}}
|
||||
<ul>
|
||||
<li><a href="/help/en/recent_changes">{{block "recent_changes" .}}Recent changes{{end}}</a></li>
|
||||
<li><a href="/help/en/feeds">{{block "feeds" .}}Feeds{{end}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>{{block "configuration" .}}Configuration (for administrators){{end}}
|
||||
<ul>
|
||||
<li><a href="/help/en/config_file">{{block "config_file" .}}Configuration file{{end}}</a></li>
|
||||
<li><a href="/help/en/lock">{{block "lock" .}}Lock{{end}}</a></li>
|
||||
<li><a href="/help/en/whitelist">{{block "whitelist" .}}Whitelist{{end}}</a></li>
|
||||
<li><a href="/help/en/telegram">{{block "telegram" .}}Telegram authentication{{end}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</div>
|
||||
<main class="main-width help">
|
||||
<article>
|
||||
{{if .ContentsHTML}}
|
||||
{{.ContentsHTML}}
|
||||
{{else}}
|
||||
<h1>{{block "entry not found" .}}Entry not found{{end}}</h1>
|
||||
<p>{{block "entry not found invitation" .}}If you want to write this entry by yourself, consider <a class="wikilink wikilink_external wikilink_https" href="https://github.com/bouncepaw/mycorrhiza">contributing</a> it directly.{{end}}</p>
|
||||
{{end}}
|
||||
</article>
|
||||
</main>
|
||||
<aside class="help-topics layout-card">
|
||||
<h2 class="layout-card__title">{{block "topics" .}}Help topics{{end}}</h2>
|
||||
<ul class="help-topics__list">
|
||||
<li><a href="/help/en">{{block "main" .}}Main{{end}}</a></li>
|
||||
<li><a href="/help/en/hypha">{{block "hypha" .}}Hypha{{end}}</a>
|
||||
<ul>
|
||||
<a href="/help/en/media">{{block "media" .}}Media{{end}}</a>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/help/en/mycomarkup">{{block "mycomarkup" .}}Mycomarkup{{end}}</a></li>
|
||||
<li><a href="/help/en/category">{{block "category" .}}Categories{{end}}</a></li>
|
||||
<li>{{block "interface" .}}Interface{{end}}
|
||||
<ul>
|
||||
<li><a href="/help/en/prevnext">{{block "prevnext" .}}Previous/next{{end}}</a></li>
|
||||
<li><a href="/help/en/top_bar">{{block "top_bar" .}}Top bar{{end}}</a></li>
|
||||
<li><a href="/help/en/sibling_hyphae_section">{{block "sibling_hyphae" .}}Sibling hyphae{{end}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>{{block "special pages" .}}Special pages{{end}}
|
||||
<ul>
|
||||
<li><a href="/help/en/recent_changes">{{block "recent_changes" .}}Recent changes{{end}}</a></li>
|
||||
<li><a href="/help/en/feeds">{{block "feeds" .}}Feeds{{end}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>{{block "configuration" .}}Configuration (for administrators){{end}}
|
||||
<ul>
|
||||
<li><a href="/help/en/config_file">{{block "config_file" .}}Configuration file{{end}}</a></li>
|
||||
<li><a href="/help/en/lock">{{block "lock" .}}Lock{{end}}</a></li>
|
||||
<li><a href="/help/en/whitelist">{{block "whitelist" .}}Whitelist{{end}}</a></li>
|
||||
<li><a href="/help/en/telegram">{{block "telegram" .}}Telegram authentication{{end}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
{{end}}
|
||||
|
||||
|
@ -1,21 +1,19 @@
|
||||
{{define "list of hyphae"}}List of hyphae{{end}}
|
||||
{{define "title"}}{{template "list of hyphae"}}{{end}}
|
||||
{{define "body"}}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>{{template "list of hyphae"}}</h1>
|
||||
<ol class="hypha-list">
|
||||
{{range .Entries}}
|
||||
<li class="hypha-list__entry">
|
||||
<a class="hypha-list__link" href="/hypha/{{.Name}}">
|
||||
{{beautifulName .Name}}
|
||||
</a>
|
||||
{{if .Ext}}
|
||||
<span class="hypha-list__amnt-type">{{.Ext}}</span>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</main>
|
||||
</div>
|
||||
<main class="main-width">
|
||||
<h1>{{template "list of hyphae"}}</h1>
|
||||
<ol class="hypha-list">
|
||||
{{range .Entries}}
|
||||
<li class="hypha-list__entry">
|
||||
<a class="hypha-list__link" href="/hypha/{{.Name}}">
|
||||
{{beautifulName .Name}}
|
||||
</a>
|
||||
{{if .Ext}}
|
||||
<span class="hypha-list__amnt-type">{{.Ext}}</span>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</main>
|
||||
{{end}}
|
@ -1,7 +1,7 @@
|
||||
{{define "search:"}}Search: {{.}}{{end}}
|
||||
{{define "title"}}{{template "search:" .Query}}{{end}}
|
||||
{{define "body"}}
|
||||
<div class="layout"><main class="main-width title-search">
|
||||
<main class="main-width title-search">
|
||||
<h1>{{block "search results for" .Query}}Search results for ‘{{.}}’{{end}}</h1>
|
||||
<p>{{block "search desc" .}}Every hypha name has been compared with the query. Hyphae that have matched the query are listed below.{{end}}</p>
|
||||
<ul class="title-search__results">
|
||||
@ -11,6 +11,5 @@
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</main>
|
||||
</div>
|
||||
</main>
|
||||
{{end}}
|
@ -20,14 +20,14 @@
|
||||
|
||||
/* General element positions, from small to big */
|
||||
/* Phones and whatnot */
|
||||
.layout { display: grid; row-gap: 1rem; }
|
||||
header { width: 100%; margin-bottom: 1rem; }
|
||||
body { display: grid; row-gap: .5rem; }
|
||||
header { width: 100%; }
|
||||
|
||||
.layout-card li { list-style-type: none; }
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.amnt-grid { grid-template-columns: 1fr; }
|
||||
.layout { grid-template-columns: auto; grid-template-rows: auto auto auto; }
|
||||
body { grid-template-columns: auto; grid-template-rows: auto auto auto; }
|
||||
.main-width { width: 100%; }
|
||||
main { padding: .5rem 1rem 1rem 1rem; }
|
||||
}
|
||||
@ -55,13 +55,14 @@ header { width: 100%; margin-bottom: 1rem; }
|
||||
|
||||
/* Wide enough to fit two columns ok */
|
||||
@media screen and (min-width: 1100px) {
|
||||
.layout { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; margin: 0 1rem; row-gap: 1rem; }
|
||||
.main-width { margin: 0; }
|
||||
main { grid-column: 1 / span 1; grid-row: 1 / span 2; }
|
||||
.markup-toolbar, .help-topics, .categories-card { grid-column: 2 / span 1; grid-row: 1 / span 1; }
|
||||
.sibling-hyphae { grid-column: 2 / span 1; grid-row: 2 / span 1; }
|
||||
.action-toolbar { grid-column: 2 / span 1; grid-row: 2 / span 1; }
|
||||
.layout-card { width: 100%; }
|
||||
body { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; margin: 0 1rem; row-gap: .5rem; }
|
||||
header { grid-column: 1 / span 2; grid-row: 1 / span 1; margin: 0; }
|
||||
main { grid-column: 1 / span 1; grid-row: 2 / span 2; }
|
||||
main.main-width { margin-left: .5rem; }
|
||||
.markup-toolbar, .help-topics, .categories-card { grid-column: 2 / span 1; grid-row: 2 / span 1; }
|
||||
.sibling-hyphae { grid-column: 2 / span 1; grid-row: 3 / span 1; }
|
||||
.action-toolbar { grid-column: 2 / span 1; grid-row: 3 / span 1; }
|
||||
.layout-card { width: 100%; margin-left: -.5rem; }
|
||||
.edit-toolbar__buttons {display: grid; }
|
||||
}
|
||||
|
||||
@ -69,14 +70,15 @@ header { width: 100%; margin-bottom: 1rem; }
|
||||
.edit-toolbar__buttons { grid-template-columns: 1fr 1fr; grid-column-gap: .125rem; }
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1250px) {
|
||||
.layout { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
|
||||
@media screen and (min-width: 1200px) {
|
||||
body { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
|
||||
header { grid-column: 1 / span 3; grid-row: 1 / span 1; margin: 0; }
|
||||
.layout-card {max-width: 18rem;}
|
||||
.main-width { margin: 0 auto; }
|
||||
main { grid-column: 2 / span 1; grid-row: 1 / span 3; }
|
||||
.sibling-hyphae, .markup-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: 0; grid-row: 1 / span 2; }
|
||||
.markup-toolbar { grid-column: 3 / span 1; grid-row: 1 / span 2; }
|
||||
.action-toolbar, .categories-card { grid-column: 1 / span 1; grid-row: 1 / span 1; }
|
||||
main { grid-column: 2 / span 1; grid-row: 2 / span 3; }
|
||||
.sibling-hyphae, .markup-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: -.5rem; grid-row: 2 / span 2; }
|
||||
.markup-toolbar { grid-column: 3 / span 1; grid-row: 2 / span 2; margin-left: -.5rem; }
|
||||
.action-toolbar, .categories-card { grid-column: 1 / span 1; grid-row: 2 / span 1; margin-left: .5rem; }
|
||||
.edit-toolbar__buttons { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ func (e l10nEntry) get(lang string) string {
|
||||
return e._en
|
||||
}
|
||||
|
||||
const aboutTemplateString = `<div class="layout">
|
||||
const aboutTemplateString = `
|
||||
<main class="main-width">
|
||||
<section class="about-page">
|
||||
<h1>{{ printf (get .L.Title) .Cfg.WikiName }}</h1>
|
||||
@ -59,8 +59,7 @@ const aboutTemplateString = `<div class="layout">
|
||||
{{ end }}
|
||||
</dl>
|
||||
</section>
|
||||
</main>
|
||||
</div>`
|
||||
</main>`
|
||||
|
||||
var aboutData = struct {
|
||||
L map[string]l10nEntry
|
||||
|
@ -1,34 +1,32 @@
|
||||
{{define "panel title"}}Administrative functions{{end}}
|
||||
{{define "panel"}}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>{{template "panel title"}}</h1>
|
||||
<section>
|
||||
<h2>{{block "panel safe section title" .}}Safe section{{end}}</h2>
|
||||
<ul>
|
||||
<li><a href="/about">{{block "panel link about" .}}About this wiki{{end}}</a></li>
|
||||
<li><a href="/update-header-links">{{block "panel update header" .}}Reload header links{{end}}</a></li>
|
||||
<li><a href="/user-list">{{block "panel link user list" .}}User list{{end}}</a></li>
|
||||
<li><a href="/admin/users/">{{block "panel users" .}}Manage users{{end}}</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h2>{{block "panel unsafe section title" .}}Unsafe section{{end}}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<form action="/admin/shutdown" method="POST">
|
||||
<label>{{block "panel shutdown" .}}Shutdown wiki{{end}}</label>
|
||||
<input type="submit" class="btn">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="/reindex" method="GET">
|
||||
<label>{{block "panel reindex hyphae" .}}Reindex hyphae{{end}}</label>
|
||||
<input type="submit" class="btn">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
<main class="main-width">
|
||||
<h1>{{template "panel title"}}</h1>
|
||||
<section>
|
||||
<h2>{{block "panel safe section title" .}}Safe section{{end}}</h2>
|
||||
<ul>
|
||||
<li><a href="/about">{{block "panel link about" .}}About this wiki{{end}}</a></li>
|
||||
<li><a href="/update-header-links">{{block "panel update header" .}}Reload header links{{end}}</a></li>
|
||||
<li><a href="/user-list">{{block "panel link user list" .}}User list{{end}}</a></li>
|
||||
<li><a href="/admin/users/">{{block "panel users" .}}Manage users{{end}}</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h2>{{block "panel unsafe section title" .}}Unsafe section{{end}}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<form action="/admin/shutdown" method="POST">
|
||||
<label>{{block "panel shutdown" .}}Shutdown wiki{{end}}</label>
|
||||
<input type="submit" class="btn">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="/reindex" method="GET">
|
||||
<label>{{block "panel reindex hyphae" .}}Reindex hyphae{{end}}</label>
|
||||
<input type="submit" class="btn">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
{{end}}
|
||||
|
@ -5,7 +5,6 @@
|
||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||
|
||||
{% func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>{%s lc.Get("admin.users_title") %}</h1>
|
||||
|
||||
@ -47,11 +46,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func AdminUserNew(f util.FormData, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width form-wrap">
|
||||
<h1>{%s lc.Get("admin.newuser_title") %}</h1>
|
||||
|
||||
@ -92,11 +89,9 @@
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width form-wrap">
|
||||
<h1>
|
||||
<a href="/admin/users/">←</a>
|
||||
@ -132,11 +127,9 @@
|
||||
<p>{%s lc.Get("admin.user_delete_tip") %}</p>
|
||||
<a class="btn btn_destructive" href="/admin/users/{%u u.Name %}/delete">{%s lc.Get("admin.user_delete") %}</a>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width form-wrap">
|
||||
<h1>{%s lc.Get("admin.user_delete_heading") %}</h1>
|
||||
|
||||
@ -154,5 +147,4 @@
|
||||
<a class="btn btn_weak" href="/admin/users/{%u u.Name %}/edit">{%s lc.Get("ui.cancel") %}</a>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -36,24 +36,23 @@ var (
|
||||
func StreamAdminUsersPanel(qw422016 *qt422016.Writer, userList []*user.User, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:7
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>`)
|
||||
//line views/admin.qtpl:10
|
||||
//line views/admin.qtpl:9
|
||||
qw422016.E().S(lc.Get("admin.users_title"))
|
||||
//line views/admin.qtpl:10
|
||||
//line views/admin.qtpl:9
|
||||
qw422016.N().S(`</h1>
|
||||
|
||||
<form action="/admin/reindex-users" method="post">
|
||||
<a class="btn" href="/admin/new-user">`)
|
||||
//line views/admin.qtpl:13
|
||||
//line views/admin.qtpl:12
|
||||
qw422016.E().S(lc.Get("admin.users_create"))
|
||||
//line views/admin.qtpl:13
|
||||
//line views/admin.qtpl:12
|
||||
qw422016.N().S(`</a>
|
||||
<button class="btn" type="submit">`)
|
||||
//line views/admin.qtpl:14
|
||||
//line views/admin.qtpl:13
|
||||
qw422016.E().S(lc.Get("admin.users_reindex"))
|
||||
//line views/admin.qtpl:14
|
||||
//line views/admin.qtpl:13
|
||||
qw422016.N().S(`</button>
|
||||
</form>
|
||||
|
||||
@ -63,245 +62,243 @@ func StreamAdminUsersPanel(qw422016 *qt422016.Writer, userList []*user.User, lc
|
||||
<thead>
|
||||
<tr>
|
||||
<th>`)
|
||||
//line views/admin.qtpl:22
|
||||
//line views/admin.qtpl:21
|
||||
qw422016.E().S(lc.Get("admin.users_name"))
|
||||
//line views/admin.qtpl:21
|
||||
qw422016.N().S(`</th>
|
||||
<th>`)
|
||||
//line views/admin.qtpl:22
|
||||
qw422016.E().S(lc.Get("admin.users_group"))
|
||||
//line views/admin.qtpl:22
|
||||
qw422016.N().S(`</th>
|
||||
<th>`)
|
||||
//line views/admin.qtpl:23
|
||||
qw422016.E().S(lc.Get("admin.users_group"))
|
||||
//line views/admin.qtpl:23
|
||||
qw422016.N().S(`</th>
|
||||
<th>`)
|
||||
//line views/admin.qtpl:24
|
||||
qw422016.E().S(lc.Get("admin.users_registered"))
|
||||
//line views/admin.qtpl:24
|
||||
//line views/admin.qtpl:23
|
||||
qw422016.N().S(`</th>
|
||||
<th aria-label="`)
|
||||
//line views/admin.qtpl:25
|
||||
//line views/admin.qtpl:24
|
||||
qw422016.E().S(lc.Get("admin.users_actions"))
|
||||
//line views/admin.qtpl:25
|
||||
//line views/admin.qtpl:24
|
||||
qw422016.N().S(`"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
`)
|
||||
//line views/admin.qtpl:29
|
||||
//line views/admin.qtpl:28
|
||||
for _, u := range userList {
|
||||
//line views/admin.qtpl:29
|
||||
//line views/admin.qtpl:28
|
||||
qw422016.N().S(`
|
||||
<tr>
|
||||
<td class="table-cell--fill">
|
||||
<a href="/hypha/`)
|
||||
//line views/admin.qtpl:32
|
||||
//line views/admin.qtpl:31
|
||||
qw422016.N().U(cfg.UserHypha)
|
||||
//line views/admin.qtpl:32
|
||||
//line views/admin.qtpl:31
|
||||
qw422016.N().S(`/`)
|
||||
//line views/admin.qtpl:32
|
||||
//line views/admin.qtpl:31
|
||||
qw422016.N().U(u.Name)
|
||||
//line views/admin.qtpl:32
|
||||
//line views/admin.qtpl:31
|
||||
qw422016.N().S(`">`)
|
||||
//line views/admin.qtpl:32
|
||||
//line views/admin.qtpl:31
|
||||
qw422016.E().S(u.Name)
|
||||
//line views/admin.qtpl:32
|
||||
//line views/admin.qtpl:31
|
||||
qw422016.N().S(`</a>
|
||||
</td>
|
||||
<td>`)
|
||||
//line views/admin.qtpl:34
|
||||
//line views/admin.qtpl:33
|
||||
qw422016.E().S(u.Group)
|
||||
//line views/admin.qtpl:34
|
||||
//line views/admin.qtpl:33
|
||||
qw422016.N().S(`</td>
|
||||
<td>
|
||||
`)
|
||||
//line views/admin.qtpl:36
|
||||
//line views/admin.qtpl:35
|
||||
if u.RegisteredAt.IsZero() {
|
||||
//line views/admin.qtpl:35
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/admin.qtpl:36
|
||||
qw422016.E().S(lc.Get("admin.users_notime"))
|
||||
//line views/admin.qtpl:36
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/admin.qtpl:37
|
||||
qw422016.E().S(lc.Get("admin.users_notime"))
|
||||
//line views/admin.qtpl:37
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/admin.qtpl:38
|
||||
//line views/admin.qtpl:37
|
||||
} else {
|
||||
//line views/admin.qtpl:38
|
||||
//line views/admin.qtpl:37
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/admin.qtpl:39
|
||||
//line views/admin.qtpl:38
|
||||
qw422016.E().S(u.RegisteredAt.UTC().Format("2006-01-02 15:04"))
|
||||
//line views/admin.qtpl:39
|
||||
//line views/admin.qtpl:38
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/admin.qtpl:40
|
||||
//line views/admin.qtpl:39
|
||||
}
|
||||
//line views/admin.qtpl:40
|
||||
//line views/admin.qtpl:39
|
||||
qw422016.N().S(`
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/users/`)
|
||||
//line views/admin.qtpl:43
|
||||
//line views/admin.qtpl:42
|
||||
qw422016.N().U(u.Name)
|
||||
//line views/admin.qtpl:43
|
||||
//line views/admin.qtpl:42
|
||||
qw422016.N().S(`/edit">`)
|
||||
//line views/admin.qtpl:43
|
||||
//line views/admin.qtpl:42
|
||||
qw422016.E().S(lc.Get("admin.users_edit"))
|
||||
//line views/admin.qtpl:43
|
||||
//line views/admin.qtpl:42
|
||||
qw422016.N().S(`</a>
|
||||
</td>
|
||||
</tr>
|
||||
`)
|
||||
//line views/admin.qtpl:46
|
||||
//line views/admin.qtpl:45
|
||||
}
|
||||
//line views/admin.qtpl:46
|
||||
//line views/admin.qtpl:45
|
||||
qw422016.N().S(`
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
func WriteAdminUsersPanel(qq422016 qtio422016.Writer, userList []*user.User, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
StreamAdminUsersPanel(qw422016, userList, lc)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) string {
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
WriteAdminUsersPanel(qb422016, userList, lc)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
return qs422016
|
||||
//line views/admin.qtpl:51
|
||||
//line views/admin.qtpl:49
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:53
|
||||
//line views/admin.qtpl:51
|
||||
func StreamAdminUserNew(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:53
|
||||
//line views/admin.qtpl:51
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width form-wrap">
|
||||
<h1>`)
|
||||
//line views/admin.qtpl:56
|
||||
//line views/admin.qtpl:53
|
||||
qw422016.E().S(lc.Get("admin.newuser_title"))
|
||||
//line views/admin.qtpl:56
|
||||
//line views/admin.qtpl:53
|
||||
qw422016.N().S(`</h1>
|
||||
|
||||
`)
|
||||
//line views/admin.qtpl:58
|
||||
//line views/admin.qtpl:55
|
||||
if f.HasError() {
|
||||
//line views/admin.qtpl:58
|
||||
//line views/admin.qtpl:55
|
||||
qw422016.N().S(`
|
||||
<div class="notice notice--error">
|
||||
<strong>`)
|
||||
//line views/admin.qtpl:60
|
||||
//line views/admin.qtpl:57
|
||||
qw422016.E().S(lc.Get("ui.error"))
|
||||
//line views/admin.qtpl:60
|
||||
//line views/admin.qtpl:57
|
||||
qw422016.N().S(`:</strong>
|
||||
`)
|
||||
//line views/admin.qtpl:61
|
||||
//line views/admin.qtpl:58
|
||||
qw422016.E().S(f.Error())
|
||||
//line views/admin.qtpl:61
|
||||
//line views/admin.qtpl:58
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:63
|
||||
//line views/admin.qtpl:60
|
||||
}
|
||||
//line views/admin.qtpl:63
|
||||
//line views/admin.qtpl:60
|
||||
qw422016.N().S(`
|
||||
|
||||
<form class="form--double" action="" method="post">
|
||||
<div class="form-field">
|
||||
<label for="name">`)
|
||||
//line views/admin.qtpl:67
|
||||
//line views/admin.qtpl:64
|
||||
qw422016.E().S(lc.Get("admin.users_name"))
|
||||
//line views/admin.qtpl:67
|
||||
//line views/admin.qtpl:64
|
||||
qw422016.N().S(`:</label>
|
||||
<input type="text" name="name" id="name" value="`)
|
||||
//line views/admin.qtpl:68
|
||||
//line views/admin.qtpl:65
|
||||
qw422016.E().S(f.Get("name"))
|
||||
//line views/admin.qtpl:68
|
||||
//line views/admin.qtpl:65
|
||||
qw422016.N().S(`" autofocus>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="password">`)
|
||||
//line views/admin.qtpl:72
|
||||
//line views/admin.qtpl:69
|
||||
qw422016.E().S(lc.Get("admin.users_password"))
|
||||
//line views/admin.qtpl:72
|
||||
//line views/admin.qtpl:69
|
||||
qw422016.N().S(`:</label>
|
||||
<input type="password" name="password" id="password" value="`)
|
||||
//line views/admin.qtpl:73
|
||||
//line views/admin.qtpl:70
|
||||
qw422016.E().S(f.Get("password"))
|
||||
//line views/admin.qtpl:73
|
||||
//line views/admin.qtpl:70
|
||||
qw422016.N().S(`">
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="group">`)
|
||||
//line views/admin.qtpl:77
|
||||
//line views/admin.qtpl:74
|
||||
qw422016.E().S(lc.Get("admin.users_group"))
|
||||
//line views/admin.qtpl:77
|
||||
//line views/admin.qtpl:74
|
||||
qw422016.N().S(`:</label>
|
||||
<select id="group" name="group">
|
||||
<option`)
|
||||
//line views/admin.qtpl:79
|
||||
//line views/admin.qtpl:76
|
||||
if f.Get("group") == "anon" {
|
||||
//line views/admin.qtpl:79
|
||||
//line views/admin.qtpl:76
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:79
|
||||
//line views/admin.qtpl:76
|
||||
}
|
||||
//line views/admin.qtpl:79
|
||||
//line views/admin.qtpl:76
|
||||
qw422016.N().S(`>anon</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:80
|
||||
//line views/admin.qtpl:77
|
||||
if f.Get("group") == "editor" {
|
||||
//line views/admin.qtpl:80
|
||||
//line views/admin.qtpl:77
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:80
|
||||
//line views/admin.qtpl:77
|
||||
}
|
||||
//line views/admin.qtpl:80
|
||||
//line views/admin.qtpl:77
|
||||
qw422016.N().S(`>editor</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:81
|
||||
//line views/admin.qtpl:78
|
||||
if f.Get("group") == "trusted" {
|
||||
//line views/admin.qtpl:81
|
||||
//line views/admin.qtpl:78
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:81
|
||||
//line views/admin.qtpl:78
|
||||
}
|
||||
//line views/admin.qtpl:81
|
||||
//line views/admin.qtpl:78
|
||||
qw422016.N().S(`>trusted</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:82
|
||||
//line views/admin.qtpl:79
|
||||
if f.Get("group") == "moderator" {
|
||||
//line views/admin.qtpl:82
|
||||
//line views/admin.qtpl:79
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:82
|
||||
//line views/admin.qtpl:79
|
||||
}
|
||||
//line views/admin.qtpl:82
|
||||
//line views/admin.qtpl:79
|
||||
qw422016.N().S(`>moderator</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:83
|
||||
//line views/admin.qtpl:80
|
||||
if f.Get("group") == "admin" {
|
||||
//line views/admin.qtpl:83
|
||||
//line views/admin.qtpl:80
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:83
|
||||
//line views/admin.qtpl:80
|
||||
}
|
||||
//line views/admin.qtpl:83
|
||||
//line views/admin.qtpl:80
|
||||
qw422016.N().S(`>admin</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -309,294 +306,289 @@ func StreamAdminUserNew(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Loc
|
||||
<div class="form-field">
|
||||
<div class="form-field__input">
|
||||
<button class="btn" type="submit">`)
|
||||
//line views/admin.qtpl:89
|
||||
//line views/admin.qtpl:86
|
||||
qw422016.E().S(lc.Get("admin.newuser_create"))
|
||||
//line views/admin.qtpl:89
|
||||
//line views/admin.qtpl:86
|
||||
qw422016.N().S(`</button>
|
||||
<a class="btn btn_weak" href="/admin/users/">`)
|
||||
//line views/admin.qtpl:90
|
||||
//line views/admin.qtpl:87
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/admin.qtpl:90
|
||||
//line views/admin.qtpl:87
|
||||
qw422016.N().S(`</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
func WriteAdminUserNew(qq422016 qtio422016.Writer, f util.FormData, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
StreamAdminUserNew(qw422016, f, lc)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
func AdminUserNew(f util.FormData, lc *l18n.Localizer) string {
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
WriteAdminUserNew(qb422016, f, lc)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
return qs422016
|
||||
//line views/admin.qtpl:96
|
||||
//line views/admin.qtpl:92
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:98
|
||||
//line views/admin.qtpl:94
|
||||
func StreamAdminUserEdit(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:98
|
||||
//line views/admin.qtpl:94
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width form-wrap">
|
||||
<h1>
|
||||
<a href="/admin/users/">←</a>
|
||||
`)
|
||||
//line views/admin.qtpl:103
|
||||
//line views/admin.qtpl:98
|
||||
qw422016.E().S(u.Name)
|
||||
//line views/admin.qtpl:103
|
||||
//line views/admin.qtpl:98
|
||||
qw422016.N().S(`
|
||||
</h1>
|
||||
|
||||
<h2>`)
|
||||
//line views/admin.qtpl:106
|
||||
//line views/admin.qtpl:101
|
||||
qw422016.E().S(lc.Get("admin.user_group_heading"))
|
||||
//line views/admin.qtpl:106
|
||||
//line views/admin.qtpl:101
|
||||
qw422016.N().S(`</h2>
|
||||
|
||||
`)
|
||||
//line views/admin.qtpl:108
|
||||
//line views/admin.qtpl:103
|
||||
if f.HasError() {
|
||||
//line views/admin.qtpl:108
|
||||
//line views/admin.qtpl:103
|
||||
qw422016.N().S(`
|
||||
<div class="notice notice--error">
|
||||
<strong>`)
|
||||
//line views/admin.qtpl:110
|
||||
//line views/admin.qtpl:105
|
||||
qw422016.E().S(lc.Get("ui.error"))
|
||||
//line views/admin.qtpl:110
|
||||
//line views/admin.qtpl:105
|
||||
qw422016.N().S(`:</strong>
|
||||
`)
|
||||
//line views/admin.qtpl:111
|
||||
//line views/admin.qtpl:106
|
||||
qw422016.E().S(f.Error())
|
||||
//line views/admin.qtpl:111
|
||||
//line views/admin.qtpl:106
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:113
|
||||
//line views/admin.qtpl:108
|
||||
}
|
||||
//line views/admin.qtpl:113
|
||||
//line views/admin.qtpl:108
|
||||
qw422016.N().S(`
|
||||
|
||||
<form action="" method="post">
|
||||
<div class="form-field">
|
||||
<select id="group" name="group" aria-label="`)
|
||||
//line views/admin.qtpl:117
|
||||
//line views/admin.qtpl:112
|
||||
qw422016.E().S(lc.Get("admin.users_group"))
|
||||
//line views/admin.qtpl:117
|
||||
//line views/admin.qtpl:112
|
||||
qw422016.N().S(`">
|
||||
<option`)
|
||||
//line views/admin.qtpl:118
|
||||
//line views/admin.qtpl:113
|
||||
if f.Get("group") == "anon" {
|
||||
//line views/admin.qtpl:118
|
||||
//line views/admin.qtpl:113
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:118
|
||||
//line views/admin.qtpl:113
|
||||
}
|
||||
//line views/admin.qtpl:118
|
||||
//line views/admin.qtpl:113
|
||||
qw422016.N().S(`>anon</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:119
|
||||
//line views/admin.qtpl:114
|
||||
if f.Get("group") == "editor" {
|
||||
//line views/admin.qtpl:119
|
||||
//line views/admin.qtpl:114
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:119
|
||||
//line views/admin.qtpl:114
|
||||
}
|
||||
//line views/admin.qtpl:119
|
||||
//line views/admin.qtpl:114
|
||||
qw422016.N().S(`>editor</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:120
|
||||
//line views/admin.qtpl:115
|
||||
if f.Get("group") == "trusted" {
|
||||
//line views/admin.qtpl:120
|
||||
//line views/admin.qtpl:115
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:120
|
||||
//line views/admin.qtpl:115
|
||||
}
|
||||
//line views/admin.qtpl:120
|
||||
//line views/admin.qtpl:115
|
||||
qw422016.N().S(`>trusted</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:121
|
||||
//line views/admin.qtpl:116
|
||||
if f.Get("group") == "moderator" {
|
||||
//line views/admin.qtpl:121
|
||||
//line views/admin.qtpl:116
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:121
|
||||
//line views/admin.qtpl:116
|
||||
}
|
||||
//line views/admin.qtpl:121
|
||||
//line views/admin.qtpl:116
|
||||
qw422016.N().S(`>moderator</option>
|
||||
<option`)
|
||||
//line views/admin.qtpl:122
|
||||
//line views/admin.qtpl:117
|
||||
if f.Get("group") == "admin" {
|
||||
//line views/admin.qtpl:122
|
||||
//line views/admin.qtpl:117
|
||||
qw422016.N().S(` selected`)
|
||||
//line views/admin.qtpl:122
|
||||
//line views/admin.qtpl:117
|
||||
}
|
||||
//line views/admin.qtpl:122
|
||||
//line views/admin.qtpl:117
|
||||
qw422016.N().S(`>admin</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<button class="btn" type="submit">`)
|
||||
//line views/admin.qtpl:127
|
||||
//line views/admin.qtpl:122
|
||||
qw422016.E().S(lc.Get("admin.user_update"))
|
||||
//line views/admin.qtpl:127
|
||||
//line views/admin.qtpl:122
|
||||
qw422016.N().S(`</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h2>`)
|
||||
//line views/admin.qtpl:131
|
||||
//line views/admin.qtpl:126
|
||||
qw422016.E().S(lc.Get("admin.user_delete_heading"))
|
||||
//line views/admin.qtpl:131
|
||||
//line views/admin.qtpl:126
|
||||
qw422016.N().S(`</h2>
|
||||
<p>`)
|
||||
//line views/admin.qtpl:132
|
||||
//line views/admin.qtpl:127
|
||||
qw422016.E().S(lc.Get("admin.user_delete_tip"))
|
||||
//line views/admin.qtpl:132
|
||||
//line views/admin.qtpl:127
|
||||
qw422016.N().S(`</p>
|
||||
<a class="btn btn_destructive" href="/admin/users/`)
|
||||
//line views/admin.qtpl:133
|
||||
//line views/admin.qtpl:128
|
||||
qw422016.N().U(u.Name)
|
||||
//line views/admin.qtpl:133
|
||||
//line views/admin.qtpl:128
|
||||
qw422016.N().S(`/delete">`)
|
||||
//line views/admin.qtpl:133
|
||||
//line views/admin.qtpl:128
|
||||
qw422016.E().S(lc.Get("admin.user_delete"))
|
||||
//line views/admin.qtpl:133
|
||||
//line views/admin.qtpl:128
|
||||
qw422016.N().S(`</a>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
func WriteAdminUserEdit(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
StreamAdminUserEdit(qw422016, u, f, lc)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) string {
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
WriteAdminUserEdit(qb422016, u, f, lc)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
return qs422016
|
||||
//line views/admin.qtpl:136
|
||||
//line views/admin.qtpl:130
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:138
|
||||
//line views/admin.qtpl:132
|
||||
func StreamAdminUserDelete(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:138
|
||||
//line views/admin.qtpl:132
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width form-wrap">
|
||||
<h1>`)
|
||||
//line views/admin.qtpl:141
|
||||
//line views/admin.qtpl:134
|
||||
qw422016.E().S(lc.Get("admin.user_delete_heading"))
|
||||
//line views/admin.qtpl:141
|
||||
//line views/admin.qtpl:134
|
||||
qw422016.N().S(`</h1>
|
||||
|
||||
`)
|
||||
//line views/admin.qtpl:143
|
||||
//line views/admin.qtpl:136
|
||||
if f.HasError() {
|
||||
//line views/admin.qtpl:143
|
||||
//line views/admin.qtpl:136
|
||||
qw422016.N().S(`
|
||||
<div class="notice notice--error">
|
||||
<strong>`)
|
||||
//line views/admin.qtpl:145
|
||||
//line views/admin.qtpl:138
|
||||
qw422016.E().S(lc.Get("ui.error"))
|
||||
//line views/admin.qtpl:145
|
||||
//line views/admin.qtpl:138
|
||||
qw422016.N().S(`:</strong>
|
||||
`)
|
||||
//line views/admin.qtpl:146
|
||||
//line views/admin.qtpl:139
|
||||
qw422016.E().S(f.Error())
|
||||
//line views/admin.qtpl:146
|
||||
//line views/admin.qtpl:139
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:148
|
||||
//line views/admin.qtpl:141
|
||||
}
|
||||
//line views/admin.qtpl:148
|
||||
//line views/admin.qtpl:141
|
||||
qw422016.N().S(`
|
||||
|
||||
<p>`)
|
||||
//line views/admin.qtpl:150
|
||||
//line views/admin.qtpl:143
|
||||
qw422016.N().S(lc.Get("admin.user_delete_warn", &l18n.Replacements{"name": fmt.Sprintf("<strong>%s</strong>", u.Name)}))
|
||||
//line views/admin.qtpl:150
|
||||
//line views/admin.qtpl:143
|
||||
qw422016.N().S(`</p>
|
||||
|
||||
<form action="" method="post">
|
||||
<button class="btn btn_destructive" type="submit">`)
|
||||
//line views/admin.qtpl:153
|
||||
//line views/admin.qtpl:146
|
||||
qw422016.E().S(lc.Get("admin.user_delete"))
|
||||
//line views/admin.qtpl:153
|
||||
//line views/admin.qtpl:146
|
||||
qw422016.N().S(`</button>
|
||||
<a class="btn btn_weak" href="/admin/users/`)
|
||||
//line views/admin.qtpl:154
|
||||
//line views/admin.qtpl:147
|
||||
qw422016.N().U(u.Name)
|
||||
//line views/admin.qtpl:154
|
||||
//line views/admin.qtpl:147
|
||||
qw422016.N().S(`/edit">`)
|
||||
//line views/admin.qtpl:154
|
||||
//line views/admin.qtpl:147
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/admin.qtpl:154
|
||||
//line views/admin.qtpl:147
|
||||
qw422016.N().S(`</a>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
func WriteAdminUserDelete(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
StreamAdminUserDelete(qw422016, u, f, lc)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
}
|
||||
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) string {
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
WriteAdminUserDelete(qb422016, u, f, lc)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
return qs422016
|
||||
//line views/admin.qtpl:158
|
||||
//line views/admin.qtpl:150
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
{% code
|
||||
lc := l18n.FromRequest(rq)
|
||||
%}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% if cfg.AllowRegistration %}
|
||||
@ -39,11 +38,9 @@
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func Login(lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% if cfg.UseAuth %}
|
||||
@ -69,7 +66,6 @@
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't.
|
||||
@ -81,7 +77,6 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
|
||||
{% endfunc %}
|
||||
|
||||
{% func LoginError(err string, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% switch err %}
|
||||
@ -95,11 +90,9 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
|
||||
<p><a href="/login">← {%s lc.Get("auth.try_again") %}</a></p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func Logout(can bool, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% if can %}
|
||||
@ -115,7 +108,6 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func Lock(lc *l18n.Localizer) %}
|
||||
@ -161,7 +153,6 @@ var userListL10n = map[string]l10nEntry{
|
||||
%}
|
||||
|
||||
{% func UserList(lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width user-list">
|
||||
{% code
|
||||
var get = func(key string) string {
|
||||
@ -208,5 +199,4 @@ sort.Strings(editors)
|
||||
{% endfor %}</ol>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
@ -42,489 +42,481 @@ func StreamRegister(qw422016 *qt422016.Writer, rq *http.Request) {
|
||||
|
||||
//line views/auth.qtpl:10
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line views/auth.qtpl:14
|
||||
//line views/auth.qtpl:13
|
||||
if cfg.AllowRegistration {
|
||||
//line views/auth.qtpl:14
|
||||
//line views/auth.qtpl:13
|
||||
qw422016.N().S(`
|
||||
<form class="modal" method="post" action="/register?`)
|
||||
//line views/auth.qtpl:15
|
||||
//line views/auth.qtpl:14
|
||||
qw422016.E().S(rq.URL.RawQuery)
|
||||
//line views/auth.qtpl:15
|
||||
//line views/auth.qtpl:14
|
||||
qw422016.N().S(`" id="register-form" enctype="multipart/form-data" autocomplete="off">
|
||||
<fieldset class="modal__fieldset">
|
||||
<legend class="modal__title">`)
|
||||
//line views/auth.qtpl:17
|
||||
//line views/auth.qtpl:16
|
||||
qw422016.E().S(lc.Get("auth.register_header", &l18n.Replacements{"name": cfg.WikiName}))
|
||||
//line views/auth.qtpl:17
|
||||
//line views/auth.qtpl:16
|
||||
qw422016.N().S(`</legend>
|
||||
|
||||
<label for="register-form__username">`)
|
||||
//line views/auth.qtpl:19
|
||||
//line views/auth.qtpl:18
|
||||
qw422016.E().S(lc.Get("auth.username"))
|
||||
//line views/auth.qtpl:19
|
||||
//line views/auth.qtpl:18
|
||||
qw422016.N().S(`</label>
|
||||
<br>
|
||||
<input type="text" required autofocus id="login-form__username" name="username">
|
||||
<br>
|
||||
<label for="login-form__password">`)
|
||||
//line views/auth.qtpl:23
|
||||
//line views/auth.qtpl:22
|
||||
qw422016.E().S(lc.Get("auth.password"))
|
||||
//line views/auth.qtpl:23
|
||||
//line views/auth.qtpl:22
|
||||
qw422016.N().S(`</label>
|
||||
<br>
|
||||
<input type="password" required name="password">
|
||||
<p>`)
|
||||
//line views/auth.qtpl:26
|
||||
//line views/auth.qtpl:25
|
||||
qw422016.E().S(lc.Get("auth.password_tip"))
|
||||
//line views/auth.qtpl:26
|
||||
//line views/auth.qtpl:25
|
||||
qw422016.N().S(`</p>
|
||||
<p>`)
|
||||
//line views/auth.qtpl:27
|
||||
//line views/auth.qtpl:26
|
||||
qw422016.E().S(lc.Get("auth.cookie_tip"))
|
||||
//line views/auth.qtpl:27
|
||||
//line views/auth.qtpl:26
|
||||
qw422016.N().S(`</p>
|
||||
<button class="btn" type="submit" value="Register">`)
|
||||
//line views/auth.qtpl:28
|
||||
//line views/auth.qtpl:27
|
||||
qw422016.E().S(lc.Get("auth.register_button"))
|
||||
//line views/auth.qtpl:28
|
||||
//line views/auth.qtpl:27
|
||||
qw422016.N().S(`</button>
|
||||
<a class="btn btn_weak" href="/`)
|
||||
//line views/auth.qtpl:29
|
||||
//line views/auth.qtpl:28
|
||||
qw422016.E().S(rq.URL.RawQuery)
|
||||
//line views/auth.qtpl:29
|
||||
//line views/auth.qtpl:28
|
||||
qw422016.N().S(`">`)
|
||||
//line views/auth.qtpl:29
|
||||
//line views/auth.qtpl:28
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/auth.qtpl:29
|
||||
//line views/auth.qtpl:28
|
||||
qw422016.N().S(`</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
`)
|
||||
//line views/auth.qtpl:32
|
||||
//line views/auth.qtpl:31
|
||||
streamtelegramWidget(qw422016, lc)
|
||||
//line views/auth.qtpl:31
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/auth.qtpl:32
|
||||
} else if cfg.UseAuth {
|
||||
//line views/auth.qtpl:32
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/auth.qtpl:33
|
||||
} else if cfg.UseAuth {
|
||||
//line views/auth.qtpl:33
|
||||
qw422016.N().S(`
|
||||
<p>`)
|
||||
//line views/auth.qtpl:34
|
||||
//line views/auth.qtpl:33
|
||||
qw422016.E().S(lc.Get("auth.noregister"))
|
||||
//line views/auth.qtpl:34
|
||||
//line views/auth.qtpl:33
|
||||
qw422016.N().S(`</p>
|
||||
<p><a href="/`)
|
||||
//line views/auth.qtpl:35
|
||||
//line views/auth.qtpl:34
|
||||
qw422016.E().S(rq.URL.RawQuery)
|
||||
//line views/auth.qtpl:35
|
||||
//line views/auth.qtpl:34
|
||||
qw422016.N().S(`">← `)
|
||||
//line views/auth.qtpl:35
|
||||
//line views/auth.qtpl:34
|
||||
qw422016.E().S(lc.Get("auth.go_back"))
|
||||
//line views/auth.qtpl:35
|
||||
//line views/auth.qtpl:34
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/auth.qtpl:36
|
||||
//line views/auth.qtpl:35
|
||||
} else {
|
||||
//line views/auth.qtpl:36
|
||||
//line views/auth.qtpl:35
|
||||
qw422016.N().S(`
|
||||
<p>`)
|
||||
//line views/auth.qtpl:37
|
||||
//line views/auth.qtpl:36
|
||||
qw422016.E().S(lc.Get("auth.noauth"))
|
||||
//line views/auth.qtpl:37
|
||||
//line views/auth.qtpl:36
|
||||
qw422016.N().S(`</p>
|
||||
<p><a href="/`)
|
||||
//line views/auth.qtpl:38
|
||||
//line views/auth.qtpl:37
|
||||
qw422016.E().S(rq.URL.RawQuery)
|
||||
//line views/auth.qtpl:38
|
||||
//line views/auth.qtpl:37
|
||||
qw422016.N().S(`">← `)
|
||||
//line views/auth.qtpl:38
|
||||
//line views/auth.qtpl:37
|
||||
qw422016.E().S(lc.Get("auth.go_back"))
|
||||
//line views/auth.qtpl:38
|
||||
//line views/auth.qtpl:37
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/auth.qtpl:39
|
||||
//line views/auth.qtpl:38
|
||||
}
|
||||
//line views/auth.qtpl:39
|
||||
//line views/auth.qtpl:38
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
func WriteRegister(qq422016 qtio422016.Writer, rq *http.Request) {
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
StreamRegister(qw422016, rq)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
func Register(rq *http.Request) string {
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
WriteRegister(qb422016, rq)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
return qs422016
|
||||
//line views/auth.qtpl:43
|
||||
//line views/auth.qtpl:41
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:45
|
||||
//line views/auth.qtpl:43
|
||||
func StreamLogin(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:45
|
||||
//line views/auth.qtpl:43
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line views/auth.qtpl:49
|
||||
//line views/auth.qtpl:46
|
||||
if cfg.UseAuth {
|
||||
//line views/auth.qtpl:49
|
||||
//line views/auth.qtpl:46
|
||||
qw422016.N().S(`
|
||||
<form class="modal" method="post" action="/login" id="login-form" enctype="multipart/form-data" autocomplete="on">
|
||||
<fieldset class="modal__fieldset">
|
||||
<legend class="modal__title">`)
|
||||
//line views/auth.qtpl:52
|
||||
//line views/auth.qtpl:49
|
||||
qw422016.E().S(lc.Get("auth.login_header", &l18n.Replacements{"name": cfg.WikiName}))
|
||||
//line views/auth.qtpl:52
|
||||
//line views/auth.qtpl:49
|
||||
qw422016.N().S(`</legend>
|
||||
<label for="login-form__username">`)
|
||||
//line views/auth.qtpl:53
|
||||
//line views/auth.qtpl:50
|
||||
qw422016.E().S(lc.Get("auth.username"))
|
||||
//line views/auth.qtpl:53
|
||||
//line views/auth.qtpl:50
|
||||
qw422016.N().S(`</label>
|
||||
<br>
|
||||
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
|
||||
<br>
|
||||
<label for="login-form__password">`)
|
||||
//line views/auth.qtpl:57
|
||||
//line views/auth.qtpl:54
|
||||
qw422016.E().S(lc.Get("auth.password"))
|
||||
//line views/auth.qtpl:57
|
||||
//line views/auth.qtpl:54
|
||||
qw422016.N().S(`</label>
|
||||
<br>
|
||||
<input type="password" required name="password" autocomplete="current-password">
|
||||
<p>`)
|
||||
//line views/auth.qtpl:60
|
||||
//line views/auth.qtpl:57
|
||||
qw422016.E().S(lc.Get("auth.cookie_tip"))
|
||||
//line views/auth.qtpl:60
|
||||
//line views/auth.qtpl:57
|
||||
qw422016.N().S(`</p>
|
||||
<button class="btn" type="submit" value="Log in">`)
|
||||
//line views/auth.qtpl:61
|
||||
//line views/auth.qtpl:58
|
||||
qw422016.E().S(lc.Get("auth.login_button"))
|
||||
//line views/auth.qtpl:61
|
||||
//line views/auth.qtpl:58
|
||||
qw422016.N().S(`</button>
|
||||
<a class="btn btn_weak" href="/">`)
|
||||
//line views/auth.qtpl:62
|
||||
//line views/auth.qtpl:59
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/auth.qtpl:62
|
||||
//line views/auth.qtpl:59
|
||||
qw422016.N().S(`</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
`)
|
||||
//line views/auth.qtpl:65
|
||||
//line views/auth.qtpl:62
|
||||
streamtelegramWidget(qw422016, lc)
|
||||
//line views/auth.qtpl:65
|
||||
//line views/auth.qtpl:62
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/auth.qtpl:66
|
||||
//line views/auth.qtpl:63
|
||||
} else {
|
||||
//line views/auth.qtpl:66
|
||||
//line views/auth.qtpl:63
|
||||
qw422016.N().S(`
|
||||
<p>`)
|
||||
//line views/auth.qtpl:67
|
||||
//line views/auth.qtpl:64
|
||||
qw422016.E().S(lc.Get("auth.noauth"))
|
||||
//line views/auth.qtpl:67
|
||||
//line views/auth.qtpl:64
|
||||
qw422016.N().S(`</p>
|
||||
<p><a class="btn btn_weak" href="/">← `)
|
||||
//line views/auth.qtpl:68
|
||||
//line views/auth.qtpl:65
|
||||
qw422016.E().S(lc.Get("auth.go_home"))
|
||||
//line views/auth.qtpl:68
|
||||
//line views/auth.qtpl:65
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/auth.qtpl:69
|
||||
//line views/auth.qtpl:66
|
||||
}
|
||||
//line views/auth.qtpl:69
|
||||
//line views/auth.qtpl:66
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
func WriteLogin(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
StreamLogin(qw422016, lc)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
func Login(lc *l18n.Localizer) string {
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
WriteLogin(qb422016, lc)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
return qs422016
|
||||
//line views/auth.qtpl:73
|
||||
//line views/auth.qtpl:69
|
||||
}
|
||||
|
||||
// Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't.
|
||||
|
||||
//line views/auth.qtpl:76
|
||||
//line views/auth.qtpl:72
|
||||
func streamtelegramWidget(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:76
|
||||
//line views/auth.qtpl:72
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/auth.qtpl:77
|
||||
//line views/auth.qtpl:73
|
||||
if cfg.TelegramEnabled {
|
||||
//line views/auth.qtpl:77
|
||||
//line views/auth.qtpl:73
|
||||
qw422016.N().S(`
|
||||
<p class="telegram-notice">`)
|
||||
//line views/auth.qtpl:78
|
||||
//line views/auth.qtpl:74
|
||||
qw422016.E().S(lc.Get("auth.telegram_tip"))
|
||||
//line views/auth.qtpl:78
|
||||
//line views/auth.qtpl:74
|
||||
qw422016.N().S(`</p>
|
||||
<script async src="https://telegram.org/js/telegram-widget.js?15" data-telegram-login="`)
|
||||
//line views/auth.qtpl:79
|
||||
//line views/auth.qtpl:75
|
||||
qw422016.E().S(cfg.TelegramBotName)
|
||||
//line views/auth.qtpl:79
|
||||
//line views/auth.qtpl:75
|
||||
qw422016.N().S(`" data-size="medium" data-userpic="false" data-auth-url="`)
|
||||
//line views/auth.qtpl:79
|
||||
//line views/auth.qtpl:75
|
||||
qw422016.E().S(cfg.URL)
|
||||
//line views/auth.qtpl:79
|
||||
//line views/auth.qtpl:75
|
||||
qw422016.N().S(`/telegram-login"></script>
|
||||
`)
|
||||
//line views/auth.qtpl:80
|
||||
//line views/auth.qtpl:76
|
||||
}
|
||||
//line views/auth.qtpl:80
|
||||
//line views/auth.qtpl:76
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
func writetelegramWidget(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
streamtelegramWidget(qw422016, lc)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
func telegramWidget(lc *l18n.Localizer) string {
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
writetelegramWidget(qb422016, lc)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
return qs422016
|
||||
//line views/auth.qtpl:81
|
||||
//line views/auth.qtpl:77
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:83
|
||||
//line views/auth.qtpl:79
|
||||
func StreamLoginError(qw422016 *qt422016.Writer, err string, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:83
|
||||
//line views/auth.qtpl:79
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line views/auth.qtpl:87
|
||||
//line views/auth.qtpl:82
|
||||
switch err {
|
||||
//line views/auth.qtpl:88
|
||||
//line views/auth.qtpl:83
|
||||
case "unknown username":
|
||||
//line views/auth.qtpl:88
|
||||
//line views/auth.qtpl:83
|
||||
qw422016.N().S(`
|
||||
<p class="error">`)
|
||||
//line views/auth.qtpl:89
|
||||
//line views/auth.qtpl:84
|
||||
qw422016.E().S(lc.Get("auth.error_username"))
|
||||
//line views/auth.qtpl:89
|
||||
//line views/auth.qtpl:84
|
||||
qw422016.N().S(`</p>
|
||||
`)
|
||||
//line views/auth.qtpl:90
|
||||
//line views/auth.qtpl:85
|
||||
case "wrong password":
|
||||
//line views/auth.qtpl:90
|
||||
//line views/auth.qtpl:85
|
||||
qw422016.N().S(`
|
||||
<p class="error">`)
|
||||
//line views/auth.qtpl:91
|
||||
//line views/auth.qtpl:86
|
||||
qw422016.E().S(lc.Get("auth.error_password"))
|
||||
//line views/auth.qtpl:91
|
||||
//line views/auth.qtpl:86
|
||||
qw422016.N().S(`</p>
|
||||
`)
|
||||
//line views/auth.qtpl:92
|
||||
//line views/auth.qtpl:87
|
||||
default:
|
||||
//line views/auth.qtpl:92
|
||||
//line views/auth.qtpl:87
|
||||
qw422016.N().S(`
|
||||
<p class="error">`)
|
||||
//line views/auth.qtpl:93
|
||||
//line views/auth.qtpl:88
|
||||
qw422016.E().S(err)
|
||||
//line views/auth.qtpl:93
|
||||
//line views/auth.qtpl:88
|
||||
qw422016.N().S(`</p>
|
||||
`)
|
||||
//line views/auth.qtpl:94
|
||||
//line views/auth.qtpl:89
|
||||
}
|
||||
//line views/auth.qtpl:94
|
||||
//line views/auth.qtpl:89
|
||||
qw422016.N().S(`
|
||||
<p><a href="/login">← `)
|
||||
//line views/auth.qtpl:95
|
||||
//line views/auth.qtpl:90
|
||||
qw422016.E().S(lc.Get("auth.try_again"))
|
||||
//line views/auth.qtpl:95
|
||||
//line views/auth.qtpl:90
|
||||
qw422016.N().S(`</a></p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
func WriteLoginError(qq422016 qtio422016.Writer, err string, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
StreamLoginError(qw422016, err, lc)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
func LoginError(err string, lc *l18n.Localizer) string {
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
WriteLoginError(qb422016, err, lc)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
return qs422016
|
||||
//line views/auth.qtpl:99
|
||||
//line views/auth.qtpl:93
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:101
|
||||
//line views/auth.qtpl:95
|
||||
func StreamLogout(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:101
|
||||
//line views/auth.qtpl:95
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line views/auth.qtpl:105
|
||||
//line views/auth.qtpl:98
|
||||
if can {
|
||||
//line views/auth.qtpl:105
|
||||
//line views/auth.qtpl:98
|
||||
qw422016.N().S(`
|
||||
<h1>`)
|
||||
//line views/auth.qtpl:106
|
||||
//line views/auth.qtpl:99
|
||||
qw422016.E().S(lc.Get("auth.logout_header"))
|
||||
//line views/auth.qtpl:106
|
||||
//line views/auth.qtpl:99
|
||||
qw422016.N().S(`</h1>
|
||||
<form method="POST" action="/logout">
|
||||
<input class="btn btn_accent" type="submit" value="`)
|
||||
//line views/auth.qtpl:108
|
||||
//line views/auth.qtpl:101
|
||||
qw422016.E().S(lc.Get("auth.logout_button"))
|
||||
//line views/auth.qtpl:108
|
||||
//line views/auth.qtpl:101
|
||||
qw422016.N().S(`"/>
|
||||
<a class="btn btn_weak" href="/">`)
|
||||
//line views/auth.qtpl:109
|
||||
//line views/auth.qtpl:102
|
||||
qw422016.E().S(lc.Get("auth.go_home"))
|
||||
//line views/auth.qtpl:109
|
||||
//line views/auth.qtpl:102
|
||||
qw422016.N().S(`</a>
|
||||
</form>
|
||||
`)
|
||||
//line views/auth.qtpl:111
|
||||
//line views/auth.qtpl:104
|
||||
} else {
|
||||
//line views/auth.qtpl:111
|
||||
//line views/auth.qtpl:104
|
||||
qw422016.N().S(`
|
||||
<p>`)
|
||||
//line views/auth.qtpl:112
|
||||
//line views/auth.qtpl:105
|
||||
qw422016.E().S(lc.Get("auth.logout_anon"))
|
||||
//line views/auth.qtpl:112
|
||||
//line views/auth.qtpl:105
|
||||
qw422016.N().S(`</p>
|
||||
<p><a href="/login">`)
|
||||
//line views/auth.qtpl:113
|
||||
//line views/auth.qtpl:106
|
||||
qw422016.E().S(lc.Get("auth.login_title"))
|
||||
//line views/auth.qtpl:113
|
||||
//line views/auth.qtpl:106
|
||||
qw422016.N().S(`</a></p>
|
||||
<p><a href="/">← `)
|
||||
//line views/auth.qtpl:114
|
||||
//line views/auth.qtpl:107
|
||||
qw422016.E().S(lc.Get("auth.go_home"))
|
||||
//line views/auth.qtpl:114
|
||||
//line views/auth.qtpl:107
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/auth.qtpl:115
|
||||
//line views/auth.qtpl:108
|
||||
}
|
||||
//line views/auth.qtpl:115
|
||||
//line views/auth.qtpl:108
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
func WriteLogout(qq422016 qtio422016.Writer, can bool, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
StreamLogout(qw422016, can, lc)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
func Logout(can bool, lc *l18n.Localizer) string {
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
WriteLogout(qb422016, can, lc)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
return qs422016
|
||||
//line views/auth.qtpl:119
|
||||
//line views/auth.qtpl:111
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:121
|
||||
//line views/auth.qtpl:113
|
||||
func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:121
|
||||
//line views/auth.qtpl:113
|
||||
qw422016.N().S(`
|
||||
<!doctype html>
|
||||
<html>
|
||||
@ -532,9 +524,9 @@ func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>🔒 `)
|
||||
//line views/auth.qtpl:127
|
||||
//line views/auth.qtpl:119
|
||||
qw422016.E().S(lc.Get("auth.lock_title"))
|
||||
//line views/auth.qtpl:127
|
||||
//line views/auth.qtpl:119
|
||||
qw422016.N().S(`</title>
|
||||
<link rel="shortcut icon" href="/static/favicon.ico">
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
@ -544,73 +536,73 @@ func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
<section class="locked-notice__message">
|
||||
<p class="locked-notice__lock">🔒</p>
|
||||
<h1 class="locked-notice__title">`)
|
||||
//line views/auth.qtpl:135
|
||||
//line views/auth.qtpl:127
|
||||
qw422016.E().S(lc.Get("auth.lock_title"))
|
||||
//line views/auth.qtpl:135
|
||||
//line views/auth.qtpl:127
|
||||
qw422016.N().S(`</h1>
|
||||
<form class="locked-notice__login-form" method="post" action="/login" id="login-form" enctype="multipart/form-data" autocomplete="on">
|
||||
<label for="login-form__username">`)
|
||||
//line views/auth.qtpl:137
|
||||
//line views/auth.qtpl:129
|
||||
qw422016.E().S(lc.Get("auth.username"))
|
||||
//line views/auth.qtpl:137
|
||||
//line views/auth.qtpl:129
|
||||
qw422016.N().S(`</label>
|
||||
<br>
|
||||
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
|
||||
<br>
|
||||
<label for="login-form__password">`)
|
||||
//line views/auth.qtpl:141
|
||||
//line views/auth.qtpl:133
|
||||
qw422016.E().S(lc.Get("auth.password"))
|
||||
//line views/auth.qtpl:141
|
||||
//line views/auth.qtpl:133
|
||||
qw422016.N().S(`</label>
|
||||
<br>
|
||||
<input type="password" required name="password" autocomplete="current-password">
|
||||
<br>
|
||||
<button class="btn" type="submit" value="Log in">`)
|
||||
//line views/auth.qtpl:145
|
||||
//line views/auth.qtpl:137
|
||||
qw422016.E().S(lc.Get("auth.login_button"))
|
||||
//line views/auth.qtpl:145
|
||||
//line views/auth.qtpl:137
|
||||
qw422016.N().S(`</button>
|
||||
</form>
|
||||
`)
|
||||
//line views/auth.qtpl:147
|
||||
//line views/auth.qtpl:139
|
||||
streamtelegramWidget(qw422016, lc)
|
||||
//line views/auth.qtpl:147
|
||||
//line views/auth.qtpl:139
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
`)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
func WriteLock(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
StreamLock(qw422016, lc)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
func Lock(lc *l18n.Localizer) string {
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
WriteLock(qb422016, lc)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
return qs422016
|
||||
//line views/auth.qtpl:152
|
||||
//line views/auth.qtpl:144
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:155
|
||||
//line views/auth.qtpl:147
|
||||
var userListL10n = map[string]l10nEntry{
|
||||
"heading": en("List of users").ru("Список пользователей"),
|
||||
"administrators": en("Administrators").ru("Администраторы"),
|
||||
@ -618,14 +610,13 @@ var userListL10n = map[string]l10nEntry{
|
||||
"editors": en("Editors").ru("Редакторы"),
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:163
|
||||
//line views/auth.qtpl:155
|
||||
func StreamUserList(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:163
|
||||
//line views/auth.qtpl:155
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width user-list">
|
||||
`)
|
||||
//line views/auth.qtpl:167
|
||||
//line views/auth.qtpl:158
|
||||
var get = func(key string) string {
|
||||
return userListL10n[key].get(lc.Locale)
|
||||
}
|
||||
@ -650,131 +641,130 @@ func StreamUserList(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
sort.Strings(moderators)
|
||||
sort.Strings(editors)
|
||||
|
||||
//line views/auth.qtpl:190
|
||||
//line views/auth.qtpl:181
|
||||
qw422016.N().S(`
|
||||
<h1>`)
|
||||
//line views/auth.qtpl:191
|
||||
//line views/auth.qtpl:182
|
||||
qw422016.E().S(get("heading"))
|
||||
//line views/auth.qtpl:191
|
||||
//line views/auth.qtpl:182
|
||||
qw422016.N().S(`</h1>
|
||||
<section>
|
||||
<h2>`)
|
||||
//line views/auth.qtpl:193
|
||||
//line views/auth.qtpl:184
|
||||
qw422016.E().S(get("administrators"))
|
||||
//line views/auth.qtpl:193
|
||||
//line views/auth.qtpl:184
|
||||
qw422016.N().S(`</h2>
|
||||
<ol>`)
|
||||
//line views/auth.qtpl:194
|
||||
//line views/auth.qtpl:185
|
||||
for _, name := range admins {
|
||||
//line views/auth.qtpl:194
|
||||
//line views/auth.qtpl:185
|
||||
qw422016.N().S(`
|
||||
<li><a href="/hypha/`)
|
||||
//line views/auth.qtpl:195
|
||||
//line views/auth.qtpl:186
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/auth.qtpl:195
|
||||
//line views/auth.qtpl:186
|
||||
qw422016.N().S(`/`)
|
||||
//line views/auth.qtpl:195
|
||||
//line views/auth.qtpl:186
|
||||
qw422016.E().S(name)
|
||||
//line views/auth.qtpl:195
|
||||
//line views/auth.qtpl:186
|
||||
qw422016.N().S(`">`)
|
||||
//line views/auth.qtpl:195
|
||||
//line views/auth.qtpl:186
|
||||
qw422016.E().S(name)
|
||||
//line views/auth.qtpl:195
|
||||
//line views/auth.qtpl:186
|
||||
qw422016.N().S(`</a></li>
|
||||
`)
|
||||
//line views/auth.qtpl:196
|
||||
//line views/auth.qtpl:187
|
||||
}
|
||||
//line views/auth.qtpl:196
|
||||
//line views/auth.qtpl:187
|
||||
qw422016.N().S(`</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>`)
|
||||
//line views/auth.qtpl:199
|
||||
//line views/auth.qtpl:190
|
||||
qw422016.E().S(get("moderators"))
|
||||
//line views/auth.qtpl:199
|
||||
//line views/auth.qtpl:190
|
||||
qw422016.N().S(`</h2>
|
||||
<ol>`)
|
||||
//line views/auth.qtpl:200
|
||||
//line views/auth.qtpl:191
|
||||
for _, name := range moderators {
|
||||
//line views/auth.qtpl:200
|
||||
//line views/auth.qtpl:191
|
||||
qw422016.N().S(`
|
||||
<li><a href="/hypha/`)
|
||||
//line views/auth.qtpl:201
|
||||
//line views/auth.qtpl:192
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/auth.qtpl:201
|
||||
//line views/auth.qtpl:192
|
||||
qw422016.N().S(`/`)
|
||||
//line views/auth.qtpl:201
|
||||
//line views/auth.qtpl:192
|
||||
qw422016.E().S(name)
|
||||
//line views/auth.qtpl:201
|
||||
//line views/auth.qtpl:192
|
||||
qw422016.N().S(`">`)
|
||||
//line views/auth.qtpl:201
|
||||
//line views/auth.qtpl:192
|
||||
qw422016.E().S(name)
|
||||
//line views/auth.qtpl:201
|
||||
//line views/auth.qtpl:192
|
||||
qw422016.N().S(`</a></li>
|
||||
`)
|
||||
//line views/auth.qtpl:202
|
||||
//line views/auth.qtpl:193
|
||||
}
|
||||
//line views/auth.qtpl:202
|
||||
//line views/auth.qtpl:193
|
||||
qw422016.N().S(`</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>`)
|
||||
//line views/auth.qtpl:205
|
||||
//line views/auth.qtpl:196
|
||||
qw422016.E().S(get("editors"))
|
||||
//line views/auth.qtpl:205
|
||||
//line views/auth.qtpl:196
|
||||
qw422016.N().S(`</h2>
|
||||
<ol>`)
|
||||
//line views/auth.qtpl:206
|
||||
//line views/auth.qtpl:197
|
||||
for _, name := range editors {
|
||||
//line views/auth.qtpl:206
|
||||
//line views/auth.qtpl:197
|
||||
qw422016.N().S(`
|
||||
<li><a href="/hypha/`)
|
||||
//line views/auth.qtpl:207
|
||||
//line views/auth.qtpl:198
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/auth.qtpl:207
|
||||
//line views/auth.qtpl:198
|
||||
qw422016.N().S(`/`)
|
||||
//line views/auth.qtpl:207
|
||||
//line views/auth.qtpl:198
|
||||
qw422016.E().S(name)
|
||||
//line views/auth.qtpl:207
|
||||
//line views/auth.qtpl:198
|
||||
qw422016.N().S(`">`)
|
||||
//line views/auth.qtpl:207
|
||||
//line views/auth.qtpl:198
|
||||
qw422016.E().S(name)
|
||||
//line views/auth.qtpl:207
|
||||
//line views/auth.qtpl:198
|
||||
qw422016.N().S(`</a></li>
|
||||
`)
|
||||
//line views/auth.qtpl:208
|
||||
//line views/auth.qtpl:199
|
||||
}
|
||||
//line views/auth.qtpl:208
|
||||
//line views/auth.qtpl:199
|
||||
qw422016.N().S(`</ol>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
func WriteUserList(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
StreamUserList(qw422016, lc)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
}
|
||||
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
func UserList(lc *l18n.Localizer) string {
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
WriteUserList(qb422016, lc)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
return qs422016
|
||||
//line views/auth.qtpl:212
|
||||
//line views/auth.qtpl:202
|
||||
}
|
||||
|
@ -17,18 +17,15 @@ if err != nil {
|
||||
text = err.Error()
|
||||
}
|
||||
%}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<h1>{%s= lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName()), "rev": hash}) %}</h1>
|
||||
<pre class="codeblock"><code>{%s text %}</code></pre>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func RecentChanges(n int, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width recent-changes">
|
||||
<h1>{%s lc.Get("ui.recent_heading") %}</h1>
|
||||
|
||||
@ -84,7 +81,6 @@ if err != nil {
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func recentChanges(rev history.Revision) %}
|
||||
@ -111,12 +107,10 @@ if err != nil {
|
||||
{% endfunc %}
|
||||
|
||||
{% func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>{%s= fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName)) %}</h1>
|
||||
{%s= list %}
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -55,393 +55,387 @@ func StreamPrimitiveDiff(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.E
|
||||
|
||||
//line views/history.qtpl:19
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<h1>`)
|
||||
//line views/history.qtpl:23
|
||||
//line views/history.qtpl:22
|
||||
qw422016.N().S(lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName()), "rev": hash}))
|
||||
//line views/history.qtpl:23
|
||||
//line views/history.qtpl:22
|
||||
qw422016.N().S(`</h1>
|
||||
<pre class="codeblock"><code>`)
|
||||
//line views/history.qtpl:24
|
||||
//line views/history.qtpl:23
|
||||
qw422016.E().S(text)
|
||||
//line views/history.qtpl:24
|
||||
//line views/history.qtpl:23
|
||||
qw422016.N().S(`</code></pre>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
}
|
||||
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
func WritePrimitiveDiff(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) {
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
StreamPrimitiveDiff(qw422016, rq, h, u, hash)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
}
|
||||
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
func PrimitiveDiff(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) string {
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
WritePrimitiveDiff(qb422016, rq, h, u, hash)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
return qs422016
|
||||
//line views/history.qtpl:28
|
||||
//line views/history.qtpl:26
|
||||
}
|
||||
|
||||
//line views/history.qtpl:30
|
||||
//line views/history.qtpl:28
|
||||
func StreamRecentChanges(qw422016 *qt422016.Writer, n int, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:30
|
||||
//line views/history.qtpl:28
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width recent-changes">
|
||||
<h1>`)
|
||||
//line views/history.qtpl:33
|
||||
//line views/history.qtpl:30
|
||||
qw422016.E().S(lc.Get("ui.recent_heading"))
|
||||
//line views/history.qtpl:33
|
||||
//line views/history.qtpl:30
|
||||
qw422016.N().S(`</h1>
|
||||
|
||||
<nav class="recent-changes__count">
|
||||
`)
|
||||
//line views/history.qtpl:36
|
||||
//line views/history.qtpl:33
|
||||
qw422016.E().S(lc.Get("ui.recent_count_pre"))
|
||||
//line views/history.qtpl:36
|
||||
//line views/history.qtpl:33
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:37
|
||||
//line views/history.qtpl:34
|
||||
for i, m := range []int{20, 50, 100} {
|
||||
//line views/history.qtpl:37
|
||||
//line views/history.qtpl:34
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:38
|
||||
//line views/history.qtpl:35
|
||||
if i > 0 {
|
||||
//line views/history.qtpl:38
|
||||
//line views/history.qtpl:35
|
||||
qw422016.N().S(`
|
||||
<span aria-hidden="true">|</span>
|
||||
`)
|
||||
//line views/history.qtpl:40
|
||||
//line views/history.qtpl:37
|
||||
}
|
||||
//line views/history.qtpl:40
|
||||
//line views/history.qtpl:37
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:41
|
||||
//line views/history.qtpl:38
|
||||
if m == n {
|
||||
//line views/history.qtpl:41
|
||||
//line views/history.qtpl:38
|
||||
qw422016.N().S(`
|
||||
<b>`)
|
||||
//line views/history.qtpl:42
|
||||
//line views/history.qtpl:39
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:42
|
||||
//line views/history.qtpl:39
|
||||
qw422016.N().S(`</b>
|
||||
`)
|
||||
//line views/history.qtpl:43
|
||||
//line views/history.qtpl:40
|
||||
} else {
|
||||
//line views/history.qtpl:43
|
||||
//line views/history.qtpl:40
|
||||
qw422016.N().S(`
|
||||
<a href="/recent-changes/`)
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:41
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:41
|
||||
qw422016.N().S(`">`)
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:41
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:41
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:42
|
||||
}
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:42
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:46
|
||||
//line views/history.qtpl:43
|
||||
}
|
||||
//line views/history.qtpl:46
|
||||
//line views/history.qtpl:43
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:47
|
||||
//line views/history.qtpl:44
|
||||
qw422016.E().S(lc.Get("ui.recent_count_post"))
|
||||
//line views/history.qtpl:47
|
||||
//line views/history.qtpl:44
|
||||
qw422016.N().S(`
|
||||
</nav>
|
||||
|
||||
<p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">`)
|
||||
//line views/history.qtpl:50
|
||||
//line views/history.qtpl:47
|
||||
qw422016.N().S(lc.Get("ui.recent_subscribe", &l18n.Replacements{"rss": "<a href=\"/recent-changes-rss\">RSS</a>", "atom": "<a href=\"/recent-changes-atom\">Atom</a>", "json": fmt.Sprintf("<a href=\"/recent-changes-json\">%s</a>", lc.Get("ui.recent_subscribe_json"))}))
|
||||
//line views/history.qtpl:50
|
||||
//line views/history.qtpl:47
|
||||
qw422016.N().S(`</p>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:57
|
||||
//line views/history.qtpl:54
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:60
|
||||
//line views/history.qtpl:57
|
||||
changes := history.RecentChanges(n)
|
||||
var year, day int
|
||||
var month time.Month
|
||||
|
||||
//line views/history.qtpl:63
|
||||
//line views/history.qtpl:60
|
||||
qw422016.N().S(`
|
||||
<section class="recent-changes__list" role="feed">
|
||||
`)
|
||||
//line views/history.qtpl:65
|
||||
//line views/history.qtpl:62
|
||||
if len(changes) == 0 {
|
||||
//line views/history.qtpl:65
|
||||
//line views/history.qtpl:62
|
||||
qw422016.N().S(`
|
||||
<p>`)
|
||||
//line views/history.qtpl:66
|
||||
//line views/history.qtpl:63
|
||||
qw422016.E().S(lc.Get("ui.recent_empty"))
|
||||
//line views/history.qtpl:66
|
||||
//line views/history.qtpl:63
|
||||
qw422016.N().S(`</p>
|
||||
`)
|
||||
//line views/history.qtpl:67
|
||||
//line views/history.qtpl:64
|
||||
} else {
|
||||
//line views/history.qtpl:67
|
||||
//line views/history.qtpl:64
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:68
|
||||
//line views/history.qtpl:65
|
||||
for i, entry := range changes {
|
||||
//line views/history.qtpl:68
|
||||
//line views/history.qtpl:65
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:70
|
||||
//line views/history.qtpl:67
|
||||
y, m, d := entry.Time.UTC().Date()
|
||||
|
||||
//line views/history.qtpl:70
|
||||
//line views/history.qtpl:67
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:71
|
||||
//line views/history.qtpl:68
|
||||
if d != day || m != month || y != year {
|
||||
//line views/history.qtpl:71
|
||||
//line views/history.qtpl:68
|
||||
qw422016.N().S(`
|
||||
<h2 class="recent-changes__heading">
|
||||
`)
|
||||
//line views/history.qtpl:73
|
||||
//line views/history.qtpl:70
|
||||
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
|
||||
//line views/history.qtpl:73
|
||||
//line views/history.qtpl:70
|
||||
qw422016.N().S(`
|
||||
</h2>
|
||||
`)
|
||||
//line views/history.qtpl:75
|
||||
//line views/history.qtpl:72
|
||||
year, month, day = y, m, d
|
||||
|
||||
//line views/history.qtpl:75
|
||||
//line views/history.qtpl:72
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:76
|
||||
//line views/history.qtpl:73
|
||||
}
|
||||
//line views/history.qtpl:76
|
||||
//line views/history.qtpl:73
|
||||
qw422016.N().S(`
|
||||
|
||||
<div class="recent-changes__entry" role="article"
|
||||
aria-setsize="`)
|
||||
//line views/history.qtpl:79
|
||||
//line views/history.qtpl:76
|
||||
qw422016.N().D(n)
|
||||
//line views/history.qtpl:79
|
||||
//line views/history.qtpl:76
|
||||
qw422016.N().S(`" aria-posinset="`)
|
||||
//line views/history.qtpl:79
|
||||
//line views/history.qtpl:76
|
||||
qw422016.N().D(i)
|
||||
//line views/history.qtpl:79
|
||||
//line views/history.qtpl:76
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line views/history.qtpl:80
|
||||
//line views/history.qtpl:77
|
||||
qw422016.N().S(recentChanges(entry))
|
||||
//line views/history.qtpl:80
|
||||
//line views/history.qtpl:77
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:83
|
||||
//line views/history.qtpl:80
|
||||
}
|
||||
//line views/history.qtpl:83
|
||||
//line views/history.qtpl:80
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:84
|
||||
//line views/history.qtpl:81
|
||||
}
|
||||
//line views/history.qtpl:84
|
||||
//line views/history.qtpl:81
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
}
|
||||
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
func WriteRecentChanges(qq422016 qtio422016.Writer, n int, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
StreamRecentChanges(qw422016, n, lc)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
}
|
||||
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
func RecentChanges(n int, lc *l18n.Localizer) string {
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
WriteRecentChanges(qb422016, n, lc)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
return qs422016
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:84
|
||||
}
|
||||
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:86
|
||||
func streamrecentChanges(qw422016 *qt422016.Writer, rev history.Revision) {
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:86
|
||||
qw422016.N().S(`
|
||||
<div>
|
||||
<time class="recent-changes__entry__time">
|
||||
`)
|
||||
//line views/history.qtpl:93
|
||||
//line views/history.qtpl:89
|
||||
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
|
||||
//line views/history.qtpl:93
|
||||
//line views/history.qtpl:89
|
||||
qw422016.N().S(`
|
||||
</time>
|
||||
<span class="recent-changes__entry__message">`)
|
||||
//line views/history.qtpl:95
|
||||
//line views/history.qtpl:91
|
||||
qw422016.E().S(rev.Hash)
|
||||
//line views/history.qtpl:95
|
||||
//line views/history.qtpl:91
|
||||
qw422016.N().S(`</span>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:97
|
||||
//line views/history.qtpl:93
|
||||
if rev.Username != "anon" {
|
||||
//line views/history.qtpl:97
|
||||
//line views/history.qtpl:93
|
||||
qw422016.N().S(`
|
||||
<span class="recent-changes__entry__author">
|
||||
— <a href="/hypha/`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:95
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:95
|
||||
qw422016.N().S(`/`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:95
|
||||
qw422016.E().S(rev.Username)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:95
|
||||
qw422016.N().S(`" rel="author">`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:95
|
||||
qw422016.E().S(rev.Username)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:95
|
||||
qw422016.N().S(`</a>
|
||||
</span>
|
||||
`)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:97
|
||||
}
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:97
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
<div>
|
||||
<span class="recent-changes__entry__links">
|
||||
`)
|
||||
//line views/history.qtpl:105
|
||||
//line views/history.qtpl:101
|
||||
qw422016.N().S(rev.HyphaeLinksHTML())
|
||||
//line views/history.qtpl:105
|
||||
//line views/history.qtpl:101
|
||||
qw422016.N().S(`
|
||||
</span>
|
||||
<span class="recent-changes__entry__message">
|
||||
`)
|
||||
//line views/history.qtpl:108
|
||||
//line views/history.qtpl:104
|
||||
qw422016.E().S(rev.Message)
|
||||
//line views/history.qtpl:108
|
||||
//line views/history.qtpl:104
|
||||
qw422016.N().S(`
|
||||
</span>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
}
|
||||
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
func writerecentChanges(qq422016 qtio422016.Writer, rev history.Revision) {
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
streamrecentChanges(qw422016, rev)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
}
|
||||
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
func recentChanges(rev history.Revision) string {
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
writerecentChanges(qb422016, rev)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
return qs422016
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:107
|
||||
}
|
||||
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:109
|
||||
func StreamHistory(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:109
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>`)
|
||||
//line views/history.qtpl:117
|
||||
//line views/history.qtpl:112
|
||||
qw422016.N().S(fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName)))
|
||||
//line views/history.qtpl:117
|
||||
//line views/history.qtpl:112
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/history.qtpl:118
|
||||
//line views/history.qtpl:113
|
||||
qw422016.N().S(list)
|
||||
//line views/history.qtpl:118
|
||||
//line views/history.qtpl:113
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
}
|
||||
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
func WriteHistory(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
StreamHistory(qw422016, rq, hyphaName, list, lc)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
}
|
||||
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) string {
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
WriteHistory(qb422016, rq, hyphaName, list, lc)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
return qs422016
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:116
|
||||
}
|
||||
|
@ -55,7 +55,6 @@ bloody hell !!
|
||||
{% endfunc %}
|
||||
|
||||
{% func modalBegin(path, hyphaName, formAttrs, legend string) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<form class="modal" action="/{%s path %}/{%s hyphaName %}"{%s= formAttrs %}>
|
||||
<fieldset class="modal__fieldset">
|
||||
@ -68,5 +67,4 @@ bloody hell !!
|
||||
</fieldset>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -272,113 +272,111 @@ func modalReallyWant(hyphaName, verb string, lc *l18n.Localizer) string {
|
||||
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
|
||||
//line views/modal.qtpl:57
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<form class="modal" action="/`)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016.E().S(path)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016.N().S(`/`)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016.N().S(`"`)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016.N().S(formAttrs)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016.N().S(`>
|
||||
<fieldset class="modal__fieldset">
|
||||
<legend class="modal__title">`)
|
||||
//line views/modal.qtpl:62
|
||||
//line views/modal.qtpl:61
|
||||
qw422016.N().S(legend)
|
||||
//line views/modal.qtpl:62
|
||||
//line views/modal.qtpl:61
|
||||
qw422016.N().S(`</legend>
|
||||
`)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
func modalBegin(path, hyphaName, formAttrs, legend string) string {
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
return qs422016
|
||||
//line views/modal.qtpl:63
|
||||
//line views/modal.qtpl:62
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:65
|
||||
//line views/modal.qtpl:64
|
||||
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
|
||||
//line views/modal.qtpl:65
|
||||
//line views/modal.qtpl:64
|
||||
qw422016.N().S(`
|
||||
<button type="submit" value="Confirm" class="btn" `)
|
||||
//line views/modal.qtpl:66
|
||||
//line views/modal.qtpl:65
|
||||
if shouldFocusOnConfirm {
|
||||
//line views/modal.qtpl:66
|
||||
//line views/modal.qtpl:65
|
||||
qw422016.N().S(`autofocus`)
|
||||
//line views/modal.qtpl:66
|
||||
//line views/modal.qtpl:65
|
||||
}
|
||||
//line views/modal.qtpl:66
|
||||
//line views/modal.qtpl:65
|
||||
qw422016.N().S(`>`)
|
||||
//line views/modal.qtpl:66
|
||||
//line views/modal.qtpl:65
|
||||
qw422016.E().S(lc.Get("ui.confirm"))
|
||||
//line views/modal.qtpl:66
|
||||
//line views/modal.qtpl:65
|
||||
qw422016.N().S(`</button>
|
||||
<a href="/hypha/`)
|
||||
//line views/modal.qtpl:67
|
||||
//line views/modal.qtpl:66
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/modal.qtpl:67
|
||||
//line views/modal.qtpl:66
|
||||
qw422016.N().S(`" class="btn btn_weak">`)
|
||||
//line views/modal.qtpl:67
|
||||
//line views/modal.qtpl:66
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/modal.qtpl:67
|
||||
//line views/modal.qtpl:66
|
||||
qw422016.N().S(`</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm, lc)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
func modalEnd(hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) string {
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm, lc)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
return qs422016
|
||||
//line views/modal.qtpl:72
|
||||
//line views/modal.qtpl:70
|
||||
}
|
||||
|
@ -69,7 +69,6 @@
|
||||
{% code
|
||||
lc := l18n.FromRequest(rq)
|
||||
%}
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_no-preview">
|
||||
<h1 class="edit__title">{%s= fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)) %}</h1>
|
||||
{%s= warning %}
|
||||
@ -86,7 +85,6 @@
|
||||
</form>
|
||||
</main>
|
||||
{%s= Toolbar(user.FromRequest(rq), lc) %}
|
||||
</div>
|
||||
{%= editScripts() %}
|
||||
{% endfunc %}
|
||||
|
||||
@ -94,7 +92,6 @@
|
||||
{% code
|
||||
lc := l18n.FromRequest(rq)
|
||||
%}
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_with-preview">
|
||||
<h1 class="edit__title">{%s= fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)) %}</h1>
|
||||
{%s= warning %}
|
||||
@ -113,7 +110,6 @@
|
||||
<article class="edit__preview">{%s= renderedPage %}</article>
|
||||
</main>
|
||||
{%s= Toolbar(user.FromRequest(rq), lc) %}
|
||||
</div>
|
||||
{%= editScripts() %}
|
||||
{% endfunc %}
|
||||
|
||||
|
@ -189,262 +189,258 @@ func StreamEditor(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAr
|
||||
|
||||
//line views/mutators.qtpl:71
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_no-preview">
|
||||
<h1 class="edit__title">`)
|
||||
//line views/mutators.qtpl:74
|
||||
//line views/mutators.qtpl:73
|
||||
qw422016.N().S(fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)))
|
||||
//line views/mutators.qtpl:74
|
||||
//line views/mutators.qtpl:73
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/mutators.qtpl:75
|
||||
//line views/mutators.qtpl:74
|
||||
qw422016.N().S(warning)
|
||||
//line views/mutators.qtpl:75
|
||||
//line views/mutators.qtpl:74
|
||||
qw422016.N().S(`
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/`)
|
||||
//line views/mutators.qtpl:77
|
||||
//line views/mutators.qtpl:76
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:77
|
||||
//line views/mutators.qtpl:76
|
||||
qw422016.N().S(`">
|
||||
<textarea name="text" class="edit-form__textarea" autofocus>`)
|
||||
//line views/mutators.qtpl:78
|
||||
//line views/mutators.qtpl:77
|
||||
qw422016.E().S(textAreaFill)
|
||||
//line views/mutators.qtpl:78
|
||||
//line views/mutators.qtpl:77
|
||||
qw422016.N().S(`</textarea>
|
||||
<br><br>
|
||||
<label for="text">`)
|
||||
//line views/mutators.qtpl:80
|
||||
//line views/mutators.qtpl:79
|
||||
qw422016.E().S(lc.Get("edit.tag"))
|
||||
//line views/mutators.qtpl:80
|
||||
//line views/mutators.qtpl:79
|
||||
qw422016.N().S(`</label><br>
|
||||
<input id="text" type="text" name="message" class="edit-form__message">
|
||||
<br><br>
|
||||
<button type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">`)
|
||||
//line views/mutators.qtpl:83
|
||||
//line views/mutators.qtpl:82
|
||||
qw422016.E().S(lc.Get("edit.save"))
|
||||
//line views/mutators.qtpl:83
|
||||
//line views/mutators.qtpl:82
|
||||
qw422016.N().S(`</button>
|
||||
<button type="submit" name="action" class="btn edit-form__preview" value="Preview">`)
|
||||
//line views/mutators.qtpl:84
|
||||
//line views/mutators.qtpl:83
|
||||
qw422016.E().S(lc.Get("edit.preview"))
|
||||
//line views/mutators.qtpl:84
|
||||
//line views/mutators.qtpl:83
|
||||
qw422016.N().S(`</button>
|
||||
<a href="/hypha/`)
|
||||
//line views/mutators.qtpl:85
|
||||
//line views/mutators.qtpl:84
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:85
|
||||
//line views/mutators.qtpl:84
|
||||
qw422016.N().S(`" class="btn btn_weak">`)
|
||||
//line views/mutators.qtpl:85
|
||||
//line views/mutators.qtpl:84
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/mutators.qtpl:85
|
||||
//line views/mutators.qtpl:84
|
||||
qw422016.N().S(`</a>
|
||||
</form>
|
||||
</main>
|
||||
`)
|
||||
//line views/mutators.qtpl:88
|
||||
//line views/mutators.qtpl:87
|
||||
qw422016.N().S(Toolbar(user.FromRequest(rq), lc))
|
||||
//line views/mutators.qtpl:87
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:88
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:88
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/mutators.qtpl:90
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:90
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
func WriteEditor(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
StreamEditor(qw422016, rq, hyphaName, textAreaFill, warning)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
func Editor(rq *http.Request, hyphaName, textAreaFill, warning string) string {
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
WriteEditor(qb422016, rq, hyphaName, textAreaFill, warning)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:89
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:93
|
||||
//line views/mutators.qtpl:91
|
||||
func StreamPreview(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
|
||||
//line views/mutators.qtpl:93
|
||||
//line views/mutators.qtpl:91
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:95
|
||||
//line views/mutators.qtpl:93
|
||||
lc := l18n.FromRequest(rq)
|
||||
|
||||
//line views/mutators.qtpl:96
|
||||
//line views/mutators.qtpl:94
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_with-preview">
|
||||
<h1 class="edit__title">`)
|
||||
//line views/mutators.qtpl:99
|
||||
//line views/mutators.qtpl:96
|
||||
qw422016.N().S(fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)))
|
||||
//line views/mutators.qtpl:99
|
||||
//line views/mutators.qtpl:96
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/mutators.qtpl:100
|
||||
//line views/mutators.qtpl:97
|
||||
qw422016.N().S(warning)
|
||||
//line views/mutators.qtpl:100
|
||||
//line views/mutators.qtpl:97
|
||||
qw422016.N().S(`
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/`)
|
||||
//line views/mutators.qtpl:102
|
||||
//line views/mutators.qtpl:99
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:102
|
||||
//line views/mutators.qtpl:99
|
||||
qw422016.N().S(`">
|
||||
<textarea name="text" class="edit-form__textarea" autofocus>`)
|
||||
//line views/mutators.qtpl:103
|
||||
//line views/mutators.qtpl:100
|
||||
qw422016.E().S(textAreaFill)
|
||||
//line views/mutators.qtpl:103
|
||||
//line views/mutators.qtpl:100
|
||||
qw422016.N().S(`</textarea>
|
||||
<br><br>
|
||||
<label for="text">`)
|
||||
//line views/mutators.qtpl:105
|
||||
//line views/mutators.qtpl:102
|
||||
qw422016.E().S(lc.Get("edit.tag"))
|
||||
//line views/mutators.qtpl:105
|
||||
//line views/mutators.qtpl:102
|
||||
qw422016.N().S(`</label><br>
|
||||
<input id="text" type="text" name="message" class="edit-form__message" value="`)
|
||||
//line views/mutators.qtpl:106
|
||||
//line views/mutators.qtpl:103
|
||||
qw422016.E().S(message)
|
||||
//line views/mutators.qtpl:106
|
||||
//line views/mutators.qtpl:103
|
||||
qw422016.N().S(`">
|
||||
<br><br>
|
||||
<button type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">`)
|
||||
//line views/mutators.qtpl:108
|
||||
//line views/mutators.qtpl:105
|
||||
qw422016.E().S(lc.Get("edit.save"))
|
||||
//line views/mutators.qtpl:108
|
||||
//line views/mutators.qtpl:105
|
||||
qw422016.N().S(`</button>
|
||||
<button type="submit" name="action" class="btn edit-form__preview" value="Preview">`)
|
||||
//line views/mutators.qtpl:109
|
||||
//line views/mutators.qtpl:106
|
||||
qw422016.E().S(lc.Get("edit.preview"))
|
||||
//line views/mutators.qtpl:109
|
||||
//line views/mutators.qtpl:106
|
||||
qw422016.N().S(`</button>
|
||||
<a href="/hypha/`)
|
||||
//line views/mutators.qtpl:110
|
||||
//line views/mutators.qtpl:107
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:110
|
||||
//line views/mutators.qtpl:107
|
||||
qw422016.N().S(`" class="btn btn_weak">`)
|
||||
//line views/mutators.qtpl:110
|
||||
//line views/mutators.qtpl:107
|
||||
qw422016.E().S(lc.Get("ui.cancel"))
|
||||
//line views/mutators.qtpl:110
|
||||
//line views/mutators.qtpl:107
|
||||
qw422016.N().S(`</a>
|
||||
</form>
|
||||
<p class="warning">`)
|
||||
//line views/mutators.qtpl:112
|
||||
//line views/mutators.qtpl:109
|
||||
qw422016.E().S(lc.Get("edit.preview_tip"))
|
||||
//line views/mutators.qtpl:112
|
||||
//line views/mutators.qtpl:109
|
||||
qw422016.N().S(`</p>
|
||||
<article class="edit__preview">`)
|
||||
//line views/mutators.qtpl:113
|
||||
//line views/mutators.qtpl:110
|
||||
qw422016.N().S(renderedPage)
|
||||
//line views/mutators.qtpl:113
|
||||
//line views/mutators.qtpl:110
|
||||
qw422016.N().S(`</article>
|
||||
</main>
|
||||
`)
|
||||
//line views/mutators.qtpl:115
|
||||
//line views/mutators.qtpl:112
|
||||
qw422016.N().S(Toolbar(user.FromRequest(rq), lc))
|
||||
//line views/mutators.qtpl:115
|
||||
//line views/mutators.qtpl:112
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/mutators.qtpl:117
|
||||
//line views/mutators.qtpl:113
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:117
|
||||
//line views/mutators.qtpl:113
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
func WritePreview(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
StreamPreview(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
func Preview(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string {
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
WritePreview(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:114
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:120
|
||||
//line views/mutators.qtpl:116
|
||||
func streameditScripts(qw422016 *qt422016.Writer) {
|
||||
//line views/mutators.qtpl:120
|
||||
//line views/mutators.qtpl:116
|
||||
qw422016.N().S(`
|
||||
<script src="/static/editor.js"></script>
|
||||
`)
|
||||
//line views/mutators.qtpl:122
|
||||
//line views/mutators.qtpl:118
|
||||
for _, scriptPath := range cfg.EditScripts {
|
||||
//line views/mutators.qtpl:122
|
||||
//line views/mutators.qtpl:118
|
||||
qw422016.N().S(`
|
||||
<script src="`)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:119
|
||||
qw422016.E().S(scriptPath)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:119
|
||||
qw422016.N().S(`"></script>
|
||||
`)
|
||||
//line views/mutators.qtpl:124
|
||||
//line views/mutators.qtpl:120
|
||||
}
|
||||
//line views/mutators.qtpl:124
|
||||
//line views/mutators.qtpl:120
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
func writeeditScripts(qq422016 qtio422016.Writer) {
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
func editScripts() string {
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
writeeditScripts(qb422016)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:125
|
||||
//line views/mutators.qtpl:121
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
{% code
|
||||
lc := l18n.FromRequest(rq)
|
||||
%}
|
||||
<div class="layout">
|
||||
<main class="main-width media-tab">
|
||||
<h1>{%s= lc.Get("ui.media_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName())}) %}</h1>
|
||||
{% switch h.(type) %}
|
||||
@ -81,7 +80,6 @@
|
||||
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
If `contents` == "", a helpful message is shown instead.
|
||||
@ -92,7 +90,6 @@ If you rename .prevnext, change the docs too.
|
||||
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.CanonicalName())
|
||||
lc := meta.Lc
|
||||
%}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section id="hypha">
|
||||
{% if meta.U.CanProceed("edit") %}
|
||||
@ -135,12 +132,10 @@ If you rename .prevnext, change the docs too.
|
||||
</main>
|
||||
{%s= categories.CategoryCard(meta, h.CanonicalName()) %}
|
||||
{%= siblingHyphae(siblings, meta.Lc) %}
|
||||
</div>
|
||||
{%= viewScripts() %}
|
||||
{% endfunc %}
|
||||
|
||||
{% func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
<p>{%s lc.Get("ui.revision_warning") %} <a href="/rev-text/{%s revHash %}/{%s h.CanonicalName() %}">{%s lc.Get("ui.revision_link") %}</a></p>
|
||||
@ -148,7 +143,6 @@ If you rename .prevnext, change the docs too.
|
||||
{%s= contents %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{%= viewScripts() %}
|
||||
{% endfunc %}
|
||||
|
||||
|
@ -66,576 +66,570 @@ func StreamMediaMenu(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.Hypha
|
||||
|
||||
//line views/readers.qtpl:19
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width media-tab">
|
||||
<h1>`)
|
||||
//line views/readers.qtpl:22
|
||||
//line views/readers.qtpl:21
|
||||
qw422016.N().S(lc.Get("ui.media_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName())}))
|
||||
//line views/readers.qtpl:22
|
||||
//line views/readers.qtpl:21
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/readers.qtpl:23
|
||||
//line views/readers.qtpl:22
|
||||
switch h.(type) {
|
||||
//line views/readers.qtpl:24
|
||||
//line views/readers.qtpl:23
|
||||
case *hyphae.MediaHypha:
|
||||
//line views/readers.qtpl:23
|
||||
qw422016.N().S(`
|
||||
<p class="explanation">`)
|
||||
//line views/readers.qtpl:24
|
||||
qw422016.N().S(`
|
||||
<p class="explanation">`)
|
||||
//line views/readers.qtpl:25
|
||||
qw422016.E().S(lc.Get("ui.media_tip"))
|
||||
//line views/readers.qtpl:25
|
||||
//line views/readers.qtpl:24
|
||||
qw422016.N().S(` <a href="/help/en/media" class="shy-link">`)
|
||||
//line views/readers.qtpl:25
|
||||
//line views/readers.qtpl:24
|
||||
qw422016.E().S(lc.Get("ui.media_what_is"))
|
||||
//line views/readers.qtpl:25
|
||||
//line views/readers.qtpl:24
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/readers.qtpl:26
|
||||
//line views/readers.qtpl:25
|
||||
default:
|
||||
//line views/readers.qtpl:26
|
||||
//line views/readers.qtpl:25
|
||||
qw422016.N().S(`
|
||||
<p class="explanation">`)
|
||||
//line views/readers.qtpl:27
|
||||
//line views/readers.qtpl:26
|
||||
qw422016.E().S(lc.Get("ui.media_empty"))
|
||||
//line views/readers.qtpl:27
|
||||
//line views/readers.qtpl:26
|
||||
qw422016.N().S(` <a href="/help/en/media" class="shy-link">`)
|
||||
//line views/readers.qtpl:27
|
||||
//line views/readers.qtpl:26
|
||||
qw422016.E().S(lc.Get("ui.media_what_is"))
|
||||
//line views/readers.qtpl:27
|
||||
//line views/readers.qtpl:26
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/readers.qtpl:28
|
||||
//line views/readers.qtpl:27
|
||||
}
|
||||
//line views/readers.qtpl:28
|
||||
//line views/readers.qtpl:27
|
||||
qw422016.N().S(`
|
||||
|
||||
<section class="amnt-grid">
|
||||
`)
|
||||
//line views/readers.qtpl:31
|
||||
//line views/readers.qtpl:30
|
||||
switch h := h.(type) {
|
||||
//line views/readers.qtpl:32
|
||||
//line views/readers.qtpl:31
|
||||
case *hyphae.MediaHypha:
|
||||
//line views/readers.qtpl:32
|
||||
//line views/readers.qtpl:31
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:34
|
||||
//line views/readers.qtpl:33
|
||||
mime := mimetype.FromExtension(path.Ext(h.MediaFilePath()))
|
||||
fileinfo, err := os.Stat(h.MediaFilePath())
|
||||
|
||||
//line views/readers.qtpl:35
|
||||
//line views/readers.qtpl:34
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:36
|
||||
//line views/readers.qtpl:35
|
||||
if err == nil {
|
||||
//line views/readers.qtpl:36
|
||||
//line views/readers.qtpl:35
|
||||
qw422016.N().S(`
|
||||
<fieldset class="amnt-menu-block">
|
||||
<legend class="modal__title modal__title_small">`)
|
||||
//line views/readers.qtpl:38
|
||||
//line views/readers.qtpl:37
|
||||
qw422016.E().S(lc.Get("ui.media_stat"))
|
||||
//line views/readers.qtpl:38
|
||||
//line views/readers.qtpl:37
|
||||
qw422016.N().S(`</legend>
|
||||
<p class="modal__confirmation-msg"><b>`)
|
||||
//line views/readers.qtpl:39
|
||||
//line views/readers.qtpl:38
|
||||
qw422016.E().S(lc.Get("ui.media_stat_size"))
|
||||
//line views/readers.qtpl:39
|
||||
//line views/readers.qtpl:38
|
||||
qw422016.N().S(`</b> `)
|
||||
//line views/readers.qtpl:39
|
||||
//line views/readers.qtpl:38
|
||||
qw422016.E().S(lc.GetPlural64("ui.media_size_value", fileinfo.Size()))
|
||||
//line views/readers.qtpl:39
|
||||
//line views/readers.qtpl:38
|
||||
qw422016.N().S(`</p>
|
||||
<p><b>`)
|
||||
//line views/readers.qtpl:40
|
||||
//line views/readers.qtpl:39
|
||||
qw422016.E().S(lc.Get("ui.media_stat_mime"))
|
||||
//line views/readers.qtpl:40
|
||||
//line views/readers.qtpl:39
|
||||
qw422016.N().S(`</b> `)
|
||||
//line views/readers.qtpl:40
|
||||
//line views/readers.qtpl:39
|
||||
qw422016.E().S(mime)
|
||||
//line views/readers.qtpl:40
|
||||
//line views/readers.qtpl:39
|
||||
qw422016.N().S(`</p>
|
||||
</fieldset>
|
||||
`)
|
||||
//line views/readers.qtpl:42
|
||||
//line views/readers.qtpl:41
|
||||
}
|
||||
//line views/readers.qtpl:42
|
||||
//line views/readers.qtpl:41
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/readers.qtpl:44
|
||||
//line views/readers.qtpl:43
|
||||
if strings.HasPrefix(mime, "image/") {
|
||||
//line views/readers.qtpl:44
|
||||
//line views/readers.qtpl:43
|
||||
qw422016.N().S(`
|
||||
<fieldset class="amnt-menu-block">
|
||||
<legend class="modal__title modal__title_small">`)
|
||||
//line views/readers.qtpl:46
|
||||
//line views/readers.qtpl:45
|
||||
qw422016.E().S(lc.Get("ui.media_include"))
|
||||
//line views/readers.qtpl:46
|
||||
//line views/readers.qtpl:45
|
||||
qw422016.N().S(`</legend>
|
||||
<p class="modal__confirmation-msg">`)
|
||||
//line views/readers.qtpl:47
|
||||
//line views/readers.qtpl:46
|
||||
qw422016.E().S(lc.Get("ui.media_include_tip"))
|
||||
//line views/readers.qtpl:47
|
||||
//line views/readers.qtpl:46
|
||||
qw422016.N().S(`</p>
|
||||
<pre class="codeblock"><code>img { `)
|
||||
//line views/readers.qtpl:48
|
||||
//line views/readers.qtpl:47
|
||||
qw422016.E().S(h.CanonicalName())
|
||||
//line views/readers.qtpl:48
|
||||
//line views/readers.qtpl:47
|
||||
qw422016.N().S(` }</code></pre>
|
||||
</fieldset>
|
||||
`)
|
||||
//line views/readers.qtpl:50
|
||||
//line views/readers.qtpl:49
|
||||
}
|
||||
//line views/readers.qtpl:50
|
||||
//line views/readers.qtpl:49
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:51
|
||||
//line views/readers.qtpl:50
|
||||
}
|
||||
//line views/readers.qtpl:51
|
||||
//line views/readers.qtpl:50
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/readers.qtpl:53
|
||||
//line views/readers.qtpl:52
|
||||
if u.CanProceed("upload-binary") {
|
||||
//line views/readers.qtpl:53
|
||||
//line views/readers.qtpl:52
|
||||
qw422016.N().S(`
|
||||
<form action="/upload-binary/`)
|
||||
//line views/readers.qtpl:54
|
||||
//line views/readers.qtpl:53
|
||||
qw422016.E().S(h.CanonicalName())
|
||||
//line views/readers.qtpl:54
|
||||
//line views/readers.qtpl:53
|
||||
qw422016.N().S(`"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-binary modal amnt-menu-block">
|
||||
<fieldset class="modal__fieldset">
|
||||
<legend class="modal__title modal__title_small">`)
|
||||
//line views/readers.qtpl:58
|
||||
//line views/readers.qtpl:57
|
||||
qw422016.E().S(lc.Get("ui.media_new"))
|
||||
//line views/readers.qtpl:58
|
||||
//line views/readers.qtpl:57
|
||||
qw422016.N().S(`</legend>
|
||||
<p class="modal__confirmation-msg">`)
|
||||
//line views/readers.qtpl:59
|
||||
//line views/readers.qtpl:58
|
||||
qw422016.E().S(lc.Get("ui.media_new_tip"))
|
||||
//line views/readers.qtpl:59
|
||||
//line views/readers.qtpl:58
|
||||
qw422016.N().S(`</p>
|
||||
<label for="upload-binary__input"></label>
|
||||
<input type="file" id="upload-binary__input" name="binary">
|
||||
|
||||
<button type="submit" class="btn stick-to-bottom" value="Upload">`)
|
||||
//line views/readers.qtpl:63
|
||||
//line views/readers.qtpl:62
|
||||
qw422016.E().S(lc.Get("ui.media_upload"))
|
||||
//line views/readers.qtpl:63
|
||||
//line views/readers.qtpl:62
|
||||
qw422016.N().S(`</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
`)
|
||||
//line views/readers.qtpl:66
|
||||
//line views/readers.qtpl:65
|
||||
}
|
||||
//line views/readers.qtpl:66
|
||||
//line views/readers.qtpl:65
|
||||
qw422016.N().S(`
|
||||
|
||||
|
||||
`)
|
||||
//line views/readers.qtpl:69
|
||||
//line views/readers.qtpl:68
|
||||
switch h := h.(type) {
|
||||
//line views/readers.qtpl:70
|
||||
//line views/readers.qtpl:69
|
||||
case *hyphae.MediaHypha:
|
||||
//line views/readers.qtpl:70
|
||||
//line views/readers.qtpl:69
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:71
|
||||
//line views/readers.qtpl:70
|
||||
if u.CanProceed("remove-media") {
|
||||
//line views/readers.qtpl:71
|
||||
//line views/readers.qtpl:70
|
||||
qw422016.N().S(`
|
||||
<form action="/remove-media/`)
|
||||
//line views/readers.qtpl:72
|
||||
//line views/readers.qtpl:71
|
||||
qw422016.E().S(h.CanonicalName())
|
||||
//line views/readers.qtpl:72
|
||||
//line views/readers.qtpl:71
|
||||
qw422016.N().S(`" method="post" class="modal amnt-menu-block" method="POST">
|
||||
<fieldset class="modal__fieldset">
|
||||
<legend class="modal__title modal__title_small">`)
|
||||
//line views/readers.qtpl:74
|
||||
//line views/readers.qtpl:73
|
||||
qw422016.E().S(lc.Get("ui.media_remove"))
|
||||
//line views/readers.qtpl:74
|
||||
//line views/readers.qtpl:73
|
||||
qw422016.N().S(`</legend>
|
||||
<p class="modal__confirmation-msg">`)
|
||||
//line views/readers.qtpl:75
|
||||
//line views/readers.qtpl:74
|
||||
qw422016.E().S(lc.Get("ui.media_remove_tip"))
|
||||
//line views/readers.qtpl:75
|
||||
//line views/readers.qtpl:74
|
||||
qw422016.N().S(`</p>
|
||||
<button type="submit" class="btn" value="Remove media">`)
|
||||
//line views/readers.qtpl:76
|
||||
//line views/readers.qtpl:75
|
||||
qw422016.E().S(lc.Get("ui.media_remove_button"))
|
||||
//line views/readers.qtpl:76
|
||||
//line views/readers.qtpl:75
|
||||
qw422016.N().S(`</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
`)
|
||||
//line views/readers.qtpl:79
|
||||
//line views/readers.qtpl:78
|
||||
}
|
||||
//line views/readers.qtpl:79
|
||||
//line views/readers.qtpl:78
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:80
|
||||
//line views/readers.qtpl:79
|
||||
}
|
||||
//line views/readers.qtpl:80
|
||||
//line views/readers.qtpl:79
|
||||
qw422016.N().S(`
|
||||
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
func WriteMediaMenu(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) {
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
StreamMediaMenu(qw422016, rq, h, u)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
func MediaMenu(rq *http.Request, h hyphae.Hypha, u *user.User) string {
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
WriteMediaMenu(qb422016, rq, h, u)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
return qs422016
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:83
|
||||
}
|
||||
|
||||
// If `contents` == "", a helpful message is shown instead.
|
||||
//
|
||||
// If you rename .prevnext, change the docs too.
|
||||
|
||||
//line views/readers.qtpl:90
|
||||
//line views/readers.qtpl:88
|
||||
func StreamHypha(qw422016 *qt422016.Writer, meta viewutil.Meta, h hyphae.Hypha, contents string) {
|
||||
//line views/readers.qtpl:90
|
||||
//line views/readers.qtpl:88
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:92
|
||||
//line views/readers.qtpl:90
|
||||
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.CanonicalName())
|
||||
lc := meta.Lc
|
||||
|
||||
//line views/readers.qtpl:94
|
||||
//line views/readers.qtpl:92
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section id="hypha">
|
||||
`)
|
||||
//line views/readers.qtpl:98
|
||||
//line views/readers.qtpl:95
|
||||
if meta.U.CanProceed("edit") {
|
||||
//line views/readers.qtpl:98
|
||||
//line views/readers.qtpl:95
|
||||
qw422016.N().S(`
|
||||
<div class="btn btn_navititle">
|
||||
<a class="btn__link_navititle" href="/edit/`)
|
||||
//line views/readers.qtpl:100
|
||||
//line views/readers.qtpl:97
|
||||
qw422016.E().S(h.CanonicalName())
|
||||
//line views/readers.qtpl:100
|
||||
//line views/readers.qtpl:97
|
||||
qw422016.N().S(`">`)
|
||||
//line views/readers.qtpl:100
|
||||
//line views/readers.qtpl:97
|
||||
qw422016.E().S(lc.Get("ui.edit_link"))
|
||||
//line views/readers.qtpl:100
|
||||
//line views/readers.qtpl:97
|
||||
qw422016.N().S(`</a>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:102
|
||||
//line views/readers.qtpl:99
|
||||
}
|
||||
//line views/readers.qtpl:102
|
||||
//line views/readers.qtpl:99
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/readers.qtpl:104
|
||||
//line views/readers.qtpl:101
|
||||
if cfg.UseAuth && util.IsProfileName(h.CanonicalName()) && meta.U.Name == strings.TrimPrefix(h.CanonicalName(), cfg.UserHypha+"/") {
|
||||
//line views/readers.qtpl:104
|
||||
//line views/readers.qtpl:101
|
||||
qw422016.N().S(`
|
||||
<div class="btn btn_navititle">
|
||||
<a class="btn__link_navititle" href="/logout">`)
|
||||
//line views/readers.qtpl:106
|
||||
//line views/readers.qtpl:103
|
||||
qw422016.E().S(lc.Get("ui.logout_link"))
|
||||
//line views/readers.qtpl:106
|
||||
//line views/readers.qtpl:103
|
||||
qw422016.N().S(`</a>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:108
|
||||
//line views/readers.qtpl:105
|
||||
if meta.U.Group == "admin" {
|
||||
//line views/readers.qtpl:108
|
||||
//line views/readers.qtpl:105
|
||||
qw422016.N().S(`
|
||||
<div class="btn btn_navititle">
|
||||
<a class="btn__link_navititle" href="/admin">`)
|
||||
//line views/readers.qtpl:110
|
||||
//line views/readers.qtpl:107
|
||||
qw422016.E().S(lc.Get("ui.admin_panel"))
|
||||
//line views/readers.qtpl:110
|
||||
//line views/readers.qtpl:107
|
||||
qw422016.N().S(`<a>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:112
|
||||
//line views/readers.qtpl:109
|
||||
}
|
||||
//line views/readers.qtpl:112
|
||||
//line views/readers.qtpl:109
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:113
|
||||
//line views/readers.qtpl:110
|
||||
}
|
||||
//line views/readers.qtpl:113
|
||||
//line views/readers.qtpl:110
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/readers.qtpl:115
|
||||
//line views/readers.qtpl:112
|
||||
qw422016.N().S(NaviTitle(h))
|
||||
//line views/readers.qtpl:115
|
||||
//line views/readers.qtpl:112
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:116
|
||||
//line views/readers.qtpl:113
|
||||
switch h.(type) {
|
||||
//line views/readers.qtpl:117
|
||||
//line views/readers.qtpl:114
|
||||
case *hyphae.EmptyHypha:
|
||||
//line views/readers.qtpl:117
|
||||
//line views/readers.qtpl:114
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:118
|
||||
//line views/readers.qtpl:115
|
||||
streamnonExistentHyphaNotice(qw422016, h, meta.U, meta.Lc)
|
||||
//line views/readers.qtpl:118
|
||||
//line views/readers.qtpl:115
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:119
|
||||
//line views/readers.qtpl:116
|
||||
default:
|
||||
//line views/readers.qtpl:119
|
||||
//line views/readers.qtpl:116
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:120
|
||||
//line views/readers.qtpl:117
|
||||
qw422016.N().S(contents)
|
||||
//line views/readers.qtpl:120
|
||||
//line views/readers.qtpl:117
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:118
|
||||
}
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:118
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
<section class="prevnext">
|
||||
`)
|
||||
//line views/readers.qtpl:124
|
||||
//line views/readers.qtpl:121
|
||||
if prevHyphaName != "" {
|
||||
//line views/readers.qtpl:124
|
||||
//line views/readers.qtpl:121
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__prev" href="/hypha/`)
|
||||
//line views/readers.qtpl:125
|
||||
//line views/readers.qtpl:122
|
||||
qw422016.E().S(prevHyphaName)
|
||||
//line views/readers.qtpl:125
|
||||
//line views/readers.qtpl:122
|
||||
qw422016.N().S(`" rel="prev">← `)
|
||||
//line views/readers.qtpl:125
|
||||
//line views/readers.qtpl:122
|
||||
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
|
||||
//line views/readers.qtpl:125
|
||||
//line views/readers.qtpl:122
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line views/readers.qtpl:126
|
||||
//line views/readers.qtpl:123
|
||||
}
|
||||
//line views/readers.qtpl:126
|
||||
//line views/readers.qtpl:123
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:127
|
||||
//line views/readers.qtpl:124
|
||||
if nextHyphaName != "" {
|
||||
//line views/readers.qtpl:127
|
||||
//line views/readers.qtpl:124
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__next" href="/hypha/`)
|
||||
//line views/readers.qtpl:128
|
||||
//line views/readers.qtpl:125
|
||||
qw422016.E().S(nextHyphaName)
|
||||
//line views/readers.qtpl:128
|
||||
//line views/readers.qtpl:125
|
||||
qw422016.N().S(`" rel="next">`)
|
||||
//line views/readers.qtpl:128
|
||||
//line views/readers.qtpl:125
|
||||
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
|
||||
//line views/readers.qtpl:128
|
||||
//line views/readers.qtpl:125
|
||||
qw422016.N().S(` →</a>
|
||||
`)
|
||||
//line views/readers.qtpl:129
|
||||
//line views/readers.qtpl:126
|
||||
}
|
||||
//line views/readers.qtpl:129
|
||||
//line views/readers.qtpl:126
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
`)
|
||||
//line views/readers.qtpl:131
|
||||
//line views/readers.qtpl:128
|
||||
StreamSubhyphae(qw422016, subhyphae, meta.Lc)
|
||||
//line views/readers.qtpl:131
|
||||
//line views/readers.qtpl:128
|
||||
qw422016.N().S(`
|
||||
<section id="hypha-bottom">
|
||||
`)
|
||||
//line views/readers.qtpl:133
|
||||
//line views/readers.qtpl:130
|
||||
streamhyphaInfo(qw422016, meta, h)
|
||||
//line views/readers.qtpl:133
|
||||
//line views/readers.qtpl:130
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
`)
|
||||
//line views/readers.qtpl:136
|
||||
//line views/readers.qtpl:133
|
||||
qw422016.N().S(categories.CategoryCard(meta, h.CanonicalName()))
|
||||
//line views/readers.qtpl:136
|
||||
//line views/readers.qtpl:133
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:137
|
||||
//line views/readers.qtpl:134
|
||||
streamsiblingHyphae(qw422016, siblings, meta.Lc)
|
||||
//line views/readers.qtpl:137
|
||||
//line views/readers.qtpl:134
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:135
|
||||
streamviewScripts(qw422016)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:135
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
func WriteHypha(qq422016 qtio422016.Writer, meta viewutil.Meta, h hyphae.Hypha, contents string) {
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
StreamHypha(qw422016, meta, h, contents)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
func Hypha(meta viewutil.Meta, h hyphae.Hypha, contents string) string {
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
WriteHypha(qb422016, meta, h, contents)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
return qs422016
|
||||
//line views/readers.qtpl:140
|
||||
//line views/readers.qtpl:136
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:142
|
||||
//line views/readers.qtpl:138
|
||||
func StreamRevision(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) {
|
||||
//line views/readers.qtpl:142
|
||||
//line views/readers.qtpl:138
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
<p>`)
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.E().S(lc.Get("ui.revision_warning"))
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.N().S(` <a href="/rev-text/`)
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.E().S(revHash)
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.N().S(`/`)
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.E().S(h.CanonicalName())
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.N().S(`">`)
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.E().S(lc.Get("ui.revision_link"))
|
||||
//line views/readers.qtpl:146
|
||||
//line views/readers.qtpl:141
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/readers.qtpl:147
|
||||
//line views/readers.qtpl:142
|
||||
qw422016.N().S(NaviTitle(h))
|
||||
//line views/readers.qtpl:147
|
||||
//line views/readers.qtpl:142
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:148
|
||||
//line views/readers.qtpl:143
|
||||
qw422016.N().S(contents)
|
||||
//line views/readers.qtpl:148
|
||||
//line views/readers.qtpl:143
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:152
|
||||
//line views/readers.qtpl:146
|
||||
streamviewScripts(qw422016)
|
||||
//line views/readers.qtpl:152
|
||||
//line views/readers.qtpl:146
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
func WriteRevision(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) {
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
StreamRevision(qw422016, rq, lc, h, contents, revHash)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string {
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
WriteRevision(qb422016, rq, lc, h, contents, revHash)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
return qs422016
|
||||
//line views/readers.qtpl:153
|
||||
//line views/readers.qtpl:147
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:155
|
||||
//line views/readers.qtpl:149
|
||||
func streamviewScripts(qw422016 *qt422016.Writer) {
|
||||
//line views/readers.qtpl:155
|
||||
//line views/readers.qtpl:149
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:156
|
||||
//line views/readers.qtpl:150
|
||||
for _, scriptPath := range cfg.ViewScripts {
|
||||
//line views/readers.qtpl:156
|
||||
//line views/readers.qtpl:150
|
||||
qw422016.N().S(`
|
||||
<script src="`)
|
||||
//line views/readers.qtpl:157
|
||||
//line views/readers.qtpl:151
|
||||
qw422016.E().S(scriptPath)
|
||||
//line views/readers.qtpl:157
|
||||
//line views/readers.qtpl:151
|
||||
qw422016.N().S(`"></script>
|
||||
`)
|
||||
//line views/readers.qtpl:158
|
||||
//line views/readers.qtpl:152
|
||||
}
|
||||
//line views/readers.qtpl:158
|
||||
//line views/readers.qtpl:152
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
func writeviewScripts(qq422016 qtio422016.Writer) {
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
streamviewScripts(qw422016)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
func viewScripts() string {
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
writeviewScripts(qb422016)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
return qs422016
|
||||
//line views/readers.qtpl:159
|
||||
//line views/readers.qtpl:153
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user