{% import "fmt" %} {% import "github.com/bouncepaw/mycorrhiza/cfg" %} HyphaeLinksHTML returns a comma-separated list of hyphae that were affected by this revision as HTML string. {% func (rev Revision) HyphaeLinksHTML() %} {% stripspace %} {% for i, hyphaName := range rev.hyphaeAffected() %} {% if i > 0 %} {%s hyphaName %} {% endfor %} {% endstripspace %} {% endfunc %} descriptionForFeed generates a good enough HTML contents for a web feed. {% func (rev *Revision) descriptionForFeed() %}
{% endif %}{%s rev.Message %} (by {%s rev.Username %} at {%s rev.TimeString() %})
Hyphae affected: {%= rev.HyphaeLinksHTML() %}
{%s rev.textDiff() %}
{% endfunc %}
WithRevisions returns an html representation of `revs` that is meant to be inserted in a history page.
{% func WithRevisions(hyphaName string, revs []Revision) %}
{% for _, grp := range groupRevisionsByMonth(revs) %}
{% code
currentYear := grp[0].Time.Year()
currentMonth := grp[0].Time.Month()
sectionId := fmt.Sprintf("%d-%d", currentYear, currentMonth)
%}