From 99001e7428499009a2bca0d519fa9f809592ee35 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Wed, 24 Jul 2024 17:52:35 +0200 Subject: [PATCH] edited repo headers --- repo/header.tmpl | 273 ++++++++++------------------------------------- 1 file changed, 57 insertions(+), 216 deletions(-) diff --git a/repo/header.tmpl b/repo/header.tmpl index 34f47b7..b31beb1 100644 --- a/repo/header.tmpl +++ b/repo/header.tmpl @@ -8,229 +8,70 @@
-
-
- {{if .IsArchived}} - {{ctx.Locale.Tr "repo.desc.archived"}} -
{{svg "octicon-archive" 18}}
- {{end}} - {{if .IsPrivate}} - {{ctx.Locale.Tr "repo.desc.private"}} -
{{svg "octicon-lock" 18}}
- {{else}} - {{if .Owner.Visibility.IsPrivate}} - {{ctx.Locale.Tr "repo.desc.internal"}} -
{{svg "octicon-shield-lock" 18}}
- {{end}} - {{end}} - {{if .IsTemplate}} - {{ctx.Locale.Tr "repo.desc.template"}} -
{{svg "octicon-repo-template" 18}}
- {{end}} - {{if eq .ObjectFormatName "sha256"}} - {{ctx.Locale.Tr "repo.desc.sha256"}} - {{end}} +
- {{if not (or .IsBeingCreated .IsBroken)}} -
- {{if $.RepoTransfer}} -
- {{$.CsrfTokenHtml}} -
- -
-
-
- {{$.CsrfTokenHtml}} -
- -
-
- {{end}} - {{if $.EnableFeed}} - {{/* An extra div-element is not necessary here, as this button does not secretly contain two buttons. */}} - - {{svg "octicon-rss" 16}} - - {{end}} - {{template "repo/watch_unwatch" $}} - {{if not $.DisableStars}} - {{template "repo/star_unstar" $}} - {{end}} - {{if and (not .IsEmpty) ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}} - - - {{end}} -
- {{end}} - {{if $.PullMirror}} -
- {{ctx.Locale.Tr "repo.mirror_from"}} - {{$.PullMirror.RemoteAddress}} - {{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}} -
- {{end}} - {{if .IsFork}}
{{ctx.Locale.Tr "repo.forked_from"}} {{.BaseRepo.FullName}}
{{end}} - {{if .IsGenerated}}
{{ctx.Locale.Tr "repo.generated_from"}} {{(.TemplateRepo ctx).FullName}}
{{end}} {{end}} -
- - {{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}} -
- {{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}} - - {{svg "octicon-code"}} {{ctx.Locale.Tr "repo.code"}} - - {{end}} - {{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}} - - {{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues"}} - {{if .Repository.NumOpenIssues}} - {{CountFmt .Repository.NumOpenIssues}} - {{end}} - - {{end}} +
- {{if .Permission.CanRead ctx.Consts.RepoUnitTypeExternalTracker}} - - {{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues"}} - - {{end}} + +