mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 01:54:26 +00:00
Backport #30629 by @silverwind When a PR is empty, e.g. has neither additions nor deletions, we don't need to show this: <img width="125" alt="Screenshot 2024-04-21 at 23 25 38" src="https://github.com/go-gitea/gitea/assets/115237/0b987eb5-66f5-4b9b-b5aa-7e9e267e9b52"> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
706fc596a0
commit
682a076768
@ -15,12 +15,14 @@
|
||||
{{ctx.Locale.Tr "repo.pulls.tab_files"}}
|
||||
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
|
||||
</a>
|
||||
{{if or .Diff.TotalAddition .Diff.TotalDeletion}}
|
||||
<span class="item tw-ml-auto tw-pr-0 tw-font-bold tw-flex tw-items-center tw-gap-2">
|
||||
<span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span>
|
||||
<span class="diff-stats-bar">
|
||||
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div>
|
||||
</span>
|
||||
</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui tabs divider"></div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user