This PR split the `Board` into two parts. One is the struct has been renamed to `Column` and the second we have a `Template Type`. But to make it easier to review, this PR will not change the database schemas, they are just renames. The database schema changes could be in future PRs. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: yp05327 <576951401@qq.com> (cherry picked from commit 98751108b11dc748cc99230ca0fc1acfdf2c8929) Conflicts: docs/content/administration/config-cheat-sheet.en-us.md docs/content/index.en-us.md docs/content/installation/comparison.en-us.md docs/content/usage/permissions.en-us.md non existent files options/locale/locale_en-US.ini routers/web/web.go templates/repo/header.tmpl templates/repo/settings/options.tmpl trivial context conflicts
		
			
				
	
	
		
			62 lines
		
	
	
	
		
			3.2 KiB
		
	
	
	
		
			Go HTML Template
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
	
		
			3.2 KiB
		
	
	
	
		
			Go HTML Template
		
	
	
	
	
	
<h4 class="ui top attached header" id="overview">
 | 
						|
	{{ctx.Locale.Tr "repo.settings.units.overview"}}
 | 
						|
</h4>
 | 
						|
<div class="ui attached segment">
 | 
						|
	{{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}}
 | 
						|
	{{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}}
 | 
						|
	<div class="inline field">
 | 
						|
		<label>{{ctx.Locale.Tr "repo.code"}}</label>
 | 
						|
		<div class="ui checkbox{{if $isCodeGlobalDisabled}} disabled{{end}}"{{if $isCodeGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
 | 
						|
			<input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}>
 | 
						|
			<label>{{ctx.Locale.Tr "repo.code.desc"}}</label>
 | 
						|
		</div>
 | 
						|
	</div>
 | 
						|
 | 
						|
	{{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}}
 | 
						|
	{{$isProjectsGlobalDisabled := .UnitTypeProjects.UnitGlobalDisabled}}
 | 
						|
	<div class="inline field">
 | 
						|
		<label>{{ctx.Locale.Tr "repo.projects"}}</label>
 | 
						|
		<div class="ui checkbox{{if $isProjectsGlobalDisabled}} disabled{{end}}"{{if $isProjectsGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
 | 
						|
			<input class="enable-system" name="enable_projects" type="checkbox" {{if $isProjectsEnabled}}checked{{end}}>
 | 
						|
			<label>{{ctx.Locale.Tr "repo.settings.projects_desc"}}</label>
 | 
						|
		</div>
 | 
						|
	</div>
 | 
						|
 | 
						|
	{{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}}
 | 
						|
	{{$isReleasesGlobalDisabled := .UnitTypeReleases.UnitGlobalDisabled}}
 | 
						|
	<div class="inline field">
 | 
						|
		<label>{{ctx.Locale.Tr "repo.releases"}}</label>
 | 
						|
		<div class="ui checkbox{{if $isReleasesGlobalDisabled}} disabled{{end}}"{{if $isReleasesGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
 | 
						|
			<input class="enable-system" name="enable_releases" type="checkbox" {{if $isReleasesEnabled}}checked{{end}}>
 | 
						|
			<label>{{ctx.Locale.Tr "repo.settings.releases_desc"}}</label>
 | 
						|
		</div>
 | 
						|
	</div>
 | 
						|
 | 
						|
	{{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}}
 | 
						|
	{{$isPackagesGlobalDisabled := .UnitTypePackages.UnitGlobalDisabled}}
 | 
						|
	<div class="inline field">
 | 
						|
		<label>{{ctx.Locale.Tr "repo.packages"}}</label>
 | 
						|
		<div class="ui checkbox{{if $isPackagesGlobalDisabled}} disabled{{end}}"{{if $isPackagesGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
 | 
						|
			<input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}>
 | 
						|
			<label>{{ctx.Locale.Tr "repo.settings.packages_desc"}}</label>
 | 
						|
		</div>
 | 
						|
	</div>
 | 
						|
 | 
						|
	{{if .EnableActions}}
 | 
						|
		{{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}}
 | 
						|
		{{$isActionsGlobalDisabled := .UnitTypeActions.UnitGlobalDisabled}}
 | 
						|
		<div class="inline field">
 | 
						|
			<label>{{ctx.Locale.Tr "actions.actions"}}</label>
 | 
						|
			<div class="ui checkbox{{if $isActionsGlobalDisabled}} disabled{{end}}"{{if $isActionsGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
 | 
						|
				<input class="enable-system" name="enable_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}>
 | 
						|
				<label>{{ctx.Locale.Tr "repo.settings.actions_desc"}}</label>
 | 
						|
			</div>
 | 
						|
		</div>
 | 
						|
	{{end}}
 | 
						|
 | 
						|
	<div class="divider"></div>
 | 
						|
 | 
						|
	<div class="field">
 | 
						|
		<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
 | 
						|
	</div>
 | 
						|
</div>
 |