submit-queue.tmpl.html: use table to make it more usable

This commit is contained in:
Florian Klink 2019-11-22 13:35:28 +01:00
parent 26943b7419
commit a77beee02b

View file

@ -9,35 +9,39 @@
<h1>Gerrit Submit Queue</h1> <h1>Gerrit Submit Queue</h1>
<h2>{{ .projectName }}/{{ .branchName }} is at {{ printf "%.7s" .HEAD }}</h2> <h2>{{ .projectName }}/{{ .branchName }} is at {{ printf "%.7s" .HEAD }}</h2>
<h2>Current Queue:</h2> <h2>Current Queue:</h2>
<div class="card-columns">
{{ range $serie := .series }} <table class="table table-sm table-hover">
<thead>
<div class="card" style="width: 18rem"> <tr>
<div class="list-group"> <th scope="col">ChangeSet</th>
{{ range $changeset := $serie.ChangeSets}} <th scope="col">Owner</th>
<div class="list-group-item{{ if not ($serie | isAutoSubmittable) }} disabled{{ end }}"> <th scope="col">Subject &amp; CommitID</th>
<div class="d-flex w-100 justify-content-between"> <th scope="col">Flags</th>
<h5>{{ $changeset.Subject }}</h5> </tr>
<small><a href="{{ changesetURL $changeset }}" target="_blank">#{{ $changeset.Number }}</a></small> </thead>
</div> <tbody>
<div class="d-flex w-100 justify-content-between"> {{ range $serie := .series }}
<small>{{ $changeset.OwnerName }}</small> <tr>
<span> <td colspan="4">Serie with {{ len $serie.ChangeSets }} changes{{ if not ($serie | isAutoSubmittable) }}, not auto submittable {{ end }}</th>
{{ if $changeset.IsVerified }}<span class="badge badge-success badge-pill">+1 (CI)</span>{{ end }} </tr>
{{ if $changeset.IsCodeReviewed }}<span class="badge badge-info badge-pill">+2 (CR)</span>{{ end }} {{ range $changeset := $serie.ChangeSets}}
</span> <tr class="{{ if $serie | isAutoSubmittable }}table-success{{ end }}">
</div> <th scope="row"><a href="{{ changesetURL $changeset }}" target="_blank">#{{ $changeset.Number }}</a></th>
<div> <td>{{ $changeset.OwnerName }}</td>
<code> <td>
{{ $changeset.CommitID }} <strong>{{ $changeset.Subject }}</strong><br />
</code> <small><code>{{ $changeset.CommitID }}</code></small>
</div> </td>
</div> <td>
{{ end }} <span>
</div> {{ if $changeset.IsVerified }}<span class="badge badge-success badge-pill">+1 (CI)</span>{{ end }}
</div> {{ if $changeset.IsCodeReviewed }}<span class="badge badge-info badge-pill">+2 (CR)</span>{{ end }}
{{ end }} </span>
</div> </td>
</tr>
{{ end }}
{{ end }}
</tbody>
</table>
</body> </body>
</html> </html>