|
|
|
@@ -6,9 +6,9 @@
|
|
|
|
|
<div class="ui attached segment">
|
|
|
|
|
<form class="ui form" method="post">
|
|
|
|
|
<input type="hidden" name="action" value="advanced">
|
|
|
|
|
|
|
|
|
|
{{/* ── Code ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-code" 16}} {{ctx.Locale.Tr "repo.code"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-code" 16}} {{ctx.Locale.Tr "repo.code"}}</h5>
|
|
|
|
|
{{$isCodeEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode}}
|
|
|
|
|
{{$isCodeGlobalDisabled := ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled}}
|
|
|
|
|
<div class="inline field">
|
|
|
|
@@ -16,11 +16,10 @@
|
|
|
|
|
<input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.code.desc"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{/* ── Wiki ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-book" 16}} {{ctx.Locale.Tr "repo.wiki"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-book" 16}} {{ctx.Locale.Tr "repo.wiki"}}</h5>
|
|
|
|
|
{{$isInternalWikiEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeWiki}}
|
|
|
|
|
{{$isExternalWikiEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalWiki}}
|
|
|
|
|
{{$isWikiEnabled := or $isInternalWikiEnabled $isExternalWikiEnabled}}
|
|
|
|
@@ -32,6 +31,7 @@
|
|
|
|
|
<input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.wiki_desc"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field{{if not $isWikiEnabled}} disabled{{end}}" id="wiki_box">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<div class="ui radio checkbox{{if $isWikiGlobalDisabled}} disabled{{end}}"{{if $isWikiGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
|
|
|
|
@@ -63,21 +63,20 @@
|
|
|
|
|
<input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}">
|
|
|
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.external_wiki_url_desc"}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{/* ── Issues ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-issue-opened" 16}} {{ctx.Locale.Tr "repo.issues"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-issue-opened" 16}} {{ctx.Locale.Tr "repo.issues"}}</h5>
|
|
|
|
|
{{$isIssuesEnabled := or (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeIssues) (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker)}}
|
|
|
|
|
{{$isIssuesGlobalDisabled := ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled}}
|
|
|
|
|
{{$isExternalTrackerGlobalDisabled := ctx.Consts.RepoUnitTypeExternalTracker.UnitGlobalDisabled}}
|
|
|
|
|
{{$isIssuesAndExternalGlobalDisabled := and $isIssuesGlobalDisabled $isExternalTrackerGlobalDisabled}}
|
|
|
|
|
<div class="inline field">
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.issues"}}</label>
|
|
|
|
|
<div class="ui checkbox{{if $isIssuesAndExternalGlobalDisabled}} disabled{{end}}"{{if $isIssuesAndExternalGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
|
|
|
|
|
<input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.issues_desc"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<div class="ui radio checkbox{{if $isIssuesGlobalDisabled}} disabled{{end}}"{{if $isIssuesGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
|
|
|
|
@@ -164,20 +163,19 @@
|
|
|
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc"}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{/* ── Projects ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-project" 16}} {{ctx.Locale.Tr "repo.projects"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-project" 16}} {{ctx.Locale.Tr "repo.projects"}}</h5>
|
|
|
|
|
{{$isProjectsEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeProjects}}
|
|
|
|
|
{{$isProjectsGlobalDisabled := ctx.Consts.RepoUnitTypeProjects.UnitGlobalDisabled}}
|
|
|
|
|
{{$projectsUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeProjects}}
|
|
|
|
|
<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" data-target="#projects_box" {{if $isProjectsEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.projects_desc"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field {{if not $isProjectsEnabled}} disabled{{end}} tw-pl-4" id="projects_box">
|
|
|
|
|
<p>
|
|
|
|
|
{{ctx.Locale.Tr "repo.settings.projects_mode_desc"}}
|
|
|
|
@@ -206,11 +204,10 @@
|
|
|
|
|
<div class="item" data-value="all">{{ctx.Locale.Tr "repo.settings.projects_mode_all"}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{/* ── Releases ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-tag" 16}} {{ctx.Locale.Tr "repo.releases"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-tag" 16}} {{ctx.Locale.Tr "repo.releases"}}</h5>
|
|
|
|
|
{{$isReleasesEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeReleases}}
|
|
|
|
|
{{$isReleasesGlobalDisabled := ctx.Consts.RepoUnitTypeReleases.UnitGlobalDisabled}}
|
|
|
|
|
<div class="inline field">
|
|
|
|
@@ -218,6 +215,7 @@
|
|
|
|
|
<input class="enable-system" name="enable_releases" type="checkbox" data-target="#releases_visibility_box" {{if $isReleasesEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.releases_desc"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field tw-pl-4{{if not $isReleasesEnabled}} disabled{{end}}" id="releases_visibility_box">
|
|
|
|
|
<div class="inline field">
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.unit_visibility"}}</label>
|
|
|
|
@@ -227,11 +225,20 @@
|
|
|
|
|
</select>
|
|
|
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.unit_visibility_releases_help"}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{/* ── Licensing ── */}}
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-key" 16}} {{ctx.Locale.Tr "repo.settings.licensing_section"}}</h5>
|
|
|
|
|
<div class="inline field">
|
|
|
|
|
<div class="ui checkbox">
|
|
|
|
|
<input name="enable_licensing" type="checkbox" {{if .LicensingEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.enable_licensing"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.enable_licensing_help"}}</p>
|
|
|
|
|
|
|
|
|
|
{{/* ── Packages ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-package" 16}} {{ctx.Locale.Tr "repo.packages"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-package" 16}} {{ctx.Locale.Tr "repo.packages"}}</h5>
|
|
|
|
|
{{$isPackagesEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePackages}}
|
|
|
|
|
{{$isPackagesGlobalDisabled := ctx.Consts.RepoUnitTypePackages.UnitGlobalDisabled}}
|
|
|
|
|
<div class="inline field">
|
|
|
|
@@ -239,17 +246,15 @@
|
|
|
|
|
<input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.packages_desc"}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{if not .IsMirror}}
|
|
|
|
|
{{/* ── Pull Requests ── */}}
|
|
|
|
|
<div class="tw-mb-4">
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
<h5 class="tw-flex tw-items-center tw-gap-2 tw-mb-2">{{svg "octicon-git-pull-request" 16}} {{ctx.Locale.Tr "repo.pulls"}}</h5>
|
|
|
|
|
<h5 class="ui dividing header tw-flex tw-items-center tw-gap-2">{{svg "octicon-git-pull-request" 16}} {{ctx.Locale.Tr "repo.pulls"}}</h5>
|
|
|
|
|
{{$pullRequestEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePullRequests}}
|
|
|
|
|
{{$pullRequestGlobalDisabled := ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled}}
|
|
|
|
|
{{$prUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypePullRequests}}
|
|
|
|
|
<div class="inline field">
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.pulls"}}</label>
|
|
|
|
|
<div class="ui checkbox{{if $pullRequestGlobalDisabled}} disabled{{end}}"{{if $pullRequestGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
|
|
|
|
|
<input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}>
|
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.pulls_desc"}}</label>
|
|
|
|
@@ -381,7 +386,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="field tw-mt-4">
|
|
|
|
|
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
|
|
|
|
|
</div>
|
|
|
|
|