diff --git a/src/main/twirl/gitbucket/core/helper/commitcomments.scala.html b/src/main/twirl/gitbucket/core/helper/commitcomments.scala.html new file mode 100644 index 0000000..6230803 --- /dev/null +++ b/src/main/twirl/gitbucket/core/helper/commitcomments.scala.html @@ -0,0 +1,67 @@ +@(comments: gitbucket.core.model.CommitComments, + hasWritePermission: Boolean, + repository: gitbucket.core.service.RepositoryService.RepositoryInfo, + latestCommitId: Option[String] = None)(implicit context: gitbucket.core.controller.Context) +@import gitbucket.core.view.helpers +
+
+ @comments.fileName +
+ @comments.comments.map { comment => +
+
+ @* +
+ @helpers.avatar(comment.commentedUserName, 20) + @helpers.user(comment.commentedUserName, styleClass="username strong") + + commented on + @if(comment.issueId.isDefined){ + #@comment.issueId + } + @comment.fileName.map { fileName => + @fileName in + } + @comment.commitId.substring(0, 7) + @gitbucket.core.helper.html.datetimeago(comment.registeredDate) + + + @if(hasWritePermission || context.loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){ +   + + } + +
+ *@ +
+
+ @helpers.avatar(comment.commentedUserName, 20) + @helpers.user(comment.commentedUserName, styleClass="username strong") + @gitbucket.core.helper.html.datetimeago(comment.registeredDate) + + @if(hasWritePermission || context.loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){ +   + + } + +
+
+ @helpers.markdown( + markdown = comment.content, + repository = repository, + enableWikiLink = false, + enableRefsLink = true, + enableLineBreaks = true, + enableTaskList = false, + hasWritePermission = hasWritePermission + ) +
+
+
+
+ } +
diff --git a/src/main/twirl/gitbucket/core/issues/commentlist.scala.html b/src/main/twirl/gitbucket/core/issues/commentlist.scala.html index f8390a2..359b7b2 100644 --- a/src/main/twirl/gitbucket/core/issues/commentlist.scala.html +++ b/src/main/twirl/gitbucket/core/issues/commentlist.scala.html @@ -4,7 +4,7 @@ repository: gitbucket.core.service.RepositoryService.RepositoryInfo, pullreq: Option[gitbucket.core.model.PullRequest] = None)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers -@import gitbucket.core.model.CommitComment +@import gitbucket.core.model.CommitComments @issueOrPullRequest()={ @if(issue.exists(_.isPullRequest))( "pull request" )else( "issue" ) } @showFormattedComment(comment: gitbucket.core.model.IssueComment)={
@@ -233,8 +233,8 @@ } } } - case comment: CommitComment => { - @gitbucket.core.helper.html.commitcomment(comment, isManageable, repository, pullreq.map(_.commitIdTo)) + case comments: CommitComments => { + @gitbucket.core.helper.html.commitcomments(comments, isManageable, repository, pullreq.map(_.commitIdTo)) } }