~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/templates/branchmergeproposal-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:
48
48
      padding-bottom: 10px;
49
49
    }
50
50
  </style>
 
51
  <tal:if condition="request/features/bugs.private_notification.enabled">
 
52
  <script>
 
53
      LPS.use('base', 'node', 'lp.app.privacy', function(Y) {
 
54
          Y.on("domready", function () {
 
55
              if (Y.one(document.body).hasClass('private')) {
 
56
                  var config = {
 
57
                      notification_text: 'This merge proposal is for a private branch',
 
58
                      hidden: true
 
59
                  };
 
60
                  Y.lp.app.privacy.setup_privacy_notification(config);
 
61
                  Y.lp.app.privacy.display_privacy_notification(false);
 
62
              }
 
63
          });
 
64
      });
 
65
  </script>
 
66
  </tal:if>
51
67
</metal:block>
52
68
 
53
69
<tal:registering metal:fill-slot="registering">
200
216
  conf = <tal:status-config replace="view/status_config" />
201
217
  <!--
202
218
  LPS.use('io-base', 'lp.code.branchmergeproposal.reviewcomment',
203
 
          'lp.code.branchmergeproposal.status', 'lp.app.comment', 
 
219
          'lp.code.branchmergeproposal.status', 'lp.app.comment',
204
220
          'lp.app.widgets.expander', 'lp.code.branch.revisionexpander', function(Y) {
205
221
 
206
222
    Y.on('load', function() {