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
release/v1.9
6543 5 years ago committed by Lunny Xiao
parent 0a9794a6bc
commit 9fbb898058

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

Loading…
Cancel
Save