Don't render contents of Commits tab and Files tab if commits is empty.

This commit is contained in:
takezoe
2017-05-28 12:16:33 +09:00
committed by Naoki Takezoe
parent 3ba31f205e
commit 1b65ae2062

View File

@@ -88,10 +88,14 @@
@gitbucket.core.pulls.html.conversation(issue, pullreq, commits, comments, issueLabels, collaborators, milestones, labels, isEditable, isManageable, isManageableForkedRepository, repository, forkedRepository) @gitbucket.core.pulls.html.conversation(issue, pullreq, commits, comments, issueLabels, collaborators, milestones, labels, isEditable, isManageable, isManageableForkedRepository, repository, forkedRepository)
</div> </div>
<div class="tab-pane" id="commits"> <div class="tab-pane" id="commits">
@gitbucket.core.pulls.html.commits(dayByDayCommits, Some(comments), repository) @if(commits.nonEmpty){
@gitbucket.core.pulls.html.commits(dayByDayCommits, Some(comments), repository)
}
</div> </div>
<div class="tab-pane" id="files"> <div class="tab-pane" id="files">
@gitbucket.core.helper.html.diff(diffs, repository, commits.headOption.map(_.id), commits.lastOption.map(_.id), true, Some(pullreq.issueId), isManageable, true) @if(commits.nonEmpty){
@gitbucket.core.helper.html.diff(diffs, repository, commits.headOption.map(_.id), commits.lastOption.map(_.id), true, Some(pullreq.issueId), isManageable, true)
}
</div> </div>
</div> </div>
} }