render series via a separate block

This commit is contained in:
Florian Klink 2019-11-27 11:41:45 +01:00
parent 151cc75532
commit 69f0963a17
3 changed files with 18 additions and 14 deletions

View file

@ -70,6 +70,7 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler {
tmpl := template.Must(loadTemplate([]string{
"submit-queue.tmpl.html",
"series.tmpl.html",
"serie.tmpl.html",
"changeset.tmpl.html",
}, funcMap))

16
public/series.tmpl.html Normal file
View file

@ -0,0 +1,16 @@
{{ define "series" }}
<table class="table table-sm table-hover" id="region-queue">
<thead class="thead-light">
<tr>
<th scope="col">Owner</th>
<th scope="col">Changeset</th>
<th scope="col">Flags</th>
</tr>
</thead>
<tbody>
{{ range $serie := . }}
{{ block "serie" $serie }}{{ end }}
{{ end }}
</tbody>
</table>
{{ end }}

View file

@ -57,20 +57,7 @@
</tbody>
</table>
<h2>Current Queue</h2>
<table class="table table-sm table-hover" id="region-queue">
<thead class="thead-light">
<tr>
<th scope="col">Owner</th>
<th scope="col">Changeset</th>
<th scope="col">Flags</th>
</tr>
</thead>
<tbody>
{{ range $serie := .series }}
{{ block "serie" $serie }}{{ end }}
{{ end }}
</tbody>
</table>
{{ block "series" .series }}{{ end }}
<h2 id="region-log">History</h2>
</div>