Mercurial > kallithea
annotate rhodecode/templates/admin/notifications/notifications.html @ 3206:d4bb8de7382f beta
top menu: show user menu when hovering instead of using js - like other menus
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 23 Jan 2013 20:26:34 +0100 |
parents | b4f401524060 |
children | 1f334a68d057 |
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()"> |
3197 | 13 ${self.menu('admin')} |
1702
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"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1817
diff
changeset
|
20 ${self.breadcrumbs()} |
2001
93d4e3eb7d84
made upper menu always hover, looks nicer and produces less troubles
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
21 ##<ul class="links"> |
93d4e3eb7d84
made upper menu always hover, looks nicer and produces less troubles
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
22 ## <li> |
93d4e3eb7d84
made upper menu always hover, looks nicer and produces less troubles
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
23 ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
93d4e3eb7d84
made upper menu always hover, looks nicer and produces less troubles
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
24 ## </li> |
93d4e3eb7d84
made upper menu always hover, looks nicer and produces less troubles
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
25 ##</ul> |
1702
8cb7f5c4d494
#302 - basic notification system, models+tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 </div> |
2673
d5e42c00f3c1
white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2610
diff
changeset
|
27 |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
2207
diff
changeset
|
28 <div style="padding:14px 18px;text-align: right;float:left"> |
2433
74f2910f7ad9
Added pull requests filter into notification inbox.
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
29 <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> |
2519
f8742e1acf08
add highlight of current filter in notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2503
diff
changeset
|
30 <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> |
2433
74f2910f7ad9
Added pull requests filter into notification inbox.
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
31 <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
2207
diff
changeset
|
32 </div> |
2503
d04243e932cc
Added filtering on inbox by comments
Marcin Kuzminski <marcin@python-works.com>
parents:
2433
diff
changeset
|
33 %if c.notifications: |
2190
64f7cf8f6a33
notification inbox improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
2001
diff
changeset
|
34 <div style="padding:14px 18px;text-align: right;float:right"> |
1791
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
35 <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
|
36 </div> |
2503
d04243e932cc
Added filtering on inbox by comments
Marcin Kuzminski <marcin@python-works.com>
parents:
2433
diff
changeset
|
37 %endif |
1791
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
38 <div id='notification_data'> |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
39 <%include file='notifications_data.html'/> |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
40 </div> |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1703
diff
changeset
|
41 </div> |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1703
diff
changeset
|
42 <script type="text/javascript"> |
2610
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
43 var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
44 var run = function(){ |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
45 YUE.on(YUQ('.delete-notification'),'click',function(e){ |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
46 var notification_id = e.currentTarget.id; |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
47 deleteNotification(url_action,notification_id) |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
48 }) |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
49 YUE.on(YUQ('.read-notification'),'click',function(e){ |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
50 var notification_id = e.currentTarget.id; |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
51 readNotification(url_action,notification_id) |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
52 }) |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
53 } |
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
54 run() |
2190
64f7cf8f6a33
notification inbox improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
2001
diff
changeset
|
55 YUE.on('mark_all_read','click',function(e){ |
2503
d04243e932cc
Added filtering on inbox by comments
Marcin Kuzminski <marcin@python-works.com>
parents:
2433
diff
changeset
|
56 var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; |
2610
3fdf7c3be2c9
added mark as read for single notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2519
diff
changeset
|
57 ypjax(url,'notification_data',function(){run()}); |
2190
64f7cf8f6a33
notification inbox improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
2001
diff
changeset
|
58 }) |
2519
f8742e1acf08
add highlight of current filter in notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2503
diff
changeset
|
59 |
f8742e1acf08
add highlight of current filter in notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2503
diff
changeset
|
60 var current_filter = "${c.current_filter}"; |
f8742e1acf08
add highlight of current filter in notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2503
diff
changeset
|
61 if (YUD.get(current_filter)){ |
3197 | 62 YUD.addClass(current_filter, 'active'); |
2519
f8742e1acf08
add highlight of current filter in notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
2503
diff
changeset
|
63 } |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1703
diff
changeset
|
64 </script> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1817
diff
changeset
|
65 </%def> |