Move parent directory link inline with back to commits

Both tree.html and blob.html now show '< Parent directory' on the
same line as '< Back to commits', separated by '|'. In blob view,
parent directory navigates to the containing directory tree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-27 10:20:07 +01:00
parent d68933bc2f
commit eb222716cd
3 changed files with 11 additions and 7 deletions

View File

@@ -6,14 +6,15 @@
<body>
<h2>Browse <span th:text="${shortHash}"></span></h2>
<p><a th:href="@{/repo/{name}/commits(name=${name})}">&lt; Back to commits</a></p>
<p th:if="${!path.isEmpty()}">
Path: <b th:text="${path}"></b>
<br>
<a th:href="@{/repo/{name}/tree/{hash}(name=${name}, hash=${hash}, path=${path.contains('/') ? path.substring(0, path.lastIndexOf('/')) : ''})}">&lt; Parent directory</a>
<p>
<a th:href="@{/repo/{name}/commits(name=${name})}">&lt; Back to commits</a>
<span th:if="${!path.isEmpty()}">
| <a th:href="@{/repo/{name}/tree/{hash}(name=${name}, hash=${hash}, path=${parentPath})}">&lt; Parent directory</a>
</span>
</p>
<p th:if="${!path.isEmpty()}">Path: <b th:text="${path}"></b></p>
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<th>Type</th>