notifications.html
65 lines
| 2.1 KiB
| text/html
|
HtmlLexer
r1712 | ## -*- coding: utf-8 -*- | |||
<%inherit file="/base/base.html"/> | ||||
<%def name="title()"> | ||||
r3582 | ${_('My Notifications')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |||
r1712 | </%def> | |||
<%def name="breadcrumbs_links()"> | ||||
${_('My Notifications')} | ||||
</%def> | ||||
<%def name="page_nav()"> | ||||
Mads Kiilerich
|
r3197 | ${self.menu('admin')} | ||
r1712 | </%def> | |||
<%def name="main()"> | ||||
<div class="box"> | ||||
<!-- box / title --> | ||||
<div class="title"> | ||||
r1888 | ${self.breadcrumbs()} | |||
r2001 | ##<ul class="links"> | |||
## <li> | ||||
## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> | ||||
## </li> | ||||
##</ul> | ||||
r1712 | </div> | |||
r2673 | ||||
r2244 | <div style="padding:14px 18px;text-align: right;float:left"> | |||
r2433 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> | |||
r2519 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> | |||
r2433 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> | |||
r2244 | </div> | |||
r2503 | %if c.notifications: | |||
r2190 | <div style="padding:14px 18px;text-align: right;float:right"> | |||
r1791 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> | |||
r1817 | </div> | |||
r2503 | %endif | |||
r1791 | <div id='notification_data'> | |||
<%include file='notifications_data.html'/> | ||||
</div> | ||||
r1712 | </div> | |||
<script type="text/javascript"> | ||||
r2610 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; | |||
var run = function(){ | ||||
YUE.on(YUQ('.delete-notification'),'click',function(e){ | ||||
var notification_id = e.currentTarget.id; | ||||
deleteNotification(url_action,notification_id) | ||||
}) | ||||
YUE.on(YUQ('.read-notification'),'click',function(e){ | ||||
var notification_id = e.currentTarget.id; | ||||
readNotification(url_action,notification_id) | ||||
}) | ||||
} | ||||
run() | ||||
r2190 | YUE.on('mark_all_read','click',function(e){ | |||
r2503 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; | |||
r2610 | ypjax(url,'notification_data',function(){run()}); | |||
r2190 | }) | |||
r2519 | ||||
var current_filter = "${c.current_filter}"; | ||||
if (YUD.get(current_filter)){ | ||||
Mads Kiilerich
|
r3197 | YUD.addClass(current_filter, 'active'); | ||
r2519 | } | |||
r1712 | </script> | |||
r1888 | </%def> | |||