Compare commits

...

2 Commits

Author SHA1 Message Date
ba3bf697f0 Move '(current)' label to the checkout button column
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 09:20:24 +01:00
6efb8f1607 Replace branch dropdown with table listing each branch
Show branches in a table with a Checkout button per row.
The current branch is shown in bold with '(current)' and
has no checkout button.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 09:19:31 +01:00

View File

@@ -6,26 +6,26 @@
<body>
<h2>Branches</h2>
<table border="0" cellpadding="4" cellspacing="0">
<h3>Branches</h3>
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<td>Current branch:</td>
<td><b th:text="${currentBranch}"></b></td>
<th>Branch</th>
<th></th>
</tr>
</table>
<h3>Switch Branch</h3>
<form method="post" th:action="@{/repo/{name}/checkout(name=${name})}">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<tr th:each="b : ${branches}">
<td>
<select name="branch">
<option th:each="b : ${branches}" th:value="${b}" th:text="${b}" th:selected="${b == currentBranch}"></option>
</select>
<b th:if="${b == currentBranch}" th:text="${b}"></b>
<span th:unless="${b == currentBranch}" th:text="${b}"></span>
</td>
<td>
<span th:if="${b == currentBranch}">(current)</span>
<form th:unless="${b == currentBranch}" method="post" th:action="@{/repo/{name}/checkout(name=${name})}">
<input type="hidden" name="branch" th:value="${b}">
<input type="submit" value="Checkout">
</form>
</td>
<td><input type="submit" value="Checkout"></td>
</tr>
</table>
</form>
<h3>Create New Branch</h3>
<form method="post" th:action="@{/repo/{name}/new-branch(name=${name})}">