~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/templates/distroseries-localdifferences.pt

Undo rename. Again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        /* Don't show a border between the
16
16
           difference rows and their expanded sections */
17
17
        table.listing tr.diff-extra td { border-top: 0; }
18
 
        table.listing .diff-extra-container {
19
 
            padding-bottom: 15px;
20
 
        }
21
 
        /* Clear float without adding a vertical space */
22
 
        table.listing .clear {
23
 
            clear: both;
24
 
            height: 1px;
25
 
            width: 100%;
26
 
            margin: 0 0 -1px;
27
 
        }
28
 
        table.listing .blacklist-options {
29
 
            padding-left: 1em;
30
 
        }
31
18
      </style>
32
19
    </metal:block>
33
20
 
35
22
      <h1 tal:content="view/label">Package differences between ...</h1>
36
23
    </tal:heading>
37
24
 
 
25
 
38
26
    <div class="top-portlet" metal:fill-slot="main"
39
27
      tal:define="differences view/cached_differences;
40
28
                  series_name context/displayname;
41
29
                  can_perform_sync view/canPerformSync;">
42
 
 
43
 
      <div class="beta">
44
 
        <img src="/@@/beta" alt="[BETA]" />
45
 
      </div>
46
 
 
47
30
      <p><tal:replace replace="structure view/explanation/escapedtext" /></p>
48
31
 
49
 
      <metal:package_filter_form
50
 
        use-macro="context/@@+macros/distroseries-localdiff-search-form" />
 
32
      <tal:distroseries_localdiff_search_form
 
33
        tal:condition="view/has_differences">
 
34
        <metal:package_filter_form
 
35
          use-macro="context/@@+macros/distroseries-localdiff-search-form" />
 
36
      </tal:distroseries_localdiff_search_form>
 
37
 
51
38
 
52
39
      <div metal:use-macro="context/@@launchpad_form/form">
53
40
 
54
 
      <span tal:replace="nothing">
55
 
      We override the 'buttons' slot because we want the syc button to be
56
 
      disabled by default. The Javascript code running on top of this will
57
 
      enable the button and open a confirmation popup when the button is
58
 
      clicked. This is done because syncing packages is too dangerous without
59
 
      a confirmation.
60
 
      </span>
61
 
      <div metal:fill-slot="buttons">
62
 
        <script type="text/javascript">
63
 
          LPS.use(
64
 
            'node', 'event', 'lp.registry.distroseriesdifferences_details',
65
 
            'lp.app.confirmationoverlay',function(Y) {
66
 
            Y.on('domready', function() {
67
 
              var dsd_details = Y.lp.registry.distroseriesdifferences_details;
68
 
              Y.all('input[name=field.actions.sync]').each(function(button) {
69
 
                // Cleanup the button's title which says the button is disabled if
70
 
                // Javascript is disabled.
71
 
                button.set('title', '');
72
 
                // Create a function to bypass the display of the Confirmation
73
 
                // Overlay if no package has been selected.
74
 
                var has_synced_packages = function() {
75
 
                  return (dsd_details.get_number_of_packages() !== 0);
76
 
                }
77
 
                // Create the Confirmation Overlay.
78
 
                new Y.lp.app.confirmationoverlay.ConfirmationOverlay({
79
 
                  button: button,
80
 
                  display_confirmation_fn: has_synced_packages,
81
 
                  form_content_fn: dsd_details.get_packages_summary,
82
 
                  header_content_fn: dsd_details.get_confirmation_header_number_of_packages
83
 
                });
84
 
              });
85
 
            });
86
 
          });
87
 
        </script>
88
 
        <div id="launchpad-form-actions" class="actions"
89
 
          tal:define="sync view/actions/byname/field.actions.sync|nothing;
90
 
                      upgrade view/actions/byname/field.actions.upgrade|nothing">
91
 
          <input class="button" type="submit" disabled="true"
92
 
              title="Please use a Javascript-enabled browser to sync packages."
93
 
              tal:condition="python:sync and sync.available()"
94
 
              tal:attributes="value sync/label;
95
 
                              name sync/__name__;
96
 
                              id sync/__name__;" />
97
 
          <input class="button" type="submit"
98
 
            tal:condition="python: upgrade and upgrade.available()"
99
 
            tal:attributes="value upgrade/label;
100
 
                            name upgrade/__name__;
101
 
                            id upgrade/__name__;" />
102
 
        </div>
103
 
      </div>
104
 
 
105
41
      <div metal:fill-slot="widgets">
106
42
        <tal:navigation_top
107
43
          replace="structure differences/@@+navigation-links-upper" />
287
223
    </div>
288
224
<script type="text/javascript">
289
225
LPS.use('lp.registry.distroseriesdifferences_details', function(Y) {
290
 
  Y.on('domready', function() {
291
 
    Y.lp.registry.distroseriesdifferences_details.setup();
292
 
  });
 
226
  diff_module = Y.lp.registry.distroseriesdifferences_details
 
227
 
 
228
  Y.on('domready', diff_module.setup_expandable_rows);
293
229
});
294
230
</script>
295
231
<script type="text/javascript">