summaryrefslogtreecommitdiffstats
path: root/templates/repo/settings
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-05-08 23:51:50 +0800
committerGitHub <noreply@github.com>2022-05-08 17:51:50 +0200
commitd4834071da9ce010fd4677ef339c598dd23dc130 (patch)
treeee6692b9b44e259d79158c2dc2b867d8f3286630 /templates/repo/settings
parent6a969681cd862bf153fa7921485278be1e8a092a (diff)
downloadgitea-d4834071da9ce010fd4677ef339c598dd23dc130.tar.gz
gitea-d4834071da9ce010fd4677ef339c598dd23dc130.zip
Repository level enable package or disable (#19323)
Diffstat (limited to 'templates/repo/settings')
-rw-r--r--templates/repo/settings/options.tmpl13
1 files changed, 13 insertions, 0 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 7695345010..77897f25cf 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -390,6 +390,19 @@
</div>
</div>
+ {{$isPackagesEnabled := .Repository.UnitEnabled $.UnitTypePackages}}
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.packages"}}</label>
+ {{if .UnitTypePackages.UnitGlobalDisabled}}
+ <div class="ui checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}">
+ {{else}}
+ <div class="ui checkbox">
+ {{end}}
+ <input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.packages_desc"}}</label>
+ </div>
+ </div>
+
{{if not .IsMirror}}
<div class="ui divider"></div>
{{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}}