~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/templates/bugcomment-index.pt

[r=benji][bug=814414,
        819401] Adds the privacy ribbon notification to private branches and
        private merge proposals.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
>
9
9
  <body>
10
10
    <metal:block fill-slot="head_epilogue">
 
11
    <tal:if condition="request/features/bugs.private_notification.enabled">
11
12
    <script>
12
13
        LPS.use('base', 'node', 'lp.app.privacy', function(Y) {
13
14
            Y.on("domready", function () {
14
15
                if (Y.one(document.body).hasClass('private')) {
 
16
                    var config = {
 
17
                        notification_text: 'This comment is on a private bug',
 
18
                        hidden: true
 
19
                    };
 
20
                    Y.lp.app.privacy.setup_privacy_notification(config);
15
21
                    Y.lp.app.privacy.display_privacy_notification(false);
16
22
                }
17
23
            });
18
24
        });
19
25
    </script>
 
26
    </tal:if>
20
27
    </metal:block>
21
28
    <div metal:fill-slot="main" tal:define="comment view/comment">
22
 
      <tal:if condition="request/features/bugs.private_notification.enabled">
23
 
        <div tal:attributes="class string: global-notification ${view/privacy_notice_classes}">
24
 
          <span class="sprite notification-private"></span>
25
 
          This comment is on a private bug
26
 
          <a href="#" class="global-notification-close">
27
 
            <span class="sprite notification-close"></span>
28
 
            Hide
29
 
          </a>
30
 
        </div>
31
 
      </tal:if>
32
29
      <h1 tal:content="view/page_title">Foo doesn't work</h1>
33
30
      <tal:comment replace="structure comment/@@+box-expanded-reply">
34
31
      </tal:comment>