From 4a56a94ace510cbc1af26a3023a53df2372182cd Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 29 Jul 2019 07:05:35 +0200
Subject: [PATCH 1/4] hide delete/restore button on archived repos close issue
#7653 * backport vor v1.9
---
templates/repo/branch/list.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index 2028797bdb9bc..963671cfa0f1b 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -79,7 +79,7 @@
{{end}}
{{end}}
- {{if and $.IsWriter (not $.IsMirror)}}
+ {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived)}}
{{if .IsProtected}}
From 976444fe970aace08fa0eda5ee115087ab28b509 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 29 Jul 2019 07:10:41 +0200
Subject: [PATCH 2/4] hide column also
---
templates/repo/branch/list.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index 963671cfa0f1b..7860689c75155 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -29,7 +29,7 @@
| {{.i18n.Tr "repo.branch.name"}} |
|
|
- {{if and $.IsWriter (not $.IsMirror)}}
+ {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived)}}
{{.i18n.Tr "repo.branch.delete_head"}} |
{{end}}
From 66be63a555a45133316128f366a94f10f4885082 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 29 Jul 2019 07:35:40 +0200
Subject: [PATCH 3/4] move protected icon to first colum backport parts of
https://github.com/go-gitea/gitea/pull/7461
---
templates/repo/branch/list.tmpl | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index 7860689c75155..7fe1703fc804b 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -12,7 +12,12 @@
- {{.DefaultBranch}} |
+
+ {{if .IsProtected}}
+
+ {{end}}
+ {{.DefaultBranch}}
+ |
@@ -43,6 +48,9 @@
{{.Name}}
{{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}}
{{else}}
+ {{if .IsProtected}}
+
+ {{end}}
{{.Name}}
{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}
{{end}}
@@ -81,11 +89,9 @@
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived)}}
- {{if .IsProtected}}
-
- {{else if .IsDeleted}}
+ {{if and .IsDeleted (not .IsProtected)}}
- {{else}}
+ {{else if (not .IsProtected)}}
{{end}}
|
From 53f6434d1446f605620b273a6c5f88e695a936be Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 29 Jul 2019 07:37:13 +0200
Subject: [PATCH 4/4] backport comit divergenze fix
https://github.com/go-gitea/gitea/issues/7625
---
templates/repo/branch/list.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index 7fe1703fc804b..cba6b740c5d82 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -32,7 +32,7 @@
{{.i18n.Tr "repo.branch.name"}} |
- |
+ |
|
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived)}}
{{.i18n.Tr "repo.branch.delete_head"}} |