~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/templates/bug-portlet-subscription.pt

Merge db-devel.

Show diffs side-by-side

added added

removed removed

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