diff --git a/src/main/scala/gitbucket/core/controller/PullRequestsController.scala b/src/main/scala/gitbucket/core/controller/PullRequestsController.scala index 92356d7..3cbd887 100644 --- a/src/main/scala/gitbucket/core/controller/PullRequestsController.scala +++ b/src/main/scala/gitbucket/core/controller/PullRequestsController.scala @@ -130,8 +130,8 @@ isManageable(repository), hasDeveloperRole(pullreq.requestUserName, pullreq.requestRepositoryName, context.loginAccount), repository, - getRepository(pullreq.requestUserName, pullreq.requestRepositoryName) - //flash.toMap.map(f => f._1 -> f._2.toString) + getRepository(pullreq.requestUserName, pullreq.requestRepositoryName), + flash.toMap.map(f => f._1 -> f._2.toString) ) // html.pullreq( diff --git a/src/main/twirl/gitbucket/core/pulls/conversation.scala.html b/src/main/twirl/gitbucket/core/pulls/conversation.scala.html index e6fec80..254a5f3 100644 --- a/src/main/twirl/gitbucket/core/pulls/conversation.scala.html +++ b/src/main/twirl/gitbucket/core/pulls/conversation.scala.html @@ -11,9 +11,10 @@ isManageable: Boolean, isManageableForkedRepository: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo, - forkedRepository: Option[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context) + forkedRepository: Option[gitbucket.core.service.RepositoryService.RepositoryInfo], + flash: Map[String, String])(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers -@gitbucket.core.pulls.html.menu("conversation", issue, pullreq, commits, comments, isManageable, repository){ +@gitbucket.core.pulls.html.menu("conversation", issue, pullreq, commits, comments, isManageable, repository, flash){
@gitbucket.core.issues.html.commentlist(Some(issue), comments.toList, isManageable, repository, Some(pullreq)) diff --git a/src/main/twirl/gitbucket/core/pulls/menu.scala.html b/src/main/twirl/gitbucket/core/pulls/menu.scala.html index 9d475d9..5fc8c5e 100644 --- a/src/main/twirl/gitbucket/core/pulls/menu.scala.html +++ b/src/main/twirl/gitbucket/core/pulls/menu.scala.html @@ -4,7 +4,8 @@ commits: Seq[gitbucket.core.util.JGitUtil.CommitInfo], comments: Seq[gitbucket.core.model.Comment], isManageable: Boolean, - repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(body: => Html)(implicit context: gitbucket.core.controller.Context) + repository: gitbucket.core.service.RepositoryService.RepositoryInfo, + flash: Map[String, String] = Map.empty)(body: => Html)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @import gitbucket.core.model.IssueComment @gitbucket.core.html.main(s"${issue.title} - Pull request #${issue.issueId} - ${repository.owner}/${repository.name}", Some(repository)) { @@ -72,28 +73,13 @@
  • Files Changed
  • + @flash.get("error").map { error => +
    @error
    + } + @flash.get("info").map { info => +
    @info
    + } @body - @* -
    - @flash.get("error").map { error => -
    @error
    - } - @flash.get("info").map { info => -
    @info
    - } - @gitbucket.core.pulls.html.conversation(issue, pullreq, commits, comments, issueLabels, collaborators, milestones, priorities, labels, isEditable, isManageable, isManageableForkedRepository, repository, forkedRepository) -
    -
    - @if(commits.nonEmpty) { - @gitbucket.core.pulls.html.commits(dayByDayCommits, repository) - } -
    -
    - @if(commits.nonEmpty) { - @gitbucket.core.helper.html.diff(diffs, repository, commits.headOption.map(_.id), commits.lastOption.map(_.id), true, Some(pullreq.issueId), isManageable, true) - } -
    - *@
    } }