@** * Yobi, Project Hosting SW * * Copyright 2013 NAVER Corp. * http://yobi.io * * @author Yi EungJun * * 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. **@ @(from: Integer, size: Integer) @import utils.TemplateHelper._ @import utils.JodaDateUtil @notifycationIcon(notifytype: EventType, state: String) = @{ notifytype match { case EventType.NEW_COMMENT | EventType.NEW_REVIEW_COMMENT | EventType.REVIEW_THREAD_STATE_CHANGED => { "comments"} case EventType.NEW_ISSUE | EventType.ISSUE_STATE_CHANGED => { if(state=="closed") "science closed" else "science" } case EventType.ISSUE_ASSIGNEE_CHANGED => { "ftpaccounts changed" } case EventType.NEW_POSTING => { "notes" } case EventType.NEW_PULL_REQUEST | EventType.PULL_REQUEST_STATE_CHANGED => { if(state=="closed") "merge closed" else if(state=="merged") "merge merged" else "merge" } case EventType.MEMBER_ENROLL_REQUEST => { if(state=="ACCEPT") "addfriend closed" else if (state=="CANCEL") "addfriend rejected" else "addfriend" } case EventType.NEW_COMMIT =>{"push"} case EventType.PULL_REQUEST_REVIEW_STATE_CHANGED => {"preview changed"} case _ => {"info"} } } @defining(NotificationEvent.findByReceiver(UserApp.currentUser, from, size)){ notifications => @if(notifications.size == 0){