annotate rhodecode/templates/admin/notifications/notifications.html @ 1817:523b1011a625 beta

- fixed issue with mark all read button for notifications and listeners on delete buttons - hide mark all read if notification inbox is empty
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 29 Dec 2011 06:59:07 +0200
parents 2aee0dc1784e
children f91d3f9b7230
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1702
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 ## -*- coding: utf-8 -*-
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 <%inherit file="/base/base.html"/>
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 <%def name="title()">
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 ${_('My Notifications')} ${c.rhodecode_user.username} - ${c.rhodecode_name}
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 </%def>
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 <%def name="breadcrumbs_links()">
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 ${_('My Notifications')}
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 </%def>
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 <%def name="page_nav()">
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 ${self.menu('admin')}
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 </%def>
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 <%def name="main()">
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <div class="box">
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <!-- box / title -->
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 <div class="title">
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 ${self.breadcrumbs()}
1703
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
21 <ul class="links">
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
22 <li>
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
23 <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span>
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
24 </li>
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
25 </ul>
1702
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 </div>
1817
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
27 %if c.notifications:
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
28 <div style="padding:10px 15px;text-align: right">
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
29 <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span>
1817
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
30 </div>
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
31 %endif
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
32 <div id='notification_data'>
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
33 <%include file='notifications_data.html'/>
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
34 </div>
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1703
diff changeset
35 </div>
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1703
diff changeset
36 <script type="text/javascript">
1817
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
37 var url_del = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
38 YUE.on(YUQ('.delete-notification'),'click',function(e){
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
39 var notification_id = e.currentTarget.id;
1817
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
40 deleteNotification(url_del,notification_id)
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
41 })
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
42 YUE.on('mark_all_read','click',function(e){
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
43 var url = "${h.url('notifications_mark_all_read')}";
1817
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
44 ypjax(url,'notification_data',function(){
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
45 YUD.get('notification_counter').innerHTML=0;
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
46 YUE.on(YUQ('.delete-notification'),'click',function(e){
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
47 var notification_id = e.currentTarget.id;
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
48 deleteNotification(url_del,notification_id)
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
49 })
523b1011a625 - fixed issue with mark all read button for notifications and listeners on delete buttons
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
50 });
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1739
diff changeset
51 })
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1703
diff changeset
52 </script>
1702
8cb7f5c4d494 #302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
53 </%def>