9
9
<div class="section" tal:define="context_menu context/menu:context"
10
10
metal:define-slot="heading">
12
tal:attributes="class view/current_user_subscription_class"
13
tal:content="structure context_menu/subscription/render" />
11
<div id="current_user_subscription"
12
tal:attributes="class python:view.other_subscription_notifications
13
and 'has_other_subscriptions'">
14
<tal:block condition="not:view/muted">
15
<span tal:condition="not:view/only_other_subscription_notifications"
16
tal:content="view/notifications_text/not_only_other_subscription">
19
<span tal:condition="view/only_other_subscription_notifications"
20
tal:content="view/notifications_text/only_other_subscription" />
21
<a tal:attributes="href string:${view/current_bugtask/fmt:url}/+subscribe"
22
class="menu-link-subscription sprite modify edit">
23
<tal:text condition="view/direct_all_notifications"
24
replace="view/notifications_text/direct_all">
25
subscribed to all notifications for this bug.
27
<tal:text condition="view/direct_metadata_notifications"
28
replace="view/notifications_text/direct_metadata" />
29
<tal:text condition="view/direct_lifecycle_notifications"
30
replace="view/notifications_text/direct_lifecycle" />
31
<tal:text condition="not:view/direct_notifications"
32
replace="view/notifications_text/not_direct" />
35
<span tal:condition="view/muted"
36
tal:content="view/notifications_text/muted" />
14
38
<div id="sub-unsub-spinner">Subscribing...</div>
15
<div tal:condition="request/features/malone.advanced-structural-subscriptions.enabled"
16
tal:content="structure context_menu/editsubscriptions/render" />
17
39
<tal:show-mute condition="
18
40
request/features/malone.advanced-subscriptions.enabled">
19
<div tal:attributes="class view/current_user_mute_class"
41
<div tal:attributes="class python:
42
'hidden' if not view.user_should_see_mute_link else None"
20
43
id="mute-link-container">
21
44
<span tal:replace="structure context_menu/mute_subscription/render"
22
45
/> <a target="help" class="sprite maybe mute-help"
23
46
href="/+help/subscription-mute.html"
24
47
> <span class="invisible-link">Mute help</span></a>
25
<div style="float: left" id="mute-unmute-spinner">Unmuting...</div>
50
<div tal:condition="request/features/malone.advanced-structural-subscriptions.enabled"
51
tal:content="structure context_menu/editsubscriptions/render" />
29
53
<script type="text/javascript">
30
54
LPS.use('io-base', 'node',
31
'lp.bugs.bugtask_index.portlets', function(Y) {
55
'lp.bugs.bugtask_index.portlets',
56
'lp.bugs.bugtask_index.portlets.subscription', function(Y) {
32
57
// Must be done inline here to ensure the load event fires.
33
58
// This is a work around for a YUI3 issue with event handling.
34
59
var subscription_link = Y.one('.menu-link-subscription');
41
66
Y.on('domready', function() {
42
if (Y.lp.bugs.bugtask_index.portlets) {
43
Y.lp.bugs.bugtask_index.portlets.load_subscribers_portlet(
44
subscription_link, subscription_link_handler);
67
lp.bugs.bugtask_index.portlets.subscription.initialize();
68
Y.lp.bugs.bugtask_index.portlets.load_subscription_portlet(
69
subscription_link, subscription_link_handler);
70
Y.lp.bugs.bugtask_index.portlets.load_subscribers_portlet(
71
subscription_link, subscription_link_handler);