Show More
@@ -1,45 +1,53 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('My Notifications')} ${c.rhodecode_user.username} - ${c.rhodecode_name} |
|
5 | ${_('My Notifications')} ${c.rhodecode_user.username} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Notifications')} |
|
9 | ${_('My Notifications')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | <ul class="links"> |
|
21 | <ul class="links"> | |
22 | <li> |
|
22 | <li> | |
23 | <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
|
23 | <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> | |
24 | </li> |
|
24 | </li> | |
25 | </ul> |
|
25 | </ul> | |
26 | </div> |
|
26 | </div> | |
|
27 | %if c.notifications: | |||
27 | <div style="padding:10px 15px;text-align: right"> |
|
28 | <div style="padding:10px 15px;text-align: right"> | |
28 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> |
|
29 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> | |
29 | </div> |
|
30 | </div> | |
|
31 | %endif | |||
30 | <div id='notification_data'> |
|
32 | <div id='notification_data'> | |
31 | <%include file='notifications_data.html'/> |
|
33 | <%include file='notifications_data.html'/> | |
32 | </div> |
|
34 | </div> | |
33 | </div> |
|
35 | </div> | |
34 | <script type="text/javascript"> |
|
36 | <script type="text/javascript"> | |
35 | var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
37 | var url_del = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; | |
36 | YUE.on(YUQ('.delete-notification'),'click',function(e){ |
|
38 | YUE.on(YUQ('.delete-notification'),'click',function(e){ | |
37 | var notification_id = e.currentTarget.id; |
|
39 | var notification_id = e.currentTarget.id; | |
38 | deleteNotification(url,notification_id) |
|
40 | deleteNotification(url_del,notification_id) | |
39 | }) |
|
41 | }) | |
40 | YUE.on('mark_all_read','click',function(e){ |
|
42 | YUE.on('mark_all_read','click',function(e){ | |
41 | var url = "${h.url('notifications_mark_all_read')}"; |
|
43 | var url = "${h.url('notifications_mark_all_read')}"; | |
42 |
ypjax(url,'notification_data',function(){ |
|
44 | ypjax(url,'notification_data',function(){ | |
|
45 | YUD.get('notification_counter').innerHTML=0; | |||
|
46 | YUE.on(YUQ('.delete-notification'),'click',function(e){ | |||
|
47 | var notification_id = e.currentTarget.id; | |||
|
48 | deleteNotification(url_del,notification_id) | |||
|
49 | }) | |||
|
50 | }); | |||
43 | }) |
|
51 | }) | |
44 | </script> |
|
52 | </script> | |
45 | </%def> |
|
53 | </%def> |
@@ -1,28 +1,28 b'' | |||||
1 |
|
1 | |||
2 |
% |
|
2 | %if c.notifications: | |
3 | <% |
|
3 | <% | |
4 | unread = lambda n:{False:'unread'}.get(n) |
|
4 | unread = lambda n:{False:'unread'}.get(n) | |
5 | %> |
|
5 | %> | |
6 | <div class="table"> |
|
6 | <div class="table"> | |
7 | <div class="notification-list"> |
|
7 | <div class="notification-list"> | |
8 | %for notification in c.notifications: |
|
8 | %for notification in c.notifications: | |
9 | <div id="notification_${notification.notification.notification_id}" class="container ${unread(notification.read)}"> |
|
9 | <div id="notification_${notification.notification.notification_id}" class="container ${unread(notification.read)}"> | |
10 | <div class="notification-header"> |
|
10 | <div class="notification-header"> | |
11 | <div class="gravatar"> |
|
11 | <div class="gravatar"> | |
12 | <img alt="gravatar" src="${h.gravatar_url(h.email(notification.notification.created_by_user.email),24)}"/> |
|
12 | <img alt="gravatar" src="${h.gravatar_url(h.email(notification.notification.created_by_user.email),24)}"/> | |
13 | </div> |
|
13 | </div> | |
14 | <div class="desc ${unread(notification.read)}"> |
|
14 | <div class="desc ${unread(notification.read)}"> | |
15 | <a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a> |
|
15 | <a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a> | |
16 | </div> |
|
16 | </div> | |
17 | <div class="delete-notifications"> |
|
17 | <div class="delete-notifications"> | |
18 | <span id="${notification.notification.notification_id}" class="delete-notification delete_icon action"></span> |
|
18 | <span id="${notification.notification.notification_id}" class="delete-notification delete_icon action"></span> | |
19 | </div> |
|
19 | </div> | |
20 | </div> |
|
20 | </div> | |
21 | <div class="notification-subject">${h.literal(notification.notification.subject)}</div> |
|
21 | <div class="notification-subject">${h.literal(notification.notification.subject)}</div> | |
22 | </div> |
|
22 | </div> | |
23 | %endfor |
|
23 | %endfor | |
24 | </div> |
|
24 | </div> | |
25 | </div> |
|
25 | </div> | |
26 | %else: |
|
26 | %else: | |
27 | <div class="table">${_('No notifications here yet')}</div> |
|
27 | <div class="table">${_('No notifications here yet')}</div> | |
28 | %endif No newline at end of file |
|
28 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now