diff options
Diffstat (limited to 'web/templates/frag-jj.tmpl')
| -rw-r--r-- | web/templates/frag-jj.tmpl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/web/templates/frag-jj.tmpl b/web/templates/frag-jj.tmpl new file mode 100644 index 0000000..61040dc --- /dev/null +++ b/web/templates/frag-jj.tmpl @@ -0,0 +1,33 @@ +{{/* jj query results. Live-only, so routes are absolute. */}} +{{define "jjrows"}} +{{if .Err}}<p class="err">{{.Err}}</p>{{end}} +{{if .Rows}} +<div class="jjlog"> + {{range .Rows}} + {{if .Blank}}<div class="jjrow blank"><span class="graph">{{.Graph}}</span></div> + {{else if .Op}} + <div class="jjrow"> + <span class="graph">{{.Graph}}</span> + <a class="id" href="{{$.Root}}jj?at_op={{.ID}}" title="run the commit log as of this operation">{{.Short}}</a> + <span class="when">{{.When}}</span> + <span class="who">{{.Author}}</span> + <span class="desc">{{.Desc}}</span> + <span class="flags">{{.End}}</span> + </div> + {{else}} + <div class="jjrow"> + <span class="graph">{{.Graph}}</span> + <a class="id" href="{{$.Root}}change/{{.ID}}" title="{{.ID}}">{{.Short}}</a> + <code class="commit">{{.CommitShort}}</code> + <span class="when">{{.When}}</span> + <span class="who">{{.Author}}</span> + {{if .Refs}}<span class="refs">{{.Refs}}</span>{{end}} + {{if .Flags}}<span class="flags">{{.Flags}}</span>{{end}} + <a class="desc" href="{{$.Root}}files?rev={{.ID}}" title="browse the tree at this change">{{if .Desc}}{{.Desc}}{{else}}(no description){{end}}</a> + </div> + {{end}} + {{end}} +</div> +{{else if not .Err}}<p class="meta hint">no revisions matched</p>{{end}} +{{if .AtOp}}<p class="meta">as of operation <code>{{short .AtOp}}</code> ยท <a href="{{.Root}}jj?kind=op">back to the op log</a></p>{{end}} +{{end}} |
