Fix branch/commit view bugs
- Filter out non-branch refs (like HEAD) from branch list - Walk all branch tips in commit list so older checkouts still show newer commits - Show '(current)' instead of Checkout button for HEAD commit - Swap nav link order in blob view (commits first, then tree) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
<h2 th:text="${filePath}">file.txt</h2>
|
||||
|
||||
<p>
|
||||
<a th:href="@{/repo/{name}/tree/{hash}(name=${name}, hash=${hash})}">< Back to tree</a>
|
||||
|
|
||||
<a th:href="@{/repo/{name}/commits(name=${name})}">< Back to commits</a>
|
||||
|
|
||||
<a th:href="@{/repo/{name}/tree/{hash}(name=${name}, hash=${hash})}">< Back to tree</a>
|
||||
</p>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
<td th:text="${c.date}"></td>
|
||||
<td><a th:href="@{/repo/{name}/tree/{hash}(name=${name}, hash=${c.hash})}">Browse</a></td>
|
||||
<td>
|
||||
<form method="post" th:action="@{/repo/{name}/checkout-commit(name=${name})}">
|
||||
<span th:if="${c.hash == headHash}">(current)</span>
|
||||
<form th:unless="${c.hash == headHash}" method="post" th:action="@{/repo/{name}/checkout-commit(name=${name})}">
|
||||
<input type="hidden" name="hash" th:value="${c.hash}">
|
||||
<input type="submit" value="Checkout">
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user