From e347064abe3ce4c90fbad23d36e5d61a149e2389 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 14 Feb 2025 08:48:07 +0800 Subject: http_*: Refactor to reduce duplication --- templates/repo_tree_dir.html.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/repo_tree_dir.html.tmpl') 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 @@ - /{{ .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 }} {{- $path_spec := .path_spec }} - {{- $ref := .ref }} + {{- $ref := .ref_name }} {{- $ref_type := .ref_type }} {{- range .files }} {{ .Mode }} - {{ .Name }}{{ if not .Is_file }}/{{ end }} + {{ .Name }}{{ if not .Is_file }}/{{ end }} {{ .Size }} {{- end }} -- cgit v1.2.3