~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/templates/branch-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:
50
50
        }, window);
51
51
    });
52
52
  "/>
 
53
 
 
54
  <tal:if condition="request/features/bugs.private_notification.enabled">
 
55
  <script>
 
56
      LPS.use('base', 'node', 'lp.app.privacy', function(Y) {
 
57
          Y.on("domready", function () {
 
58
              if (Y.one(document.body).hasClass('private')) {
 
59
                  var config = {
 
60
                      notification_text: 'This is a private branch',
 
61
                      hidden: true
 
62
                  };
 
63
                  Y.lp.app.privacy.setup_privacy_notification(config);
 
64
                  Y.lp.app.privacy.display_privacy_notification(true);
 
65
              }
 
66
          });
 
67
      });
 
68
  </script>
 
69
  </tal:if>
 
70
 
53
71
</metal:block>
54
72
 
55
73
<body>