From 1b65ae20621db2f2c76321894562dc47214ca880 Mon Sep 17 00:00:00 2001 From: takezoe Date: Sun, 28 May 2017 12:16:33 +0900 Subject: [PATCH] Don't render contents of Commits tab and Files tab if commits is empty. --- src/main/twirl/gitbucket/core/pulls/pullreq.scala.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/twirl/gitbucket/core/pulls/pullreq.scala.html b/src/main/twirl/gitbucket/core/pulls/pullreq.scala.html index 34f921184..239ec2dde 100644 --- a/src/main/twirl/gitbucket/core/pulls/pullreq.scala.html +++ b/src/main/twirl/gitbucket/core/pulls/pullreq.scala.html @@ -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.commits(dayByDayCommits, Some(comments), repository) + @if(commits.nonEmpty){ + @gitbucket.core.pulls.html.commits(dayByDayCommits, Some(comments), repository) + }
- @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) + }
}