mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-12-24 01:09:55 +01:00
(refs #2002) Recover commit comment for the specific commits
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
comments: List[gitbucket.core.model.Comment],
|
||||
isManageable: Boolean,
|
||||
repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
|
||||
pullreq: Option[gitbucket.core.model.PullRequest] = None)(implicit context: gitbucket.core.controller.Context)
|
||||
pullreq: Option[gitbucket.core.model.PullRequest] = None,
|
||||
commitId: Option[String] = None)(implicit context: gitbucket.core.controller.Context)
|
||||
@import gitbucket.core.view.helpers
|
||||
@issueOrPullRequest()={ @if(issue.exists(_.isPullRequest))( "pull request" )else( "issue" ) }
|
||||
@showFormattedComment(comment: gitbucket.core.model.IssueComment)={
|
||||
@@ -233,7 +234,7 @@
|
||||
}
|
||||
}
|
||||
case comments: gitbucket.core.model.CommitComments => {
|
||||
@gitbucket.core.helper.html.commitcomments(comments, isManageable, repository, pullreq.map(_.commitIdTo))
|
||||
@gitbucket.core.helper.html.commitcomments(comments, isManageable, repository, commitId.orElse(pullreq.map(_.commitIdTo)))
|
||||
}
|
||||
case comment: gitbucket.core.model.CommitComment => {
|
||||
<div class="panel panel-default commit-comment-box commit-comment-@comment.commentId">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
hasWritePermission: Boolean)(implicit context: gitbucket.core.controller.Context)
|
||||
@import gitbucket.core.view.helpers
|
||||
@import gitbucket.core.view.helpers.RichHtmlSeq
|
||||
@import gitbucket.core.model._
|
||||
@gitbucket.core.html.main(commit.shortMessage, Some(repository)){
|
||||
@gitbucket.core.html.menu("files", repository){
|
||||
<table class="table table-bordered">
|
||||
@@ -97,10 +98,19 @@
|
||||
<div style="display: none;">
|
||||
@gitbucket.core.issues.html.commentlist(
|
||||
None,
|
||||
comments.filter(_.asInstanceOf[gitbucket.core.model.CommitComment].fileName.isDefined),
|
||||
comments.map(_.asInstanceOf[CommitComment]).filter(_.fileName.isDefined).groupBy(_.fileName).map { case (fileName, comments) =>
|
||||
CommitComments(
|
||||
fileName = fileName.get,
|
||||
commentedUserName = comments.head.commentedUserName,
|
||||
registeredDate = comments.head.registeredDate,
|
||||
comments = comments,
|
||||
diff = None
|
||||
)
|
||||
}.toList,
|
||||
hasWritePermission,
|
||||
repository,
|
||||
None)
|
||||
None,
|
||||
Some(commitId))
|
||||
</div>
|
||||
</div>
|
||||
@gitbucket.core.repo.html.commentform(commitId = commitId, hasWritePermission = hasWritePermission, repository = repository)
|
||||
|
||||
Reference in New Issue
Block a user