~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-04 19:57:38 UTC
  • mfrom: (13599.3.6 global-privacy-ribbon)
  • Revision ID: launchpad@pqm.canonical.com-20110804195738-2j45crssly6eubq6
[r=sinzui][bug=298152] Moves the privacy ribbon template code into
 the base-layout, so that is now active and available on all private contexts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
      </script>
37
37
      <tal:if condition="request/features/bugs.private_notification.enabled">
38
38
      <script type="text/javascript">
39
 
        LPS.use('base', 'node', 'oop', 'event', 'lp.bugs.bugtask_index',
40
 
                  'lp.bugs.subscribers',
41
 
                  'lp.code.branchmergeproposal.diff', 'lp.comments.hide',
42
 
                  function(Y) {
43
 
            /*
44
 
             * Display the privacy notification if the bug is private
45
 
             */
46
 
            Y.on("domready", function () {
47
 
                if (Y.one(document.body).hasClass('private')) {
48
 
                    var config = {
49
 
                        notification_text: 'This bug is private',
50
 
                        hidden: true
51
 
                    };
52
 
                    Y.lp.app.privacy.setup_privacy_notification(config);
53
 
                    Y.lp.app.privacy.display_privacy_notification();
54
 
                }
55
 
            });
56
 
        });
 
39
          // We need to set up some bugtask
 
40
            var privacy_notification_enabled = true;
 
41
      </script>
 
42
      </tal:if>
 
43
      <tal:if condition="not: request/features/bugs.private_notification.enabled">
 
44
      <script type="text/javascript">
 
45
            var privacy_notification_enabled = false;
57
46
      </script>
58
47
      </tal:if>
59
48
      <style type="text/css">