aboutsummaryrefslogtreecommitdiff
path: root/templates/repo_tree_file.html.tmpl
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-13 12:06:36 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-13 12:06:36 +0800
commit9b20ef637095413a8e7bde6701b8ad2379b4e7aa (patch)
treebc02623d8963b9b28429c49e0f14a532e259b612 /templates/repo_tree_file.html.tmpl
parentrepo_{raw,tree}_dir: Only display "on $ref" if necessary (diff)
downloadforge-9b20ef637095413a8e7bde6701b8ad2379b4e7aa.tar.gz
forge-9b20ef637095413a8e7bde6701b8ad2379b4e7aa.tar.zst
forge-9b20ef637095413a8e7bde6701b8ad2379b4e7aa.zip
repo_*_{dir,file}: Add ref params if not head
Diffstat (limited to 'templates/repo_tree_file.html.tmpl')
-rw-r--r--templates/repo_tree_file.html.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo_tree_file.html.tmpl b/templates/repo_tree_file.html.tmpl
index 6931c4e..0bf9164 100644
--- a/templates/repo_tree_file.html.tmpl
+++ b/templates/repo_tree_file.html.tmpl
@@ -10,7 +10,7 @@
{{ template "header" . }}
<div class="padding">
<p>
- /{{ .path_spec }} (<a href="/{{ .group_name }}/:/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{ if not (eq .ref_type "head") }}?{{ .ref_type }}={{ .ref }}{{ end }}">raw</a>)
+ /{{ .path_spec }} (<a href="/{{ .group_name }}/:/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{ if .ref }}?{{ .ref_type }}={{ .ref }}{{ end }}">raw</a>)
</p>
{{ .file_contents }}
</div>