1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
metal:use-macro="view/macro:page/main_only"
i18n:domain="launchpad">
<body>
<metal:block fill-slot="head_epilogue">
<style type="text/css">
.distroseries-localdiff-search-filter input[type="radio"] {
margin-left: 0;
}
/* Don't show a border between the
difference rows and their expanded sections */
table.listing tr.diff-extra td { border-top: 0; }
table.listing .diff-extra-container {
padding-bottom: 15px;
}
/* Clear float without adding a vertical space */
table.listing .clear {
clear: both;
height: 1px;
width: 100%;
margin: 0 0 -1px;
}
table.listing .blacklist-options {
padding-left: 1em;
}
</style>
</metal:block>
<tal:heading metal:fill-slot="heading">
<h1 tal:content="view/label">Package differences between ...</h1>
</tal:heading>
<div class="top-portlet" metal:fill-slot="main"
tal:define="differences view/cached_differences;
series_name context/displayname;
can_perform_sync view/canPerformSync;">
<div class="beta">
<img src="/@@/beta" alt="[BETA]" />
</div>
<p><tal:replace replace="structure view/explanation/escapedtext" /></p>
<metal:package_filter_form
use-macro="context/@@+macros/distroseries-localdiff-search-form" />
<div metal:use-macro="context/@@launchpad_form/form">
<span tal:replace="nothing">
We override the 'buttons' slot because we want the syc button to be
disabled by default. The Javascript code running on top of this will
enable the button and open a confirmation popup when the button is
clicked. This is done because syncing packages is too dangerous without
a confirmation.
</span>
<div metal:fill-slot="buttons">
<script type="text/javascript">
LPS.use(
'node', 'event', 'lp.registry.distroseriesdifferences_details',
'lp.app.confirmationoverlay',function(Y) {
Y.on('domready', function() {
var dsd_details = Y.lp.registry.distroseriesdifferences_details;
Y.all('input[name=field.actions.sync]').each(function(button) {
// Cleanup the button's title which says the button is disabled if
// Javascript is disabled.
button.set('title', '');
// Create a function to bypass the display of the Confirmation
// Overlay if no package has been selected.
var has_synced_packages = function() {
return (dsd_details.get_number_of_packages() !== 0);
}
// Create the Confirmation Overlay.
new Y.lp.app.confirmationoverlay.ConfirmationOverlay({
button: button,
display_confirmation_fn: has_synced_packages,
form_content_fn: dsd_details.get_packages_summary,
header_content_fn: dsd_details.get_confirmation_header_number_of_packages
});
});
});
});
</script>
<div id="launchpad-form-actions" class="actions"
tal:define="sync view/actions/byname/field.actions.sync|nothing;
upgrade view/actions/byname/field.actions.upgrade|nothing">
<input class="button" type="submit" disabled="true"
title="Please use a Javascript-enabled browser to sync packages."
tal:condition="python:sync and sync.available()"
tal:attributes="value sync/label;
name sync/__name__;
id sync/__name__;" />
<input class="button" type="submit"
tal:condition="python: upgrade and upgrade.available()"
tal:attributes="value upgrade/label;
name upgrade/__name__;
id upgrade/__name__;" />
</div>
</div>
<div metal:fill-slot="widgets">
<tal:navigation_top
replace="structure differences/@@+navigation-links-upper" />
<table class="listing">
<thead>
<tr>
<th>Source</th>
<th tal:condition="python: not(view.has_unique_parent) and view.show_parent">
Parent
</th>
<th tal:condition="view/show_parent_version">
<tal:one_parent condition="view/has_unique_parent">
<a tal:attributes="href view/unique_parent/fmt:url"
tal:content="view/unique_parent/displayname">Warty</a> version
</tal:one_parent>
<tal:multiple_parents condition="not: view/has_unique_parent">
Parent version
</tal:multiple_parents>
</th>
<th tal:condition="view/show_derived_version">
<a tal:attributes="href context/fmt:url"
tal:content="series_name">Deriwarty</a> version
</th>
<th tal:condition="view/show_parent_packagesets"
class="parent-package-sets">
Parent package-sets
</th>
<th tal:condition="view/show_packagesets"
class="package-sets">
Package-sets
</th>
<th class="last-changed">Last changed</th>
<th>Latest comment</th>
</tr>
</thead>
<tbody>
<tal:difference repeat="difference differences/batch">
<tr tal:define="parent_source_pub difference/parent_source_pub;
source_pub difference/source_pub;
diff_id difference/id;
src_name difference/source_package_name/name;"
tal:attributes="class src_name">
<td>
<tal:checkbox
condition="can_perform_sync"
define="can_request python:view.canRequestSync(difference)">
<input tal:condition="can_request"
name="field.selected_differences" type="checkbox"
tal:attributes="
value diff_id;
id string:field.selected_differences.${diff_id}"/>
<input
tal:condition="not: can_request"
type="checkbox" disabled="disabled" />
</tal:checkbox>
<a tal:attributes="href difference/fmt:url"
class="js-action toggle-extra"
tal:content="src_name">Foo</a>
<tal:activity
define="activity python:view.describeJobs(difference)"
condition="activity">
<span class="lowlight" tal:content="structure activity"></span>
</tal:activity>
</td>
<td tal:condition="python: not(view.has_unique_parent) and view.show_parent">
<a tal:attributes="href difference/parent_series/fmt:url"
tal:content="difference/parent_series/displayname"
class="parent-name">Warty</a>
</td>
<td tal:condition="view/show_parent_version">
<a tal:condition="difference/parent_source_package_release"
tal:attributes="href difference/parent_source_package_release/fmt:url"
class="parent-version">
<tal:replace
replace="difference/parent_source_version"/></a>
<span class="discreet">
(<a tal:define="changelog_url python:view.parent_changelog_url(difference)"
tal:attributes="href changelog_url">changelog</a>)
</span>
<span tal:condition="not: difference/parent_source_package_release"
class="parent-version"
tal:content="difference/parent_source_version">
</span>
</td>
<td tal:condition="view/show_derived_version">
<a tal:condition="difference/source_package_release"
tal:attributes="href difference/source_package_release/fmt:url"
class="derived-version">
<tal:replace
replace="difference/source_version"/></a>
<span tal:condition="not: difference/source_package_release"
class="derived-version"
tal:content="difference/source_version">
</span>
</td>
<td tal:condition="view/show_parent_packagesets"
class="parent-packagesets">
<tal:replace replace="difference/@@/parent_packagesets_names"/>
</td>
<td tal:condition="view/show_packagesets"
class="packagesets">
<tal:replace replace="difference/@@/packagesets_names" />
</td>
<td class="last-changed">
<tal:parent condition="not: view/show_derived_version">
<tal:published condition="parent_source_pub">
<span tal:attributes="title parent_source_pub/datepublished/fmt:datetime"
tal:content="parent_source_pub/datepublished/fmt:approximatedate">2005-09-16</span>
<tal:creator define="spr parent_source_pub/sourcepackagerelease">
<span class="nowrap">by <a tal:replace="structure spr/creator/fmt:link" /></span>
</tal:creator>
<tal:uploader
define="uploader parent_source_pub/sourcepackagerelease/uploader;
creator parent_source_pub/sourcepackagerelease/creator"
condition="python: uploader not in (None, creator)">
<br />
<span class="discreet nowrap">
(uploaded by <a tal:attributes="href uploader/fmt:url"
tal:content="uploader/fmt:displayname" />)
</span>
</tal:uploader>
</tal:published>
<tal:not-published condition="not:parent_source_pub">
<span tal:content="difference/parent_source_version" />
</tal:not-published>
</tal:parent>
<tal:derived condition="view/show_derived_version">
<tal:published condition="source_pub">
<span tal:attributes="title source_pub/datepublished/fmt:datetime"
tal:content="source_pub/datepublished/fmt:approximatedate">2005-09-16</span>
<tal:creator define="spr source_pub/sourcepackagerelease">
<span class="nowrap">by <a tal:replace="structure spr/creator/fmt:link" /></span>
</tal:creator>
<tal:uploader
define="uploader source_pub/sourcepackagerelease/uploader;
creator source_pub/sourcepackagerelease/creator"
condition="python: uploader not in (None, creator)">
<br />
<span class="discreet nowrap">
(uploaded by <a tal:attributes="href uploader/fmt:url"
tal:content="uploader/fmt:displayname" />)
</span>
</tal:uploader>
</tal:published>
<tal:not-published condition="not:source_pub">
<span tal:content="difference/source_version" />
</tal:not-published>
</tal:derived>
</td>
<td class="latest-comment-fragment">
<tal:latest-comment-fragment
define="comment difference/latest_comment"
content="structure comment/@@+latest-comment-fragment"
condition="comment" />
</td>
</tr>
</tal:difference>
</tbody>
</table>
<tal:navigation_bottom
replace="structure differences/@@+navigation-links-lower" />
<tal:selectable_differences_end
define="widget nocall:view/widgets/selected_differences;
field_name widget/context/__name__;
error python:view.getFieldError(field_name);">
<input tal:attributes="name string:${widget/name}-empty-marker"
type="hidden" value="1" />
<div class="error message" tal:condition="error"
tal:content="structure error">Error message</div>
</tal:selectable_differences_end>
</div>
</div>
<script type="text/javascript">
LPS.use('lp.registry.distroseriesdifferences_details', function(Y) {
Y.on('domready', function() {
Y.lp.registry.distroseriesdifferences_details.setup();
});
});
</script>
<script type="text/javascript">
LPS.use("lp.registry.distroseries.differences", function(Y) {
Y.on("domready", function() {
var form = Y.one("form#distroseries-localdiff-search-filter");
var differences = Y.lp.registry.distroseries.differences;
// Probably only one, but check for more just in case.
Y.all("th.package-sets").each(function(header) {
differences.connect_packageset_picker(header, form);
});
Y.all("th.last-changed").each(function(header) {
differences.connect_last_changed_picker(header, form);
});
});
});
</script>
</div>
</body>
</html>
|