internal/web/templates/snippets.html

v1.32.0
gitbay/internal/web/templates/snippets.html history · blame · raw

16 lines · 964 bytes

 1{{define "title"}}snippets · {{.Owner}}{{end}}
 2{{define "content"}}
 3<h1><a href="/{{.Owner}}">{{.Owner}}</a> snippets</h1>
 4{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
 5{{if .Self}}<p class="meta"><a href="/{{.Owner}}/-/snippets/new">new snippet</a> · or <code>gitbay snippet create &lt;file&gt; &lt; file</code></p>{{end}}
 6{{if .Snippets}}<div class="tablewrap"><table class="keys">
 7<tr class="cols"><th scope="col">snippet</th><th scope="col">files</th>{{if .All}}<th scope="col">visibility</th>{{end}}<th scope="col">updated</th></tr>
 8{{range .Snippets}}<tr>
 9  <td><a href="/{{$.Owner}}/-/snippets/{{.PublicID}}">{{if .Description}}{{.Description}}{{else}}{{.PublicID}}{{end}}</a></td>
10  <td><span class="mono">{{.Names}}</span></td>
11  {{if $.All}}<td><span class="chip chip-neutral">{{.Visibility}}</span></td>{{end}}
12  <td>{{when .UpdatedAt}}</td>
13</tr>
14{{end}}</table></div>
15{{else}}<p class="none">No snippets yet.</p>{{end}}
16{{end}}