{{template "base/head" .}}
{{template "repo/header" .}} {{template "repo/settings/navbar" .}}
{{template "base/alert" .}}

{{.i18n.Tr "repo.settings.basic_settings"}}

{{.CsrfTokenHtml}}
{{SizeFmt .Repository.Size}}
{{if not .Repository.IsFork}}
{{if .IsAdmin}} {{else}} {{end}}
{{end}}
{{.CsrfTokenHtml}}
{{$.i18n.Tr "settings.delete_current_avatar"}}
{{if .Repository.IsMirror}}

{{.i18n.Tr "repo.settings.mirror_settings"}}

{{.CsrfTokenHtml}}

{{.i18n.Tr "repo.mirror_address_desc"}}

{{.CsrfTokenHtml}}
{{.Mirror.UpdatedUnix.AsTime}}
{{end}}

{{.i18n.Tr "repo.settings.advanced_settings"}}

{{.CsrfTokenHtml}} {{$isWikiEnabled := or (.Repository.UnitEnabled $.UnitTypeWiki) (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}
{{if and (.UnitTypeWiki.UnitGlobalDisabled) (.UnitTypeExternalWiki.UnitGlobalDisabled)}}
{{else}}
{{end}}
{{if .UnitTypeWiki.UnitGlobalDisabled}}
{{else}}
{{end}}
{{if .UnitTypeExternalWiki.UnitGlobalDisabled}}
{{else}}
{{end}}

{{.i18n.Tr "repo.settings.external_wiki_url_desc"}}

{{$isIssuesEnabled := or (.Repository.UnitEnabled $.UnitTypeIssues) (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}
{{if and (.UnitTypeIssues.UnitGlobalDisabled) (.UnitTypeExternalTracker.UnitGlobalDisabled)}}
{{else}}
{{end}}
{{if .UnitTypeIssues.UnitGlobalDisabled}}
{{else}}
{{end}}
{{if .Repository.CanEnableTimetracker}}
{{end}}
{{if .UnitTypeExternalTracker.UnitGlobalDisabled}}
{{else}}
{{end}}

{{.i18n.Tr "repo.settings.external_tracker_url_desc"}}

{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}

{{$externalTracker := (.Repository.MustGetUnit $.UnitTypeExternalTracker)}} {{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}}
{{$isProjectsEnabled := .Repository.UnitEnabled $.UnitTypeProjects}}
{{if .UnitTypeProjects.UnitGlobalDisabled}}
{{else}}
{{end}}
{{if and (not .IsMirror) (.Repository.UnitEnabled $.UnitTypePullRequests)}}
{{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}} {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
{{if .UnitTypePullRequests.UnitGlobalDisabled}}
{{else}}
{{end}}
{{end}}

{{.i18n.Tr "repo.settings.signing_settings"}}

{{.CsrfTokenHtml}}

{{.i18n.Tr "repo.settings.trust_model.default.desc"}}

{{.i18n.Tr "repo.settings.trust_model.collaborator.desc"}}

{{.i18n.Tr "repo.settings.trust_model.committer.desc"}}

{{.i18n.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}

{{if .IsAdmin}}

{{.i18n.Tr "repo.settings.admin_settings"}}

{{.CsrfTokenHtml}}
{{end}} {{if .Permission.IsOwner}}

{{.i18n.Tr "repo.settings.danger_zone"}}

{{if .Repository.IsMirror}}
{{.i18n.Tr "repo.settings.convert"}}

{{.i18n.Tr "repo.settings.convert_desc"}}

{{end}} {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
{{.i18n.Tr "repo.settings.convert_fork"}}

{{.i18n.Tr "repo.settings.convert_fork_desc"}}

{{end}}
{{.i18n.Tr "repo.settings.transfer"}}

{{.i18n.Tr "repo.settings.transfer_desc"}}

{{if .Permission.CanRead $.UnitTypeWiki}}
{{.i18n.Tr "repo.settings.wiki_delete"}}

{{.i18n.Tr "repo.settings.wiki_delete_desc"}}

{{end}}
{{.i18n.Tr "repo.settings.delete"}}

{{.i18n.Tr "repo.settings.delete_desc"}}

{{if not .Repository.IsMirror}}
{{if .Repository.IsArchived}}
{{.i18n.Tr "repo.settings.unarchive.header"}}

{{.i18n.Tr "repo.settings.unarchive.text"}}

{{else}}
{{.i18n.Tr "repo.settings.archive.header"}}

{{.i18n.Tr "repo.settings.archive.text"}}

{{end}}
{{end}}
{{end}}
{{if .Permission.IsOwner}} {{if .Repository.IsMirror}} {{end}} {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}} {{end}} {{if .Repository.UnitEnabled $.UnitTypeWiki}} {{end}} {{if not .Repository.IsMirror}} {{end}} {{end}} {{template "base/footer" .}}