mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 20:15:59 +01:00
(refs #37)Add participants to issue detail
The design is inherited from Github.
This commit is contained in:
@@ -62,9 +62,12 @@ trait IssuesControllerBase extends ControllerBase {
|
|||||||
val issueId = params("id")
|
val issueId = params("id")
|
||||||
|
|
||||||
getIssue(owner, name, issueId) map {
|
getIssue(owner, name, issueId) map {
|
||||||
|
val comments = getComments(owner, name, issueId.toInt)
|
||||||
|
val participantSet = comments.foldRight(Set(owner)) { (comment, set) => set + comment.commentedUserName }
|
||||||
issues.html.issue(
|
issues.html.issue(
|
||||||
_,
|
_,
|
||||||
getComments(owner, name, issueId.toInt),
|
comments,
|
||||||
|
participantSet,
|
||||||
getIssueLabels(owner, name, issueId.toInt),
|
getIssueLabels(owner, name, issueId.toInt),
|
||||||
(getCollaborators(owner, name) :+ owner).sorted,
|
(getCollaborators(owner, name) :+ owner).sorted,
|
||||||
getMilestones(owner, name),
|
getMilestones(owner, name),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
@(issue: model.Issue,
|
@(issue: model.Issue,
|
||||||
comments: List[model.IssueComment],
|
comments: List[model.IssueComment],
|
||||||
|
participants: Set[String],
|
||||||
issueLabels: List[model.Label],
|
issueLabels: List[model.Label],
|
||||||
collaborators: List[String],
|
collaborators: List[String],
|
||||||
milestones: List[model.Milestone],
|
milestones: List[model.Milestone],
|
||||||
@@ -81,6 +82,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="issue-participants">
|
||||||
|
@participants.size participants
|
||||||
|
@participants.map { participant => @avatar(participant, 20) }
|
||||||
|
</div>
|
||||||
@comments.map { comment =>
|
@comments.map { comment =>
|
||||||
@if(comment.action != "close" && comment.action != "reopen"){
|
@if(comment.action != "close" && comment.action != "reopen"){
|
||||||
<div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div>
|
<div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div>
|
||||||
|
|||||||
@@ -540,6 +540,11 @@ div.issue-avatar-image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.issue-box {
|
div.issue-box {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-left: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.issue-participants {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user