File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
@**
* Yobi, Project Hosting SW
*
* Copyright 2014 NAVER Corp.
* http://yobi.io
*
* @author Jihan Kim
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**@
@(issue:models.Issue, numOfAvatars:Int = 3, numOfNames:Int = 5)
@import utils.TemplateHelper._
<div class="voter-list-wrap">
<ul class="voter-list">
@if(issue.isVotedBy(UserApp.currentUser)){
<li>@Html(getUserAvatar(UserApp.currentUser, "medium"))</li>
}
@defining(VoteApp.getVotersExceptCurrentUser(issue.voters)) { issueVoters =>
@for(voter <- VoteApp.getVotersForAvatar(issueVoters, numOfAvatars)) {
<li>@Html(getUserAvatar(voter, "medium"))</li>
}
@if(issueVoters.size > numOfAvatars) {
<li data-toggle="tooltip" data-html="true"
title="
@for(voter <- VoteApp.getVotersForName(issueVoters, numOfAvatars, numOfNames)) {
@voter.name <br>
}
@if(issueVoters.size > numOfAvatars + numOfNames) {
…
}">
<a href="#voters" data-toggle="modal">
@Messages("issue.voters.more", issueVoters.size - numOfAvatars)
</a>
</li>
}
}
</ul>
</div>
<div id="voters" class="modal hide voters-dialog">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h5 class="nm">@Messages("issue.voters")</h5>
</div>
<div class="modal-body">
<ul class="unstyled">
@for(voter <- issue.voters){
<li>
<span>
<span class="avatar-wrap mlarge">
<img src="@voter.avatarUrl" width="40" height="40">
</span>
<strong class="name">@voter.name</strong>
<span class="loginid"> <strong>@{"@"}</strong>@voter.loginId</span>
</span>
</li>
}
</ul>
</div>
<div class="modal-footer">
<button class="ybtn ybtn-info ybtn-small" data-dismiss="modal" aria-hidden="true">@Messages("button.confirm")</button>
</div>
</div>