mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 23:34:11 +02:00
merge of upstream/main + limitsize w/o DB
This commit is contained in:
23 files changed
+457
-862
No files matched your search
@@ -1,28 +1,20 @@
|
||||
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
|
||||
<div class="admin-setting-content">
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "admin.config.global_repo_size_limit_manage_panel"}}
|
||||
{{ctx.Locale.Tr "admin.repos.settings"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field {{if .Err_Repo_Size_Limit}}error{{end}}">
|
||||
<label for="repo_size_limit">{{ctx.Locale.Tr "admin.config.repo_size_limit"}}</label>
|
||||
<input id="repo_size_limit" name="repo_size_limit" value="{{.RepoSizeLimit}}" data-tooltip-content='{{ctx.Locale.Tr "admin.config.repo_size_limit.desc"}}'>
|
||||
<div class="field {{if .Err_Git_Size_Max}}error{{end}}">
|
||||
<label>{{ctx.Locale.Tr "admin.repos.git_size_max"}}</label>
|
||||
<input name="GitSizeMax" value="{{if .Err_Git_Size_Max}}{{.Err_Git_Size_Max}}{{else}}{{.GitSizeMax}}{{end}}" data-tooltip-content="{{ctx.Locale.Tr "admin.repos.git_size_max_helper"}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_LFS_Size_Limit}}error{{end}}">
|
||||
<label for="lfs_size_limit">{{ctx.Locale.Tr "admin.config.lfs_size_limit"}}</label>
|
||||
<input id="lfs_size_limit" name="lfs_size_limit" value="{{.LFSSizeLimit}}" data-tooltip-content='{{ctx.Locale.Tr "admin.config.lfs_size_limit.desc"}}'>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "admin.config.lfs_size_in_repo_size"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="lfs_size_in_repo_size" type="checkbox" {{if .LFSSizeInRepoSize}}checked{{end}} data-tooltip-content='{{ctx.Locale.Tr "admin.config.lfs_size_in_repo_size.desc"}}'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{ctx.Locale.Tr "admin.config.update_settings"}}</button>
|
||||
<div class="field {{if .Err_LFS_Size_Max}}error{{end}}">
|
||||
<label>{{ctx.Locale.Tr "admin.repos.lfs_size_max"}}</label>
|
||||
<input name="LFSSizeMax" value="{{if .Err_LFS_Size_Max}}{{.Err_LFS_Size_Max}}{{else}}{{.LFSSizeMax}}{{end}}" data-tooltip-content="{{ctx.Locale.Tr "admin.repos.lfs_size_max_helper"}}">
|
||||
</div>
|
||||
<button class="ui green button">{{ctx.Locale.Tr "admin.repos.update_settings"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
|
||||
@@ -14,33 +14,19 @@
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.repo_size"}}</label>
|
||||
<span {{if .Err_RepoSize}}class="ui text red"{{end}} {{if not (eq .Repository.Size 0)}} data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>{{FileSize .Repository.Size}}
|
||||
{{if and .ActualSizeLimit (or (gt .RepoSizeLimit -1) (gt .LFSSizeLimit -1))}}
|
||||
/ {{FileSize .ActualSizeLimit}}
|
||||
{{if gt .GitSizeMax -1}}
|
||||
/ {{FileSize .GitSizeMax}}
|
||||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.lfs_size"}}</label>
|
||||
<span>{{FileSize .Repository.LFSSize}}
|
||||
{{if and .ActualLFSSizeLimit (or (gt .RepoSizeLimit -1) (gt .LFSSizeLimit -1))}}
|
||||
/ {{FileSize .ActualLFSSizeLimit}}
|
||||
{{if gt .LFSSizeMax -1}}
|
||||
/ {{FileSize .LFSSizeMax}}
|
||||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="field {{if .Err_RepoSizeLimit}}error{{end}} {{if not .IsAdmin}}tw-hidden{{end}}">
|
||||
<label for="repo_size_limit">{{ctx.Locale.Tr "repo.repo_size_limit"}}</label>
|
||||
<input id="repo_size_limit" name="repo_size_limit"
|
||||
{{if and (eq .RepoSizeLimit -1) (eq .LFSSizeLimit -1)}}class="ui text light grey"{{end}}
|
||||
type="text" value="{{if .RepoSizeLimitText}}{{.RepoSizeLimitText}}{{else if .Repository.SizeLimit}}{{FileSize .Repository.SizeLimit}}{{end}}"
|
||||
data-tooltip-content='{{ctx.Locale.Tr "repo.repo_size_limit_helper"}}'>
|
||||
</div>
|
||||
<div class="field {{if .Err_LFSSizeLimit}}error{{end}} {{if not .IsAdmin}}tw-hidden{{end}}">
|
||||
<label for="lfs_size_limit">{{ctx.Locale.Tr "repo.lfs_size_limit"}}</label>
|
||||
<input id="lfs_size_limit" name="lfs_size_limit"
|
||||
{{if and (eq .RepoSizeLimit -1) (eq .LFSSizeLimit -1)}}class="ui text light grey"{{end}}
|
||||
type="text" value="{{if .LFSSizeLimitText}}{{.LFSSizeLimitText}}{{else if .Repository.LFSSizeLimit}}{{FileSize .Repository.LFSSizeLimit}}{{end}}"
|
||||
data-tooltip-content='{{ctx.Locale.Tr "repo.lfs_size_limit_helper"}}'>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.template"}}</label>
|
||||
<div class="ui checkbox">
|
||||
|
||||
Reference in new issue
Block a user