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 Keesun Baik
*
* 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.
**@
@(project:Project, page:com.avaje.ebean.Page[CommentThread], param:models.support.ReviewSearchCondition)
@import views.html.helper.form
@import utils.TemplateHelper._
@import utils.JodaDateUtil
@makeSortLink(sortField:String, sortFieldString:String) = {
@if(param.orderBy == sortField) {
<a href="#" data-field="@sortField" data-value="@if(param.orderDir == "asc") {desc} else {asc}" class="filter" data-toggle="order">
<i class="ico btn-gray-arrow @if(param.orderDir == "desc") {down}"></i>@sortFieldString
</a>
} else {
<a href="#" data-field="@sortField" data-value="desc" class="filter" data-toggle="order">
<i class="ico btn-gray-arrow down"></i>@sortFieldString
</a>
}
}
@paramForEveryone = { @CommentThread.countReviewsBy(project.id, param.clone.setAuthorId(null).setParticipantId(null)) }
@paramForParticipant = { @CommentThread.countReviewsBy(project.id, param.clone.setAuthorId(null).setParticipantId(UserApp.currentUser().id)) }
@paramForAuthor = { @CommentThread.countReviewsBy(project.id, param.clone.setParticipantId(null).setAuthorId(UserApp.currentUser().id)) }
@projectLayout(Messages("menu.review"), project, utils.MenuType.PROJECT_REVIEW) {
@projectMenu(project, utils.MenuType.PROJECT_REVIEW, "")
<div class="project-page-wrap">
<div class="row-fluid issue-list-wrap">
<div class="span2 search-wrap span-hard-wrap">
<div class="inner advanced">
<ul class="lst-stacked unstyled">
<li @if(param.participantId == null && param.authorId == null){class="active"}>
<a href="#" data-toggle="filter">
@Messages("review.allReview")
<span class="num-badge pull-right">@paramForEveryone</span>
</a>
</li>
<li @if(param.participantId == UserApp.currentUser().id){class="active"}>
<a href="#" data-toggle="filter" data-type="participantId" data-value="@UserApp.currentUser().id">
@Messages("review.involvingYou")
<span class="num-badge pull-right">@paramForParticipant</span>
</a>
</li>
<li @if(param.authorId == UserApp.currentUser().id){class="active"}>
<a href="#" data-toggle="filter" data-type="authorId" data-value="@UserApp.currentUser().id">
@Messages("review.createdByYou")
<span class="num-badge pull-right">@paramForAuthor</span>
</a>
</li>
</ul>
<form id="search" name="search" action="@routes.ReviewThreadApp.reviewThreads(project.owner, project.name)" method="get">
<input type="hidden" name="authorId" value="@param.authorId">
<input type="hidden" name="participantId" value="@param.participantId">
<input type="hidden" name="orderDir" value="@param.orderDir">
<input type="hidden" name="orderBy" value="@param.orderBy">
<input type="hidden" name="state" value="@param.state">
<hr class="hide-in-mobile">
<div class="search-bar span-hard-wrap">
<input name="filter" class="textbox full" type="text" value="@param.filter">
<button type="submit" class="search-btn"><i class="yobicon-search"></i></button>
</div>
</form>
</div>
</div>
<div class="span10 span-hard-wrap">
<div class="pull-right filters">
@makeSortLink("createdDate", Messages("common.order.date"))
</div>
<ul class="nav nav-tabs nm">
@for(state <- Array(State.OPEN, State.CLOSED)) {
<li @if(param.state == state.name) { class="active"}>
<a href="#" data-type="state" data-value="@state.name" data-toggle="filter">
@Messages("issue.state." + state.name.toLowerCase())
<span class="num-badge">@CommentThread.countReviewsBy(project.id, param.clone.setState(state.name))</span>
</a>
</li>
}
</ul>
<div class="review-list-wrap">
@partial_list(project, page, param)
</div>
<div id="pagination"></div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
$yobi.loadModule("review.List", {
"elPagination": $("#pagination"),
"nTotalPages" : @page.getTotalPageCount(),
"welSearchForm": $("form[name='search']")
});
});
</script>
}