mirror of
https://github.com/go-gitea/gitea
synced 2025-08-17 15:08:27 +00:00
* Add disable download source configuration (#20548) Add configuration to enable/disable download source from UI. Co-authored-by: zeripath <art27@cantab.net> * Fix BaseVars not used in renderering * Fix disabled open in vscode menu when disabling download source from UI Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
@@ -26,13 +26,15 @@
|
||||
{{svg "octicon-git-branch"}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.Tr "repo.branch.download" ($.DefaultBranch)}}" data-position="top right">
|
||||
{{if not $.DisableDownloadSourceArchives}}
|
||||
<div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.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>
|
||||
@@ -110,7 +112,7 @@
|
||||
{{svg "octicon-git-branch"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if (not .IsDeleted)}}
|
||||
{{if and (not .IsDeleted) (not $.DisableDownloadSourceArchives)}}
|
||||
<div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.Tr "repo.branch.download" (.Name)}}" data-position="top right">
|
||||
{{svg "octicon-download"}}
|
||||
<div class="menu">
|
||||
|
Reference in New Issue
Block a user