From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- templates/repo/settings/options.tmpl | 794 +++++++++++++++++++++++++++++++++++ 1 file changed, 794 insertions(+) create mode 100644 templates/repo/settings/options.tmpl (limited to 'templates/repo/settings/options.tmpl') diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl new file mode 100644 index 0000000..09f80ca --- /dev/null +++ b/templates/repo/settings/options.tmpl @@ -0,0 +1,794 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings options")}} +
+

+ {{ctx.Locale.Tr "repo.settings.basic_settings"}} +

+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
+ + +
+
+ + {{ctx.Locale.TrSize .Repository.Size}} +
+
+ +
+ + +
+
+ {{if not .Repository.IsFork}} +
+ +
+ {{if .IsAdmin}} + + {{else}} + + {{if and .Repository.IsPrivate $.ForcePrivate}}{{end}} + {{end}} + +
+
+ {{end}} +
+ + +
+
+ + +
+
+ +
+
+ +
+
+ {{.CsrfTokenHtml}} +
+ + +
+
+ + +
+
+
+ + {{if FederationEnabled}} +

+ {{ctx.Locale.Tr "repo.settings.federation_settings"}} +

+
+
+ {{.CsrfTokenHtml}} + +
+

{{ctx.Locale.Tr "repo.settings.federation_apapiurl"}}

+

{{.RepositoryAPActorID}}

