~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  class="portlet vertical"
  id="portlet-subscription"
  metal:define-macro="custom"
>
  <div class="section" tal:define="context_menu context/menu:context"
       metal:define-slot="heading">
    <div
      tal:attributes="class view/current_user_subscription_class"
      tal:content="structure context_menu/subscription/render" />
    <div id="sub-unsub-spinner">Subscribing...</div>
    <div tal:condition="request/features/malone.advanced-structural-subscriptions.enabled"
        tal:content="structure context_menu/editsubscriptions/render" />
    <tal:show-mute condition="
        request/features/malone.advanced-subscriptions.enabled">
      <div tal:attributes="class view/current_user_mute_class"
           id="mute-link-container">
        <span tal:replace="structure context_menu/mute_subscription/render"
        />&nbsp;<a target="help" class="sprite maybe mute-help"
            href="/+help/subscription-mute.html"
          >&nbsp;<span class="invisible-link">Mute help</span></a>
        <div style="float: left" id="mute-unmute-spinner">Unmuting...</div>
      </div>
    </tal:show-mute>
  </div>
  <script type="text/javascript">
    LPS.use('io-base', 'node',
            'lp.bugs.bugtask_index.portlets', function(Y) {
        // Must be done inline here to ensure the load event fires.
        // This is a work around for a YUI3 issue with event handling.
        var subscription_link = Y.one('.menu-link-subscription');
        var subscription_link_handler;
        if (subscription_link) {
            subscription_link_handler = subscription_link.on(
                'click', function(e) { e.preventDefault(); });
        }

        Y.on('domready', function() {
            if (Y.lp.bugs.bugtask_index.portlets) {
                Y.lp.bugs.bugtask_index.portlets.load_subscribers_portlet(
                    subscription_link, subscription_link_handler);
            }
        });
    });
  </script>
</div>