summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-08-12 13:16:05 +0800
committerGitHub <noreply@github.com>2022-08-12 13:16:05 +0800
commitd26b652260fa50c14e0f0202b3f91b4b8d899671 (patch)
tree3b90180b636920b53c8f0f71cd8b9e7c0452c676
parentc81b26b0e52f55fcdf94b50a14bca3dfc375e2a9 (diff)
downloadgitea-d26b652260fa50c14e0f0202b3f91b4b8d899671.tar.gz
gitea-d26b652260fa50c14e0f0202b3f91b4b8d899671.zip
Fix disabled open in vscode menu when disabling download source from UI (#20713)
-rw-r--r--templates/repo/home.tmpl14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index d7ce2240a0..5c3eec8ab0 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -115,19 +115,19 @@
<!-- Only show clone panel in repository home page -->
{{if eq $n 0}}
<div class="ui action tiny input" id="clone-panel">
- {{template "repo/clone_buttons" .}}
- {{template "repo/clone_script" .}}
- {{if not $.DisableDownloadSourceArchives}}
+ {{template "repo/clone_buttons" .}}
+ {{template "repo/clone_script" .}}
<button id="download-btn" class="ui basic small compact jump dropdown icon button tooltip" data-content="{{.locale.Tr "repo.download_archive"}}" data-position="top right">
{{svg "octicon-download"}}
<div class="menu">
- <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.locale.Tr "repo.download_zip"}}</a>
- <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.locale.Tr "repo.download_tar"}}</a>
- <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.bundle" rel="nofollow">{{svg "octicon-package" 16 "mr-3"}}{{.locale.Tr "repo.download_bundle"}}</a>
+ {{if not $.DisableDownloadSourceArchives}}
+ <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.locale.Tr "repo.download_zip"}}</a>
+ <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.locale.Tr "repo.download_tar"}}</a>
+ <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.bundle" rel="nofollow">{{svg "octicon-package" 16 "mr-3"}}{{.locale.Tr "repo.download_bundle"}}</a>
+ {{end}}
<a class="item" href="vscode://vscode.git/clone?url={{$.RepoCloneLink.HTTPS}}">{{svg "gitea-vscode" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vsc"}}</a>
</div>
</button>
- {{end}}
</div>
{{end}}
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame) }}