+
+ + +
+
+ +
+
+
+ {{end}} + + {{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}} + {{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}} + {{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}} + {{$showMirrorSettings := and (.Repository.UnitEnabled $.Context $.UnitTypeCode) (or $newMirrorsPartiallyEnabled .Repository.IsMirror .PullMirror .PushMirrors)}} + {{$newMirrorsEntirelyEnabled := and (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}} + {{$onlyNewPushMirrorsEnabled := and (not .DisableNewPushMirrors) .DisableNewPullMirrors}} + {{$onlyNewPullMirrorsEnabled := and .DisableNewPushMirrors (not .DisableNewPullMirrors)}} + {{$existingPushMirror := or .Repository.IsMirror .PushMirrors}} + {{$modifyBrokenPullMirror := and .Repository.IsMirror (not .PullMirror)}} + {{$isWorkingPullMirror := .PullMirror}} + + {{if $showMirrorSettings}} +

+ {{ctx.Locale.Tr "repo.settings.mirror_settings"}} +

+
+ {{if .Repository.IsArchived}} +
+ {{ctx.Locale.Tr "repo.settings.archive.mirrors_unavailable"}} +
+ {{else}} + {{if $newMirrorsEntirelyEnabled}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

+ {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.pull_mirror_instructions"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_pull_section"}}
+ {{else if $onlyNewPushMirrorsEnabled}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_pull_mirror.instructions"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}
+ {{else if $onlyNewPullMirrorsEnabled}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.instructions"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.pull_mirror_warning"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

+ {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.info"}} + {{if $existingPushMirror}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}} + {{end}} + {{else}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.no_new_mirrors"}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}}
+ {{end}} + + {{if .Repository.IsMirror}} + + + + + + + + + + + {{if $modifyBrokenPullMirror}} + {{/* even if a repo is a pull mirror (IsMirror=true), the PullMirror might still be nil if the mirror migration is broken */}} + + + + + + {{else if $isWorkingPullMirror}} + + + + + + + + + + + + {{end}}{{/* end if: $modifyBrokenPullMirror / $isWorkingPullMirror */}} +
{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}{{ctx.Locale.Tr "repo.mirror_public_key"}}
+
{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}
+
{{.PullMirror.RemoteAddress}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}{{DateTime "full" .PullMirror.UpdatedUnix}} +
+ {{.CsrfTokenHtml}} + + +
+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
+ +
+ + +
+
+
+ + +
+ {{$address := MirrorRemoteAddress $.Context .Repository .PullMirror.GetRemoteName}} +
+ + +

{{ctx.Locale.Tr "repo.mirror_address_desc"}}

+
+
+ + {{ctx.Locale.Tr "repo.need_auth"}} + +
+
+ + +
+
+ + +
+

{{ctx.Locale.Tr "repo.mirror_password_help"}}

+
+
+ + {{if .LFSStartServer}} +
+ +
+ + +
+
+
+ + +

{{ctx.Locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}

+
+ {{end}} +
+ +
+
+
+ {{end}}{{/* end if .Repository.IsMirror */}} + + + + + + + + + + + + + {{range .PushMirrors}} + + + + + + + + {{else}} + + + + {{end}} + {{if (not .DisableNewPushMirrors)}} + + + + {{end}} + +
{{ctx.Locale.Tr "repo.settings.mirror_settings.pushed_repository"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}{{ctx.Locale.Tr "repo.mirror_public_key"}}
{{.RemoteAddress}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}}{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}
{{ctx.Locale.Tr "error"}}
{{end}}
{{if not (eq (len .GetPublicKey) 0)}}{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.copy_public_key"}}{{else}}{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.none_ssh"}}{{end}} + +
+ {{$.CsrfTokenHtml}} + + + +
+
+ {{$.CsrfTokenHtml}} + + + +
+
{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.none"}}
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
+ + +

{{ctx.Locale.Tr "repo.mirror_address_desc"}}

+
+
+ + {{ctx.Locale.Tr "repo.need_auth"}} + +
+
+ + +
+
+ + +
+ {{if .CanUseSSHMirroring}} +
+
+ + + {{ctx.Locale.Tr "repo.mirror_use_ssh.helper"}} +
+
+ {{end}} +
+
+
+
+ + +
+
+
+ + +
+
+ +
+
+
+ {{end}} +
+ {{end}} + +

+ {{ctx.Locale.Tr "repo.settings.signing_settings"}} +

+
+
+ {{.CsrfTokenHtml}} + +
+
+
+
+ + +

{{ctx.Locale.Tr "repo.settings.trust_model.default.desc"}}

+
+
+
+
+ + +

{{ctx.Locale.Tr "repo.settings.trust_model.collaborator.desc"}}

+
+
+
+
+ + +

{{ctx.Locale.Tr "repo.settings.trust_model.committer.desc"}}

+
+
+
+
+ + +

{{ctx.Locale.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}

+
+
+
+ +
+
+ +
+
+
+ + {{if .IsAdmin}} +

+ {{ctx.Locale.Tr "repo.settings.admin_settings"}} +

+
+
+ {{.CsrfTokenHtml}} + +
+
+ + +
+
+ +
+ +
+
+ +
+
+ {{.CsrfTokenHtml}} + + {{if .CodeIndexerEnabled}} +

{{ctx.Locale.Tr "repo.settings.admin_code_indexer"}}

+
+ + + {{if .CodeIndexerStatus}} + + {{ShortSha .CodeIndexerStatus.CommitSha}} + + {{else}} + {{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}} + {{end}} + +
+ +
+
+ {{end}} +

{{ctx.Locale.Tr "repo.settings.admin_stats_indexer"}}

+
+ {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} + + {{end}} + + {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} + + {{ShortSha .StatsIndexerStatus.CommitSha}} + + {{else}} + {{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}} + {{end}} + +
+ +
+
+
+
+ {{end}} + + {{if .Permission.IsOwner}} +

+ {{ctx.Locale.Tr "repo.settings.danger_zone"}} +

+
+
+ {{if .Repository.IsMirror}} +
+
+
{{ctx.Locale.Tr "repo.settings.convert"}}
+
{{ctx.Locale.Tr "repo.settings.convert_desc"}}
+
+
+ +
+
+ {{end}} + {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}} +
+
+
{{ctx.Locale.Tr "repo.settings.convert_fork"}}
+
{{ctx.Locale.Tr "repo.settings.convert_fork_desc"}}
+
+
+ +
+
+ {{end}} +
+
+
{{ctx.Locale.Tr "repo.settings.transfer.title"}}
+
+ {{if .RepoTransfer}} + {{ctx.Locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}} + {{else}} + {{ctx.Locale.Tr "repo.settings.transfer_desc"}} + {{end}} +
+
+
+ {{if .RepoTransfer}} +
+ {{.CsrfTokenHtml}} + + +
+ {{else}} + + {{end}} +
+
+ {{if .Permission.CanRead $.UnitTypeWiki}} + {{if ne $.Repository.GetWikiBranchName .DefaultWikiBranchName}} +
+
+
{{ctx.Locale.Tr "repo.settings.wiki_rename_branch_main"}}
+
{{ctx.Locale.Tr "repo.settings.wiki_rename_branch_main_desc" .DefaultWikiBranchName}}
+
+
+ +
+
+ {{end}} +
+
+
{{ctx.Locale.Tr "repo.settings.wiki_delete"}}
+
{{ctx.Locale.Tr "repo.settings.wiki_delete_desc"}}
+
+
+ +
+
+ {{end}} +
+
+
{{ctx.Locale.Tr "repo.settings.delete"}}
+
{{ctx.Locale.Tr "repo.settings.delete_desc"}}
+
+
+ +
+
+ {{if not .Repository.IsMirror}} +
+
+ {{if .Repository.IsArchived}} +
{{ctx.Locale.Tr "repo.settings.unarchive.header"}}
+
{{ctx.Locale.Tr "repo.settings.unarchive.text"}}
+ {{else}} +
{{ctx.Locale.Tr "repo.settings.archive.header"}}
+
{{ctx.Locale.Tr "repo.settings.archive.text"}}
+ {{end}} +
+
+ +
+
+ {{end}} +
+
+ {{end}} +
+{{template "repo/settings/layout_footer" .}} + +{{if .Permission.IsOwner}} + {{if .Repository.IsMirror}} + + {{end}} + {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}} + + {{end}} + + + + + {{if .Repository.UnitEnabled $.Context $.UnitTypeWiki}} + + {{if ne $.Repository.GetWikiBranchName .DefaultWikiBranchName}} + + {{end}} + {{end}} + + {{if not .Repository.IsMirror}} + + {{end}} +{{end}} + +{{template "repo/settings/push_mirror_sync_modal" .}} -- cgit v1.2.3