Skip to content

Commit

Permalink
Show protection symbol if needed on default branch (#7660) (#7668)
Browse files Browse the repository at this point in the history
* backport issue showing portection symbol if needet at default branch

* sugestion to use range .Branches
https://github.com/go-gitea/gitea/pull/7668/files/d57973a8041a741fdb7e77bc6ab18431bbf95ba4
  • Loading branch information
6543 authored and lunny committed Jul 30, 2019
1 parent 0a9794a commit 9fbb898
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -40,7 +44,7 @@
</tr>
</thead>
<tbody>
{{range $branch := .Branches}}
{{range .Branches}}
{{if ne .Name $.DefaultBranch}}
<tr>
<td>
Expand Down

0 comments on commit 9fbb898

Please sign in to comment.