aboutsummaryrefslogtreecommitdiff
path: root/templates/repo_tree_dir.html.tmpl
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-14 08:48:07 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-14 08:48:07 +0800
commite347064abe3ce4c90fbad23d36e5d61a149e2389 (patch)
treeb587b82f918800b6ea457ece60d778b39a92dbe1 /templates/repo_tree_dir.html.tmpl
parentREADME.md: Add details in features supported by git repos (diff)
downloadforge-e347064abe3ce4c90fbad23d36e5d61a149e2389.tar.gz
forge-e347064abe3ce4c90fbad23d36e5d61a149e2389.tar.zst
forge-e347064abe3ce4c90fbad23d36e5d61a149e2389.zip
http_*: Refactor to reduce duplication
Diffstat (limited to 'templates/repo_tree_dir.html.tmpl')
-rw-r--r--templates/repo_tree_dir.html.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo_tree_dir.html.tmpl b/templates/repo_tree_dir.html.tmpl
index 5e56dc9..34559da 100644
--- a/templates/repo_tree_dir.html.tmpl
+++ b/templates/repo_tree_dir.html.tmpl
@@ -12,18 +12,18 @@
<thead>
<tr class="title-row">
<th colspan="3">
- /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref }} on {{ .ref }}{{ end }}
+ /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end }}
</th>
</tr>
</thead>
<tbody>
{{- $path_spec := .path_spec }}
- {{- $ref := .ref }}
+ {{- $ref := .ref_name }}
{{- $ref_type := .ref_type }}
{{- range .files }}
<tr>
<td class="file-mode">{{ .Mode }}</td>
- <td class="file-name"><a href="{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ if $ref }}?{{ $ref_type }}={{ $ref }}{{ end }}">{{ .Name }}</a>{{ if not .Is_file }}/{{ end }}</td>
+ <td class="file-name"><a href="{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ if $ref_type }}?{{ $ref_type }}={{ $ref }}{{ end }}">{{ .Name }}</a>{{ if not .Is_file }}/{{ end }}</td>
<td class="file-size">{{ .Size }}</td>
</tr>
{{- end }}