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

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

{{.CsrfTokenHtml}}
{{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)}}

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

{{$isIssuesEnabled := or (.Repository.UnitEnabled $.UnitTypeIssues) (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}
{{if .Repository.CanEnableTimetracker}}
{{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}}
{{if .Repository.CanEnablePulls}}
{{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}} {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
{{end}}
{{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}}
{{.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 .Repository.UnitEnabled $.UnitTypeWiki}} {{end}} {{if not .Repository.IsMirror}} {{end}} {{end}} {{template "base/footer" .}}