mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-08-04 21:03:53 +00:00
Group recent changes by date
This commit is contained in:
parent
7073f9bce0
commit
b81650fef7
@ -1,4 +1,6 @@
|
|||||||
|
{% import "fmt" %}
|
||||||
{% import "net/http" %}
|
{% import "net/http" %}
|
||||||
|
{% import "time" %}
|
||||||
|
|
||||||
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
|
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
|
||||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||||
@ -32,15 +34,15 @@ if err != nil {
|
|||||||
|
|
||||||
<nav class="recent-changes__count">
|
<nav class="recent-changes__count">
|
||||||
See
|
See
|
||||||
{% for _, m := range []int{20, 0, 50, 0, 100} %}
|
{% for i, m := range []int{20, 50, 100} %}
|
||||||
{% switch m %}
|
{% if i > 0 %}
|
||||||
{% case 0 %}
|
|
||||||
<span aria-hidden="true">|</span>
|
<span aria-hidden="true">|</span>
|
||||||
{% case n %}
|
{% endif %}
|
||||||
<b>{%d n %}</b>
|
{% if m == n %}
|
||||||
{% default %}
|
<b>{%d m %}</b>
|
||||||
|
{% else %}
|
||||||
<a href="/recent-changes/{%d m %}">{%d m %}</a>
|
<a href="/recent-changes/{%d m %}">{%d m %}</a>
|
||||||
{% endswitch %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
recent changes
|
recent changes
|
||||||
</nav>
|
</nav>
|
||||||
@ -54,18 +56,28 @@ if err != nil {
|
|||||||
How come? I'll add the role anyway. -- bouncepaw
|
How come? I'll add the role anyway. -- bouncepaw
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% code
|
{% code
|
||||||
changes := history.RecentChanges(n)
|
changes := history.RecentChanges(n)
|
||||||
|
var year, day int
|
||||||
|
var month time.Month
|
||||||
%}
|
%}
|
||||||
<section class="recent-changes__list" role="feed">
|
<section class="recent-changes__list" role="feed">
|
||||||
{% if len(changes) == 0 %}
|
{% if len(changes) == 0 %}
|
||||||
<p>Could not find any recent changes.</p>
|
<p>Could not find any recent changes.</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for i, entry := range changes %}
|
{% for i, entry := range changes %}
|
||||||
|
|
||||||
|
{% code y, m, d := entry.Time.UTC().Date() %}
|
||||||
|
{% if d != day || m != month || y != year %}
|
||||||
|
<h2>{%s fmt.Sprintf("%04d-%02d-%02d", y, m, d) %}</h2>
|
||||||
|
{% code year, month, day = y, m, d %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<ul class="recent-changes__entry rc-entry" role="article"
|
<ul class="recent-changes__entry rc-entry" role="article"
|
||||||
aria-setsize="{%d n %}" aria-posinset="{%d i %}">
|
aria-setsize="{%d n %}" aria-posinset="{%d i %}">
|
||||||
{%s= recentChangesEntry(entry) %}
|
{%s= recentChangesEntry(entry) %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
@ -74,7 +86,7 @@ if err != nil {
|
|||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func recentChangesEntry(rev history.Revision) %}
|
{% func recentChangesEntry(rev history.Revision) %}
|
||||||
<li class="rc-entry__time"><time>{%s rev.TimeString() %}</time></li>
|
<li class="rc-entry__time"><time>{%s rev.Time.UTC().Format("15:04 UTC") %}</time></li>
|
||||||
<li class="rc-entry__hash">{%s rev.Hash %}</li>
|
<li class="rc-entry__hash">{%s rev.Hash %}</li>
|
||||||
<li class="rc-entry__links">{%s= rev.HyphaeLinksHTML() %}</li>
|
<li class="rc-entry__links">{%s= rev.HyphaeLinksHTML() %}</li>
|
||||||
<li class="rc-entry__msg">{%s rev.Message %} {% if rev.Username != "anon" %}<span class="rc-entry__author">by <a href="/hypha/{%s cfg.UserHypha %}/{%s rev.Username %}" rel="author">{%s rev.Username %}</a></span>{% endif %}</li>
|
<li class="rc-entry__msg">{%s rev.Message %} {% if rev.Username != "anon" %}<span class="rc-entry__author">by <a href="/hypha/{%s cfg.UserHypha %}/{%s rev.Username %}" rel="author">{%s rev.Username %}</a></span>{% endif %}</li>
|
||||||
|
@ -5,107 +5,113 @@
|
|||||||
package views
|
package views
|
||||||
|
|
||||||
//line views/history.qtpl:1
|
//line views/history.qtpl:1
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
//line views/history.qtpl:2
|
||||||
import "net/http"
|
import "net/http"
|
||||||
|
|
||||||
//line views/history.qtpl:3
|
//line views/history.qtpl:3
|
||||||
import "github.com/bouncepaw/mycorrhiza/cfg"
|
import "time"
|
||||||
|
|
||||||
//line views/history.qtpl:4
|
|
||||||
import "github.com/bouncepaw/mycorrhiza/util"
|
|
||||||
|
|
||||||
//line views/history.qtpl:5
|
//line views/history.qtpl:5
|
||||||
import "github.com/bouncepaw/mycorrhiza/user"
|
import "github.com/bouncepaw/mycorrhiza/cfg"
|
||||||
|
|
||||||
//line views/history.qtpl:6
|
//line views/history.qtpl:6
|
||||||
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
import "github.com/bouncepaw/mycorrhiza/util"
|
||||||
|
|
||||||
//line views/history.qtpl:7
|
//line views/history.qtpl:7
|
||||||
|
import "github.com/bouncepaw/mycorrhiza/user"
|
||||||
|
|
||||||
|
//line views/history.qtpl:8
|
||||||
|
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
||||||
|
|
||||||
|
//line views/history.qtpl:9
|
||||||
import "github.com/bouncepaw/mycorrhiza/history"
|
import "github.com/bouncepaw/mycorrhiza/history"
|
||||||
|
|
||||||
//line views/history.qtpl:10
|
//line views/history.qtpl:12
|
||||||
import (
|
import (
|
||||||
qtio422016 "io"
|
qtio422016 "io"
|
||||||
|
|
||||||
qt422016 "github.com/valyala/quicktemplate"
|
qt422016 "github.com/valyala/quicktemplate"
|
||||||
)
|
)
|
||||||
|
|
||||||
//line views/history.qtpl:10
|
//line views/history.qtpl:12
|
||||||
var (
|
var (
|
||||||
_ = qtio422016.Copy
|
_ = qtio422016.Copy
|
||||||
_ = qt422016.AcquireByteBuffer
|
_ = qt422016.AcquireByteBuffer
|
||||||
)
|
)
|
||||||
|
|
||||||
//line views/history.qtpl:10
|
//line views/history.qtpl:12
|
||||||
func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
||||||
//line views/history.qtpl:10
|
//line views/history.qtpl:12
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:12
|
//line views/history.qtpl:14
|
||||||
text, err := history.PrimitiveDiffAtRevision(h.TextPath, hash)
|
text, err := history.PrimitiveDiffAtRevision(h.TextPath, hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
text = err.Error()
|
text = err.Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:16
|
//line views/history.qtpl:18
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:17
|
//line views/history.qtpl:19
|
||||||
StreamNavHTML(qw422016, rq, h.Name, "history")
|
StreamNavHTML(qw422016, rq, h.Name, "history")
|
||||||
//line views/history.qtpl:17
|
//line views/history.qtpl:19
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
<h1>Diff `)
|
<h1>Diff `)
|
||||||
//line views/history.qtpl:21
|
//line views/history.qtpl:23
|
||||||
qw422016.E().S(util.BeautifulName(h.Name))
|
qw422016.E().S(util.BeautifulName(h.Name))
|
||||||
//line views/history.qtpl:21
|
//line views/history.qtpl:23
|
||||||
qw422016.N().S(` at `)
|
qw422016.N().S(` at `)
|
||||||
//line views/history.qtpl:21
|
//line views/history.qtpl:23
|
||||||
qw422016.E().S(hash)
|
qw422016.E().S(hash)
|
||||||
//line views/history.qtpl:21
|
//line views/history.qtpl:23
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
<pre class="codeblock"><code>`)
|
<pre class="codeblock"><code>`)
|
||||||
//line views/history.qtpl:22
|
//line views/history.qtpl:24
|
||||||
qw422016.E().S(text)
|
qw422016.E().S(text)
|
||||||
//line views/history.qtpl:22
|
//line views/history.qtpl:24
|
||||||
qw422016.N().S(`</code></pre>
|
qw422016.N().S(`</code></pre>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
|
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string {
|
func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string {
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
|
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/history.qtpl:26
|
//line views/history.qtpl:28
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:30
|
||||||
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:30
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width recent-changes">
|
<main class="main-width recent-changes">
|
||||||
@ -114,51 +120,54 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
|||||||
<nav class="recent-changes__count">
|
<nav class="recent-changes__count">
|
||||||
See
|
See
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:35
|
//line views/history.qtpl:37
|
||||||
for _, m := range []int{20, 0, 50, 0, 100} {
|
for i, m := range []int{20, 50, 100} {
|
||||||
//line views/history.qtpl:35
|
//line views/history.qtpl:37
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:36
|
//line views/history.qtpl:38
|
||||||
switch m {
|
if i > 0 {
|
||||||
//line views/history.qtpl:37
|
//line views/history.qtpl:38
|
||||||
case 0:
|
|
||||||
//line views/history.qtpl:37
|
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<span aria-hidden="true">|</span>
|
<span aria-hidden="true">|</span>
|
||||||
`)
|
|
||||||
//line views/history.qtpl:39
|
|
||||||
case n:
|
|
||||||
//line views/history.qtpl:39
|
|
||||||
qw422016.N().S(`
|
|
||||||
<b>`)
|
|
||||||
//line views/history.qtpl:40
|
|
||||||
qw422016.N().D(n)
|
|
||||||
//line views/history.qtpl:40
|
|
||||||
qw422016.N().S(`</b>
|
|
||||||
`)
|
|
||||||
//line views/history.qtpl:41
|
|
||||||
default:
|
|
||||||
//line views/history.qtpl:41
|
|
||||||
qw422016.N().S(`
|
|
||||||
<a href="/recent-changes/`)
|
|
||||||
//line views/history.qtpl:42
|
|
||||||
qw422016.N().D(m)
|
|
||||||
//line views/history.qtpl:42
|
|
||||||
qw422016.N().S(`">`)
|
|
||||||
//line views/history.qtpl:42
|
|
||||||
qw422016.N().D(m)
|
|
||||||
//line views/history.qtpl:42
|
|
||||||
qw422016.N().S(`</a>
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:43
|
//line views/history.qtpl:40
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:43
|
//line views/history.qtpl:40
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
|
//line views/history.qtpl:41
|
||||||
|
if m == n {
|
||||||
|
//line views/history.qtpl:41
|
||||||
|
qw422016.N().S(`
|
||||||
|
<b>`)
|
||||||
|
//line views/history.qtpl:42
|
||||||
|
qw422016.N().D(m)
|
||||||
|
//line views/history.qtpl:42
|
||||||
|
qw422016.N().S(`</b>
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:43
|
||||||
|
} else {
|
||||||
|
//line views/history.qtpl:43
|
||||||
|
qw422016.N().S(`
|
||||||
|
<a href="/recent-changes/`)
|
||||||
//line views/history.qtpl:44
|
//line views/history.qtpl:44
|
||||||
|
qw422016.N().D(m)
|
||||||
|
//line views/history.qtpl:44
|
||||||
|
qw422016.N().S(`">`)
|
||||||
|
//line views/history.qtpl:44
|
||||||
|
qw422016.N().D(m)
|
||||||
|
//line views/history.qtpl:44
|
||||||
|
qw422016.N().S(`</a>
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:45
|
||||||
|
}
|
||||||
|
//line views/history.qtpl:45
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:46
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:44
|
//line views/history.qtpl:46
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
recent changes
|
recent changes
|
||||||
</nav>
|
</nav>
|
||||||
@ -166,216 +175,248 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
|||||||
<p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p>
|
<p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:55
|
//line views/history.qtpl:57
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:58
|
//line views/history.qtpl:60
|
||||||
changes := history.RecentChanges(n)
|
changes := history.RecentChanges(n)
|
||||||
|
var year, day int
|
||||||
|
var month time.Month
|
||||||
|
|
||||||
//line views/history.qtpl:59
|
//line views/history.qtpl:63
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<section class="recent-changes__list" role="feed">
|
<section class="recent-changes__list" role="feed">
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:61
|
//line views/history.qtpl:65
|
||||||
if len(changes) == 0 {
|
if len(changes) == 0 {
|
||||||
//line views/history.qtpl:61
|
//line views/history.qtpl:65
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<p>Could not find any recent changes.</p>
|
<p>Could not find any recent changes.</p>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:63
|
//line views/history.qtpl:67
|
||||||
} else {
|
} else {
|
||||||
//line views/history.qtpl:63
|
//line views/history.qtpl:67
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:64
|
//line views/history.qtpl:68
|
||||||
for i, entry := range changes {
|
for i, entry := range changes {
|
||||||
//line views/history.qtpl:64
|
//line views/history.qtpl:68
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:70
|
||||||
|
y, m, d := entry.Time.UTC().Date()
|
||||||
|
|
||||||
|
//line views/history.qtpl:70
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:71
|
||||||
|
if d != day || m != month || y != year {
|
||||||
|
//line views/history.qtpl:71
|
||||||
|
qw422016.N().S(`
|
||||||
|
<h2>`)
|
||||||
|
//line views/history.qtpl:72
|
||||||
|
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
|
||||||
|
//line views/history.qtpl:72
|
||||||
|
qw422016.N().S(`</h2>
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:73
|
||||||
|
year, month, day = y, m, d
|
||||||
|
|
||||||
|
//line views/history.qtpl:73
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/history.qtpl:74
|
||||||
|
}
|
||||||
|
//line views/history.qtpl:74
|
||||||
|
qw422016.N().S(`
|
||||||
|
|
||||||
<ul class="recent-changes__entry rc-entry" role="article"
|
<ul class="recent-changes__entry rc-entry" role="article"
|
||||||
aria-setsize="`)
|
aria-setsize="`)
|
||||||
//line views/history.qtpl:66
|
//line views/history.qtpl:77
|
||||||
qw422016.N().D(n)
|
qw422016.N().D(n)
|
||||||
//line views/history.qtpl:66
|
//line views/history.qtpl:77
|
||||||
qw422016.N().S(`" aria-posinset="`)
|
qw422016.N().S(`" aria-posinset="`)
|
||||||
//line views/history.qtpl:66
|
//line views/history.qtpl:77
|
||||||
qw422016.N().D(i)
|
qw422016.N().D(i)
|
||||||
//line views/history.qtpl:66
|
//line views/history.qtpl:77
|
||||||
qw422016.N().S(`">
|
qw422016.N().S(`">
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:67
|
//line views/history.qtpl:78
|
||||||
qw422016.N().S(recentChangesEntry(entry))
|
qw422016.N().S(recentChangesEntry(entry))
|
||||||
//line views/history.qtpl:67
|
//line views/history.qtpl:78
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:69
|
//line views/history.qtpl:81
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:69
|
//line views/history.qtpl:81
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:70
|
//line views/history.qtpl:82
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:70
|
//line views/history.qtpl:82
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
|
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
StreamRecentChangesHTML(qw422016, n)
|
StreamRecentChangesHTML(qw422016, n)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
func RecentChangesHTML(n int) string {
|
func RecentChangesHTML(n int) string {
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
WriteRecentChangesHTML(qb422016, n)
|
WriteRecentChangesHTML(qb422016, n)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/history.qtpl:74
|
//line views/history.qtpl:86
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:76
|
//line views/history.qtpl:88
|
||||||
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
|
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
|
||||||
//line views/history.qtpl:76
|
//line views/history.qtpl:88
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<li class="rc-entry__time"><time>`)
|
<li class="rc-entry__time"><time>`)
|
||||||
//line views/history.qtpl:77
|
//line views/history.qtpl:89
|
||||||
qw422016.E().S(rev.TimeString())
|
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
|
||||||
//line views/history.qtpl:77
|
//line views/history.qtpl:89
|
||||||
qw422016.N().S(`</time></li>
|
qw422016.N().S(`</time></li>
|
||||||
<li class="rc-entry__hash">`)
|
<li class="rc-entry__hash">`)
|
||||||
//line views/history.qtpl:78
|
//line views/history.qtpl:90
|
||||||
qw422016.E().S(rev.Hash)
|
qw422016.E().S(rev.Hash)
|
||||||
//line views/history.qtpl:78
|
//line views/history.qtpl:90
|
||||||
qw422016.N().S(`</li>
|
qw422016.N().S(`</li>
|
||||||
<li class="rc-entry__links">`)
|
<li class="rc-entry__links">`)
|
||||||
//line views/history.qtpl:79
|
//line views/history.qtpl:91
|
||||||
qw422016.N().S(rev.HyphaeLinksHTML())
|
qw422016.N().S(rev.HyphaeLinksHTML())
|
||||||
//line views/history.qtpl:79
|
//line views/history.qtpl:91
|
||||||
qw422016.N().S(`</li>
|
qw422016.N().S(`</li>
|
||||||
<li class="rc-entry__msg">`)
|
<li class="rc-entry__msg">`)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.E().S(rev.Message)
|
qw422016.E().S(rev.Message)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.N().S(` `)
|
qw422016.N().S(` `)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
if rev.Username != "anon" {
|
if rev.Username != "anon" {
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.N().S(`<span class="rc-entry__author">by <a href="/hypha/`)
|
qw422016.N().S(`<span class="rc-entry__author">by <a href="/hypha/`)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.E().S(cfg.UserHypha)
|
qw422016.E().S(cfg.UserHypha)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.E().S(rev.Username)
|
qw422016.E().S(rev.Username)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.N().S(`" rel="author">`)
|
qw422016.N().S(`" rel="author">`)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.E().S(rev.Username)
|
qw422016.E().S(rev.Username)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.N().S(`</a></span>`)
|
qw422016.N().S(`</a></span>`)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:92
|
||||||
qw422016.N().S(`</li>
|
qw422016.N().S(`</li>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
|
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
streamrecentChangesEntry(qw422016, rev)
|
streamrecentChangesEntry(qw422016, rev)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
func recentChangesEntry(rev history.Revision) string {
|
func recentChangesEntry(rev history.Revision) string {
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
writerecentChangesEntry(qb422016, rev)
|
writerecentChangesEntry(qb422016, rev)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/history.qtpl:81
|
//line views/history.qtpl:93
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:83
|
//line views/history.qtpl:95
|
||||||
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
|
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
|
||||||
//line views/history.qtpl:83
|
//line views/history.qtpl:95
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:84
|
//line views/history.qtpl:96
|
||||||
StreamNavHTML(qw422016, rq, hyphaName, "history")
|
StreamNavHTML(qw422016, rq, hyphaName, "history")
|
||||||
//line views/history.qtpl:84
|
//line views/history.qtpl:96
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article class="history">
|
<article class="history">
|
||||||
<h1>History of `)
|
<h1>History of `)
|
||||||
//line views/history.qtpl:88
|
//line views/history.qtpl:100
|
||||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||||
//line views/history.qtpl:88
|
//line views/history.qtpl:100
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:101
|
||||||
qw422016.N().S(list)
|
qw422016.N().S(list)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:101
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
|
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
StreamHistoryHTML(qw422016, rq, hyphaName, list)
|
StreamHistoryHTML(qw422016, rq, hyphaName, list)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
|
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
WriteHistoryHTML(qb422016, rq, hyphaName, list)
|
WriteHistoryHTML(qb422016, rq, hyphaName, list)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/history.qtpl:93
|
//line views/history.qtpl:105
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user