about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--frontend/frontend.go2
-rw-r--r--public/changeset.tmpl.html15
-rw-r--r--public/submit-queue.tmpl.html16
3 files changed, 18 insertions, 15 deletions
diff --git a/frontend/frontend.go b/frontend/frontend.go
index c49b00517581..7ed44efa591d 100644
--- a/frontend/frontend.go
+++ b/frontend/frontend.go
@@ -68,7 +68,7 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler {
 			},
 		}
 
-		tmpl := template.Must(loadTemplate("submit-queue.tmpl.html", funcMap))
+		tmpl := template.Must(loadTemplate([]string{"submit-queue.tmpl.html", "changeset.tmpl.html"}, funcMap))
 
 		tmpl.ExecuteTemplate(c.Writer, "submit-queue.tmpl.html", gin.H{
 			"series":      submitQueue.Series,
diff --git a/public/changeset.tmpl.html b/public/changeset.tmpl.html
new file mode 100644
index 000000000000..5d3997885c73
--- /dev/null
+++ b/public/changeset.tmpl.html
@@ -0,0 +1,15 @@
+{{ define "changeset" }}
+<tr>
+    <td>{{ .OwnerName }}</td>
+    <td>
+    <strong>{{ .Subject }}</strong> (<a href="{{ changesetURL . }}" target="_blank">#{{ .Number }}</a>)<br />
+    <small><code>{{ .CommitID }}</code></small>
+    </td>
+    <td>
+    <span>
+        {{ if .IsVerified }}<span class="badge badge-success badge-pill">+1 (CI)</span>{{ end }}
+        {{ if .IsCodeReviewed }}<span class="badge badge-info badge-pill">+2 (CR)</span>{{ end }}
+    </span>
+    </td>
+</tr>
+{{ end }}
\ No newline at end of file
diff --git a/public/submit-queue.tmpl.html b/public/submit-queue.tmpl.html
index d53614bc7106..1a71f18d6c7c 100644
--- a/public/submit-queue.tmpl.html
+++ b/public/submit-queue.tmpl.html
@@ -70,20 +70,8 @@
         <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}}
-        <tr>
-          <td>{{ $changeset.OwnerName }}</td>
-          <td>
-            <strong>{{ $changeset.Subject }}</strong> (<a href="{{ changesetURL $changeset }}" target="_blank">#{{ $changeset.Number }}</a>)<br />
-            <small><code>{{ $changeset.CommitID }}</code></small>
-          </td>
-          <td>
-            <span>
-              {{ if $changeset.IsVerified }}<span class="badge badge-success badge-pill">+1 (CI)</span>{{ end }}
-              {{ if $changeset.IsCodeReviewed }}<span class="badge badge-info badge-pill">+2 (CR)</span>{{ end }}
-            </span>
-          </td>
-        </tr>
+        {{ range $changeset := $serie.ChangeSets }}
+        {{ block "changeset" $changeset }}{{ end }}
         {{ end }}
         <tr>
           <td colspan="3">&nbsp;</td>