##// END OF EJS Templates
routing: introduce 'notification_delete' url and use POST instead of DELETE
routing: introduce 'notification_delete' url and use POST instead of DELETE

File last commit:

r6039:d2ce61e4 default
r6039:d2ce61e4 default
Show More
show_notification.html
52 lines | 1.6 KiB | text/html | HtmlLexer
## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
<%block name="title">
${_('Show Notification')} ${c.authuser.username}
</%block>
<%def name="breadcrumbs_links()">
${h.link_to(_('Notifications'),h.url('notifications'))}
&raquo;
${_('Show Notification')}
</%def>
<%block name="header_menu">
${self.menu('admin')}
</%block>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
<div class="table">
<div id="notification_${c.notification.notification_id}">
<div class="notification-header">
${h.gravatar_div(c.notification.created_by_user.email, size=24)}
<div class="desc">
${c.notification.description}
</div>
<div class="delete-notifications">
<span id="${c.notification.notification_id}" class="delete-notification action"><i class="icon-minus-circled" id="yui-gen24"></i></span>
</div>
</div>
<div class="notification-body">
<div class="notification-subject">${h.literal(c.notification.subject)}</div>
%if c.notification.body:
${h.render_w_mentions(c.notification.body)}
%endif
</div>
</div>
</div>
</div>
<script type="text/javascript">
var url = "${url('notification_delete', notification_id='__NOTIFICATION_ID__')}";
var main = "${url('notifications')}";
$('.delete-notification').click(function(e){
var notification_id = e.currentTarget.id;
deleteNotification(url,notification_id,[function(){window.location=main}]);
});
</script>
</%def>