From d57973a8041a741fdb7e77bc6ab18431bbf95ba4 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 30 Jul 2019 02:08:21 +0200
Subject: [PATCH 1/2] backport issue showing portection symbol if needet at
default branch
---
templates/repo/branch/list.tmpl | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index cba6b740c5d82..b68a39f07fc5c 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -13,10 +13,14 @@
- {{if .IsProtected}}
-
+ {{range $branch := .Branches}}
+ {{if eq .Name $.DefaultBranch}}
+ {{if .IsProtected}}
+
+ {{end}}
+ {{.Name}}
+ {{end}}
{{end}}
- {{.DefaultBranch}}
|
From 92d4863f4aedf6805585408a63d722b24b99d4d2 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 30 Jul 2019 12:16:26 +0200
Subject: [PATCH 2/2] sugestion to use range .Branches
https://github.com/go-gitea/gitea/pull/7668/files/d57973a8041a741fdb7e77bc6ab18431bbf95ba4
---
templates/repo/branch/list.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index b68a39f07fc5c..1acda48a27a03 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -13,7 +13,7 @@
- {{range $branch := .Branches}}
+ {{range .Branches}}
{{if eq .Name $.DefaultBranch}}
{{if .IsProtected}}
@@ -44,7 +44,7 @@
|
- {{range $branch := .Branches}}
+ {{range .Branches}}
{{if ne .Name $.DefaultBranch}}
|