{%s rev.Message %} (by {%s rev.Username %} at {%s rev.TimeString() %})
diff --git a/history/view.qtpl.go b/history/view.qtpl.go index 64bc380..796a527 100644 --- a/history/view.qtpl.go +++ b/history/view.qtpl.go @@ -82,245 +82,342 @@ func (rev Revision) HyphaeLinksHTML() string { //line history/view.qtpl:14 } -// descriptionForFeed generates a good enough HTML contents for a web feed. +// HyphaeDiffsHTML returns a comma-separated list of diffs links of current revision for every affected file as HTML string. -//line history/view.qtpl:17 -func (rev *Revision) streamdescriptionForFeed(qw422016 *qt422016.Writer) { -//line history/view.qtpl:17 +//line history/view.qtpl:18 +func (rev Revision) StreamHyphaeDiffsHTML(qw422016 *qt422016.Writer) { +//line history/view.qtpl:18 qw422016.N().S(` -`) -//line history/view.qtpl:18 - qw422016.E().S(rev.Message) -//line history/view.qtpl:18 - qw422016.N().S(` (by `) -//line history/view.qtpl:18 - qw422016.E().S(rev.Username) -//line history/view.qtpl:18 - qw422016.N().S(` at `) -//line history/view.qtpl:18 - qw422016.E().S(rev.TimeString()) -//line history/view.qtpl:18 - qw422016.N().S(`)
-Hyphae affected: `) + `) //line history/view.qtpl:19 - rev.StreamHyphaeLinksHTML(qw422016) + entries := rev.hyphaeAffected() + //line history/view.qtpl:19 - qw422016.N().S(`
-`)
-//line history/view.qtpl:20
- qw422016.E().S(rev.textDiff())
-//line history/view.qtpl:20
- qw422016.N().S(`
+ qw422016.N().S(`
`)
//line history/view.qtpl:21
+ if len(entries) == 1 {
+//line history/view.qtpl:21
+ qw422016.N().S(``)
+//line history/view.qtpl:22
+ qw422016.E().S(rev.Hash)
+//line history/view.qtpl:22
+ qw422016.N().S(``)
+//line history/view.qtpl:23
+ } else {
+//line history/view.qtpl:24
+ for i, hyphaName := range entries {
+//line history/view.qtpl:25
+ if i > 0 {
+//line history/view.qtpl:25
+ qw422016.N().S(`, `)
+//line history/view.qtpl:27
+ }
+//line history/view.qtpl:27
+ qw422016.N().S(``)
+//line history/view.qtpl:29
+ if i == 0 {
+//line history/view.qtpl:30
+ qw422016.E().S(rev.Hash)
+//line history/view.qtpl:30
+ qw422016.N().S(` `)
+//line history/view.qtpl:31
+ }
+//line history/view.qtpl:32
+ qw422016.E().S(hyphaName)
+//line history/view.qtpl:32
+ qw422016.N().S(``)
+//line history/view.qtpl:33
+ }
+//line history/view.qtpl:34
+ }
+//line history/view.qtpl:35
+ qw422016.N().S(`
+`)
+//line history/view.qtpl:36
}
-//line history/view.qtpl:21
-func (rev *Revision) writedescriptionForFeed(qq422016 qtio422016.Writer) {
-//line history/view.qtpl:21
+//line history/view.qtpl:36
+func (rev Revision) WriteHyphaeDiffsHTML(qq422016 qtio422016.Writer) {
+//line history/view.qtpl:36
qw422016 := qt422016.AcquireWriter(qq422016)
-//line history/view.qtpl:21
- rev.streamdescriptionForFeed(qw422016)
-//line history/view.qtpl:21
+//line history/view.qtpl:36
+ rev.StreamHyphaeDiffsHTML(qw422016)
+//line history/view.qtpl:36
qt422016.ReleaseWriter(qw422016)
-//line history/view.qtpl:21
+//line history/view.qtpl:36
}
-//line history/view.qtpl:21
-func (rev *Revision) descriptionForFeed() string {
-//line history/view.qtpl:21
+//line history/view.qtpl:36
+func (rev Revision) HyphaeDiffsHTML() string {
+//line history/view.qtpl:36
qb422016 := qt422016.AcquireByteBuffer()
-//line history/view.qtpl:21
- rev.writedescriptionForFeed(qb422016)
-//line history/view.qtpl:21
+//line history/view.qtpl:36
+ rev.WriteHyphaeDiffsHTML(qb422016)
+//line history/view.qtpl:36
qs422016 := string(qb422016.B)
-//line history/view.qtpl:21
+//line history/view.qtpl:36
qt422016.ReleaseByteBuffer(qb422016)
-//line history/view.qtpl:21
+//line history/view.qtpl:36
return qs422016
-//line history/view.qtpl:21
+//line history/view.qtpl:36
+}
+
+// descriptionForFeed generates a good enough HTML contents for a web feed.
+
+//line history/view.qtpl:39
+func (rev *Revision) streamdescriptionForFeed(qw422016 *qt422016.Writer) {
+//line history/view.qtpl:39
+ qw422016.N().S(`
+`) +//line history/view.qtpl:40 + qw422016.E().S(rev.Message) +//line history/view.qtpl:40 + qw422016.N().S(` (by `) +//line history/view.qtpl:40 + qw422016.E().S(rev.Username) +//line history/view.qtpl:40 + qw422016.N().S(` at `) +//line history/view.qtpl:40 + qw422016.E().S(rev.TimeString()) +//line history/view.qtpl:40 + qw422016.N().S(`)
+Hyphae affected: `) +//line history/view.qtpl:41 + rev.StreamHyphaeLinksHTML(qw422016) +//line history/view.qtpl:41 + qw422016.N().S(`
+`)
+//line history/view.qtpl:42
+ qw422016.E().S(rev.textDiff())
+//line history/view.qtpl:42
+ qw422016.N().S(`
+`)
+//line history/view.qtpl:43
+}
+
+//line history/view.qtpl:43
+func (rev *Revision) writedescriptionForFeed(qq422016 qtio422016.Writer) {
+//line history/view.qtpl:43
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line history/view.qtpl:43
+ rev.streamdescriptionForFeed(qw422016)
+//line history/view.qtpl:43
+ qt422016.ReleaseWriter(qw422016)
+//line history/view.qtpl:43
+}
+
+//line history/view.qtpl:43
+func (rev *Revision) descriptionForFeed() string {
+//line history/view.qtpl:43
+ qb422016 := qt422016.AcquireByteBuffer()
+//line history/view.qtpl:43
+ rev.writedescriptionForFeed(qb422016)
+//line history/view.qtpl:43
+ qs422016 := string(qb422016.B)
+//line history/view.qtpl:43
+ qt422016.ReleaseByteBuffer(qb422016)
+//line history/view.qtpl:43
+ return qs422016
+//line history/view.qtpl:43
}
// WithRevisions returns an html representation of `revs` that is meant to be inserted in a history page.
-//line history/view.qtpl:24
+//line history/view.qtpl:46
func StreamWithRevisions(qw422016 *qt422016.Writer, hyphaName string, revs []Revision) {
-//line history/view.qtpl:24
+//line history/view.qtpl:46
qw422016.N().S(`
`)
-//line history/view.qtpl:25
+//line history/view.qtpl:47
for _, grp := range groupRevisionsByMonth(revs) {
-//line history/view.qtpl:25
+//line history/view.qtpl:47
qw422016.N().S(`
`)
-//line history/view.qtpl:27
+//line history/view.qtpl:49
currentYear := grp[0].Time.Year()
currentMonth := grp[0].Time.Month()
sectionId := fmt.Sprintf("%04d-%02d", currentYear, currentMonth)
-//line history/view.qtpl:30
+//line history/view.qtpl:52
qw422016.N().S(`