THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

Show protection symbol if needed on default branch (#7660) (#7668)

* backport issue showing portection symbol if needet at default branch

* sugestion to use range .Branches
d57973a804
tags/v1.9.0
6543 Lunny Xiao <xiaolunwen@gmail.com> 3 months ago
parent
commit
9fbb898058
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      templates/repo/branch/list.tmpl

+ 8
- 4
templates/repo/branch/list.tmpl View File

@@ -13,10 +13,14 @@
<tbody>
<tr>
<td>
{{if .IsProtected}}
<i class="octicon octicon-shield"></i>
{{range .Branches}}
{{if eq .Name $.DefaultBranch}}
{{if .IsProtected}}
<i class="octicon octicon-shield"></i>
{{end}}
{{.Name}}
{{end}}
{{end}}
{{.DefaultBranch}}
</td>
</tr>
</tbody>
@@ -40,7 +44,7 @@
</tr>
</thead>
<tbody>
{{range $branch := .Branches}}
{{range .Branches}}
{{if ne .Name $.DefaultBranch}}
<tr>
<td>

Loading…
Cancel
Save