1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-24 19:28:38 +00:00

[Branch View] show "New Pull Request" Button only if posible (#7977)

* add check Commits Ahead is gt 0

* code format
to start drone-ci test again
and formate code is also nice :)
This commit is contained in:
6543
2019-08-26 12:47:41 +02:00
committed by Lauris BH
parent c9546d4cdd
commit 5409dec8fd
3 changed files with 19 additions and 24 deletions

View File

@@ -75,7 +75,7 @@
</td>
<td class="two wide right aligned">
{{if not .LatestPullRequest}}
{{if and (not .IsDeleted) $.AllowsPulls}}
{{if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
<a href="{{$.RepoLink}}/compare/{{$.DefaultBranch | EscapePound}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | EscapePound}}">
<button id="new-pull-request" class="ui compact basic button">{{$.i18n.Tr "repo.pulls.compare_changes"}}</button>
</a>