(refs #1348)Show commentted filename, commit id and pull request id on the header

This commit is contained in:
Naoki Takezoe
2016-12-12 17:50:59 +09:00
parent 1c66052372
commit f0e2775861
2 changed files with 7 additions and 8 deletions

View File

@@ -328,7 +328,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
html.commit(id, new JGitUtil.CommitInfo(revCommit),
JGitUtil.getBranchesOfCommit(git, revCommit.getName),
JGitUtil.getTagsOfCommit(git, revCommit.getName),
getCommitComments(repository.owner, repository.name, id, false),
getCommitComments(repository.owner, repository.name, id, true),
repository, diffs, oldCommitId, hasDeveloperRole(repository.owner, repository.name, context.loginAccount))
}
}

View File

@@ -13,15 +13,14 @@
@helpers.avatar(comment.commentedUserName, 20)
@helpers.user(comment.commentedUserName, styleClass="username strong")
<span class="muted">
commented
commented on
@if(comment.issueId.isDefined){
on this Pull request
} else {
@if(comment.fileName.isDefined){
on @comment.fileName.get
}
in <a href="@context.path/@repository.owner/@repository.name/commit/@comment.commitId">@comment.commitId.substring(0, 7)</a>
<a href="@helpers.url(repository)/pull/@comment.issueId">#@comment.issueId</a>
}
@comment.fileName.map { fileName =>
@fileName in
}
<a href="@context.path/@repository.owner/@repository.name/commit/@comment.commitId">@comment.commitId.substring(0, 7)</a>
@gitbucket.core.helper.html.datetimeago(comment.registeredDate)
</span>
<span class="pull-right">