diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-08-01 00:57:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 18:57:02 +0200 |
commit | 589677fafb4b77112b7220a1c6089cec71d6db94 (patch) | |
tree | 1580defd542b1fe02e1a2f07e5487e6dea47ada6 /templates/repo/branch/list.tmpl | |
parent | 2c2f75cb2cf0de6fdeeb931377873dd07ffbe774 (diff) | |
download | gitea-589677fafb4b77112b7220a1c6089cec71d6db94.tar.gz gitea-589677fafb4b77112b7220a1c6089cec71d6db94.zip |
Add disable download source configuration (#20548)
Add configuration to enable/disable download source from UI.
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/repo/branch/list.tmpl')
-rw-r--r-- | templates/repo/branch/list.tmpl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 82b88a00ba..4a85692a83 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -26,13 +26,15 @@ {{svg "octicon-git-branch"}} </div> {{end}} - <div class="ui basic jump dropdown icon button tooltip" data-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranch)}}" data-position="top right"> - {{svg "octicon-download"}} - <div class="menu"> - <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a> - <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}} TAR.GZ</a> + {{if not $.DisableDownloadSourceArchives}} + <div class="ui basic jump dropdown icon button tooltip" data-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranch)}}" data-position="top right"> + {{svg "octicon-download"}} + <div class="menu"> + <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a> + <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}} TAR.GZ</a> + </div> </div> - </div> + {{end}} </td> </tr> </tbody> |