Skip to content

Commit

Permalink
move protected icon to first colum
Browse files Browse the repository at this point in the history
backport parts of go-gitea#7461
  • Loading branch information
6543 committed Jul 29, 2019
1 parent 976444f commit 66be63a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
<table class="ui very basic striped fixed table single line">
<tbody>
<tr>
<td>{{.DefaultBranch}}</td>
<td>
{{if .IsProtected}}
<i class="octicon octicon-shield"></i>
{{end}}
{{.DefaultBranch}}
</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -43,6 +48,9 @@
<s><a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a></s>
<p class="time">{{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}}</p>
{{else}}
{{if .IsProtected}}
<i class="octicon octicon-shield"></i>
{{end}}
<a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a>
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p>
{{end}}
Expand Down Expand Up @@ -81,11 +89,9 @@
</td>
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived)}}
<td class="right aligned">
{{if .IsProtected}}
<i class="octicon octicon-shield"></i>
{{else if .IsDeleted}}
{{if and .IsDeleted (not .IsProtected)}}
<a class="undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID | urlquery}}&name={{.DeletedBranch.Name | urlquery}}"><i class="octicon octicon-reply"></i></a>
{{else}}
{{else if (not .IsProtected)}}
<a class="delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name | urlquery}}" data-name="{{.Name}}"><i class="trash icon text red"></i></a>
{{end}}
</td>
Expand Down

0 comments on commit 66be63a

Please sign in to comment.