diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/commits_table.tmpl | 12 | ||||
-rw-r--r-- | templates/repo/pulls/compare.tmpl | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 53c2f98f4d..55c550ae95 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -1,9 +1,13 @@ <h4 class="ui top attached header"> <div class="ui stackable grid"> - <div class="six wide column"> - {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}} + <div class="ten wide column"> + {{if or .PageIsCommits (gt .CommitCount 0)}} + {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}} + {{else}} + {{.i18n.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch }} {{if .Branch}}({{.Branch}}){{end}} + {{end}} </div> - <div class="ten wide right aligned column"> + <div class="six wide right aligned column"> {{if .PageIsCommits}} <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL | EscapePound}}/search"> <div class="ui tiny search input"> @@ -23,7 +27,7 @@ </div> </h4> -{{if .Commits}} +{{if and .Commits (gt .CommitCount 0)}} <div class="ui attached table segment"> <table class="ui very basic striped fixed table single line" id="commits-table"> <thead> diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index d2e00ace36..2296acf1df 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -54,6 +54,9 @@ <div class="ui segment"> {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} </div> + {{else if eq .CommitCount 0 }} + {{template "repo/commits_table" .}} + {{template "repo/diff/box" .}} {{else}} {{template "repo/issue/new_form" .}} {{template "repo/commits_table" .}} |