about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--frontend/frontend.go6
-rw-r--r--public/serie.tmpl.html11
-rw-r--r--public/submit-queue.tmpl.html10
3 files changed, 17 insertions, 10 deletions
diff --git a/frontend/frontend.go b/frontend/frontend.go
index 7ed44efa591d..c7596ea326b0 100644
--- a/frontend/frontend.go
+++ b/frontend/frontend.go
@@ -68,7 +68,11 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler {
 			},
 		}
 
-		tmpl := template.Must(loadTemplate([]string{"submit-queue.tmpl.html", "changeset.tmpl.html"}, funcMap))
+		tmpl := template.Must(loadTemplate([]string{
+			"submit-queue.tmpl.html",
+			"serie.tmpl.html",
+			"changeset.tmpl.html",
+		}, funcMap))
 
 		tmpl.ExecuteTemplate(c.Writer, "submit-queue.tmpl.html", gin.H{
 			"series":      submitQueue.Series,
diff --git a/public/serie.tmpl.html b/public/serie.tmpl.html
new file mode 100644
index 000000000000..7db666c173ec
--- /dev/null
+++ b/public/serie.tmpl.html
@@ -0,0 +1,11 @@
+{{ define "serie" }}
+<tr>
+<td colspan="3" class="{{ if not (. | isAutoSubmittable) }}table-primary{{ else }}table-success{{ end }}">Serie with {{ len .ChangeSets }} changes</td>
+</tr>
+{{ range $changeset := .ChangeSets }}
+{{ block "changeset" $changeset }}{{ end }}
+{{ end }}
+<tr>
+<td colspan="3">&nbsp;</td>
+</tr>
+{{ end }}
\ No newline at end of file
diff --git a/public/submit-queue.tmpl.html b/public/submit-queue.tmpl.html
index 1a71f18d6c7c..c2eff3146637 100644
--- a/public/submit-queue.tmpl.html
+++ b/public/submit-queue.tmpl.html
@@ -67,15 +67,7 @@
       </thead>
       <tbody>
         {{ range $serie := .series }}
-        <tr>
-          <td colspan="3" class="{{ if not ($serie | isAutoSubmittable) }}table-primary{{ else }}table-success{{ end }}">Serie with {{ len $serie.ChangeSets }} changes</td>
-        </tr>
-        {{ range $changeset := $serie.ChangeSets }}
-        {{ block "changeset" $changeset }}{{ end }}
-        {{ end }}
-        <tr>
-          <td colspan="3">&nbsp;</td>
-        </tr>
+        {{ block "serie" $serie }}{{ end }}
         {{ end }}
       </tbody>
     </table>