Show More
@@ -67,6 +67,14 b' class NotificationsController(BaseContro' | |||||
67 | c.pull_request_type = Notification.TYPE_PULL_REQUEST |
|
67 | c.pull_request_type = Notification.TYPE_PULL_REQUEST | |
68 | c.comment_type = [Notification.TYPE_CHANGESET_COMMENT, |
|
68 | c.comment_type = [Notification.TYPE_CHANGESET_COMMENT, | |
69 | Notification.TYPE_PULL_REQUEST_COMMENT] |
|
69 | Notification.TYPE_PULL_REQUEST_COMMENT] | |
|
70 | ||||
|
71 | _current_filter = request.GET.getall('type') | |||
|
72 | c.current_filter = 'all' | |||
|
73 | if _current_filter == [c.pull_request_type]: | |||
|
74 | c.current_filter = 'pull_request' | |||
|
75 | elif _current_filter == c.comment_type: | |||
|
76 | c.current_filter = 'comment' | |||
|
77 | ||||
70 | return render('admin/notifications/notifications.html') |
|
78 | return render('admin/notifications/notifications.html') | |
71 |
|
79 | |||
72 | def mark_all_read(self): |
|
80 | def mark_all_read(self): |
@@ -3348,6 +3348,10 b' div.gravatar img {' | |||||
3348 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); |
|
3348 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | |
3349 | } |
|
3349 | } | |
3350 |
|
3350 | |||
|
3351 | .ui-btn.active{ | |||
|
3352 | font-weight: bold; | |||
|
3353 | } | |||
|
3354 | ||||
3351 | ins,div.options a:hover { |
|
3355 | ins,div.options a:hover { | |
3352 | text-decoration: none; |
|
3356 | text-decoration: none; | |
3353 | } |
|
3357 | } |
@@ -27,7 +27,7 b'' | |||||
27 |
|
27 | |||
28 | <div style="padding:14px 18px;text-align: right;float:left"> |
|
28 | <div style="padding:14px 18px;text-align: right;float:left"> | |
29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> |
|
29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> | |
30 |
<span id=' |
|
30 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> | |
31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> |
|
31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> | |
32 | </div> |
|
32 | </div> | |
33 | %if c.notifications: |
|
33 | %if c.notifications: | |
@@ -54,5 +54,11 b" YUE.on('mark_all_read','click',function(" | |||||
54 | }) |
|
54 | }) | |
55 | }); |
|
55 | }); | |
56 | }) |
|
56 | }) | |
|
57 | ||||
|
58 | var current_filter = "${c.current_filter}"; | |||
|
59 | if (YUD.get(current_filter)){ | |||
|
60 | YUD.addClass(current_filter, 'active'); | |||
|
61 | } | |||
|
62 | console.log(current_filter); | |||
57 | </script> |
|
63 | </script> | |
58 | </%def> |
|
64 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now