##// END OF EJS Templates
security: don't use literal in notifications....
ergo -
r1825:fcaa19d4 default
parent child Browse files
Show More
@@ -1,60 +1,57 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Show notification')} ${c.rhodecode_user.username}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10
11 11 <%def name="breadcrumbs_links()">
12 ${h.link_to(_('Notifications'),h.url('notifications'))}
12 ${h.link_to(_('Notifications'), h.url('notifications'))}
13 13 &raquo;
14 14 ${_('Show notification')}
15 15 </%def>
16 16
17 17 <%def name="menu_bar_nav()">
18 18 ${self.menu_items(active='admin')}
19 19 </%def>
20 20
21 21 <%def name="main()">
22 22 <div class="box">
23 23 <!-- box / title -->
24 24 <div class="title">
25 25 ${self.breadcrumbs()}
26 ##<ul class="links">
27 ## <li>
28 ## <span ><a href="#">${_('Compose message')}</a></span>
29 ## </li>
30 ##</ul>
31 26 </div>
32 27 <div class="table">
33 28 <div id="notification_${c.notification.notification_id}" class="main-content-full">
34 29 <div class="notification-header">
35 30 ${self.gravatar(c.notification.created_by_user.email, 30)}
36 31 <div class="desc">
37 32 ${c.notification.description}
38 33 </div>
39 34 <div class="delete-notifications">
40 35 <span id="${c.notification.notification_id}" class="delete-notification action"><i class="icon-delete" ></i></span>
41 36 </div>
42 37 </div>
43 38 <div class="notification-body">
44 <div class="notification-subject">${h.literal(c.notification.subject)}</div>
39 <div class="notification-subject">
40 <h3>${_('Subject')}: ${c.notification.subject}</h3>
41 </div>
45 42 %if c.notification.body:
46 43 ${h.render(c.notification.body, renderer=c.visual.default_renderer, mentions=True)}
47 44 %endif
48 45 </div>
49 46 </div>
50 47 </div>
51 48 </div>
52 49 <script type="text/javascript">
53 50 var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
54 51 var main = "${url('notifications')}";
55 52 $('.delete-notification').on('click',function(e){
56 53 var notification_id = e.currentTarget.id;
57 54 deleteNotification(url,notification_id,[function(){window.location=main}])
58 55 })
59 56 </script>
60 57 </%def>
General Comments 0
You need to be logged in to leave comments. Login now