[Notice] Announcing the End of Demo Server [Read me]
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
2014-05-22
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.
**@
@(userForm:Form[User], user:User)
@import helper._
@import utils.TemplateHelper._
@siteLayout(user.loginId, utils.MenuType.USER) {
<div class="site-breadcrumb-outer">
<div class="site-breadcrumb-inner">
<h3>@Messages("userinfo.accountSetting")</h3>
</div>
</div>
<div class="page-wrap-outer">
<div class="page-wrap">
@partial_edit_tabmenu("notifications")
<div>
@defining(UserProjectNotification.getProjectNotifications(user)) { notiMap =>
<ul id="notification-projects" class="unstyled lst-stacked span3 mr20">
@defining(Watch.findBy(user, ResourceType.PROJECT)) { watches =>
@if(watches.size > 0) {
@for(i <- 0 until watches.size) {
@defining(Project.find.byId(watches.get(i).resourceId.toLong)) { project =>
<li @if(i == 0){class="active"}><a href="#@project.id" data-toggle="tab">@project.owner / @project.name</a></li>
}
}
}
}
</ul>
<div class="tab-content">
@defining(Watch.findBy(user, ResourceType.PROJECT)) { watches =>
@if(watches.size > 0) {
@for(i <- 0 until watches.size) {
@defining(Project.find.byId(watches.get(i).resourceId.toLong)) { project =>
<div id="@project.id" class="tab-pane @if(i == 0){active}">
<table class="table table-striped table-bordered">
@for(notiType <- models.enumeration.EventType.notiTypes) {
<tr>
<th>@notiType.getDescr</th>
<td>
<div class="switch" data-on-label="On" data-off-label="Off">
<input class="notiUpdate" data-href="@routes.WatchProjectApp.toggle(project.id, notiType.name())" type="checkbox" data-toggle="switch" @if(UserProjectNotification.isEnabledNotiType(notiMap, project, notiType)){ checked="checked" }>
</div>
</td>
</tr>
}
</table>
</div>
}
}
}
}
</div>
}
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
$yobi.loadModule("user.Setting");
});
</script>
}