(refs #1334) Indicate who is group manager

This commit is contained in:
Naoki Takezoe
2016-10-26 10:43:33 +09:00
parent 8da55d8aa8
commit 91bb241e8c
2 changed files with 5 additions and 4 deletions

View File

@@ -121,7 +121,7 @@ trait AccountControllerBase extends AccountManagementControllerBase {
// Members
case "members" if(account.isGroupAccount) => {
val members = getGroupMembers(account.userName)
gitbucket.core.account.html.members(account, members.map(_.userName),
gitbucket.core.account.html.members(account, members,
context.loginAccount.exists(x => members.exists { member => member.userName == x.userName && member.isManager }))
}

View File

@@ -1,13 +1,14 @@
@(account: gitbucket.core.model.Account, members: List[String], isGroupManager: Boolean)(implicit context: gitbucket.core.controller.Context)
@(account: gitbucket.core.model.Account, members: List[gitbucket.core.model.GroupMember], isGroupManager: Boolean)(implicit context: gitbucket.core.controller.Context)
@import gitbucket.core.view.helpers
@gitbucket.core.account.html.main(account, Nil, "members", isGroupManager){
@if(members.isEmpty){
No members
} else {
@members.map { userName =>
@members.map { member =>
<div class="block">
<div class="block-header">
@helpers.avatar(userName, 20) <a href="@helpers.url(userName)">@userName</a>
@helpers.avatar(member.userName, 20) <a href="@helpers.url(member.userName)">@member.userName</a>
@if(member.isManager){ (Manager) }
</div>
</div>
}