Merge lp://staging/~intellectronica/launchpad/bugs-index-redesign into lp://staging/launchpad

Proposed by Eleanor Berger
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~intellectronica/launchpad/bugs-index-redesign
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~intellectronica/launchpad/bugs-index-redesign
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Canonical Launchpad Engineering code Pending
Review via email: mp+12084@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) wrote :

This branch converts the bugtarget bugs index page to 3.0 style UI and changes a few things, as has been discussed on the ML.

The diff is quite long at 902 lines. Sorry about that. A lot of that is removal of unused code and really simple pagetest changes, so it isn't really as scary as it might appear.

Revision history for this message
Graham Binns (gmb) wrote :

This branch is excellent; I've no complaints. r=me; awesome stuff!

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/icing/style.css'
2--- lib/canonical/launchpad/icing/style.css 2009-09-16 10:03:52 +0000
3+++ lib/canonical/launchpad/icing/style.css 2009-09-18 14:43:52 +0000
4@@ -2228,6 +2228,30 @@
5 .questionstatusEXPIRED {color: #666;} /* dark grey */
6 .questionstatusINVALID {color: #c00;} /* red */
7
8+.search-box {
9+ text-align: left;
10+ float: left;
11+ border:1px solid #d6d6d6;
12+ margin: 0.5em 0 0.5em 0;
13+ color: #717171;
14+ padding: 8px;
15+ -moz-border-radius: 5px;
16+ -o-border-radius: 5px;
17+ -webkit-border-radius: 5px;
18+}
19+
20+.search-box form.primary.search {
21+ margin: 0.5em;
22+}
23+
24+.bug-links td.bugs-count {
25+ text-align: right;
26+ padding-right: 0.5em;
27+}
28+
29+.bug-links td.bugs-link {
30+ text-align: left;
31+}
32
33 /* --- Other --- */
34
35
36=== modified file 'lib/lp/bugs/browser/bugtarget.py'
37--- lib/lp/bugs/browser/bugtarget.py 2009-09-10 12:47:31 +0000
38+++ lib/lp/bugs/browser/bugtarget.py 2009-09-18 17:43:21 +0000
39@@ -1200,6 +1200,13 @@
40 BugTaskStatus.UNKNOWN: 'purple',
41 }
42
43+ override_title_breadcrumbs = True
44+
45+ @property
46+ def label(self):
47+ """The display label for the view."""
48+ return 'Bugs in %s' % self.context.title
49+
50 def initialize(self):
51 BugTaskSearchListingView.initialize(self)
52 bug_statuses_to_show = list(UNRESOLVED_BUGTASK_STATUSES)
53@@ -1211,39 +1218,6 @@
54 BugCountDataItem(status.title, count, self.status_color[status])
55 for status, count in bug_counts]
56
57- def getChartJavascript(self):
58- """Return a snippet of Javascript that draws a pie chart."""
59- # XXX: Bjorn Tillenius 2007-02-13:
60- # This snippet doesn't work in IE, since (I think) there
61- # has to be a delay between creating the canvas element and
62- # using it to draw the chart.
63- js_template = """
64- function drawGraph() {
65- var options = {
66- "drawBackground": false,
67- "colorScheme": [%(color_list)s],
68- "xTicks": [%(label_list)s]};
69- var data = [%(data_list)s];
70- var plotter = PlotKit.EasyPlot(
71- "pie", options, $("bugs-chart"), [data]);
72- }
73- registerLaunchpadFunction(drawGraph);
74- """
75- # The color list should inlude only colors for slices that will
76- # be drawn in the pie chart, so colors that don't have any bugs
77- # associated with them.
78- color_list = ', '.join(
79- data_item.color for data_item in self.bug_count_items
80- if data_item.count > 0)
81- label_list = ', '.join([
82- '{v:%i, label:"%s"}' % (index, data_item.label)
83- for index, data_item in enumerate(self.bug_count_items)])
84- data_list = ', '.join([
85- '[%i, %i]' % (index, data_item.count)
86- for index, data_item in enumerate(self.bug_count_items)])
87- return js_template % dict(
88- color_list=color_list, label_list=label_list, data_list=data_list)
89-
90 @property
91 def uses_launchpad_bugtracker(self):
92 """Whether this distro or product tracks bugs in launchpad.
93@@ -1317,6 +1291,24 @@
94 return tags[:10]
95
96 @property
97+ def tags_cloud_data(self):
98+ """The data for rendering a tags cloud"""
99+ official_tags = set(self.context.official_bug_tags)
100+ tags = self.getUsedBugTagsWithURLs()
101+ tags.sort(key=itemgetter('tag'))
102+ max_count = float(max([1] + [tag['count'] for tag in tags]))
103+ for tag in tags:
104+ if tag['tag'] in official_tags:
105+ if tag['count'] == 0:
106+ tag['factor'] = 1.5
107+ else:
108+ tag['factor'] = 1.5 + (tag['count'] / max_count)
109+ else:
110+ tag['factor'] = 1 + (tag['count'] / max_count)
111+ print tags
112+ return tags
113+
114+ @property
115 def show_manage_tags_link(self):
116 """Should a link to a "manage official tags" page be shown?"""
117 return (IOfficialBugTagTargetRestricted.providedBy(self.context) and
118
119=== modified file 'lib/lp/bugs/browser/bugtask.py'
120--- lib/lp/bugs/browser/bugtask.py 2009-09-11 20:38:21 +0000
121+++ lib/lp/bugs/browser/bugtask.py 2009-09-18 16:08:07 +0000
122@@ -2683,6 +2683,54 @@
123 url = "%s/+expirable-bugs" % canonical_url(self.context)
124 return dict(count=count, url=url, label=label)
125
126+ @property
127+ def new_bugs_info(self):
128+ """Return a dict with new bugs info."""
129+ return dict(
130+ count=self.context.new_bugtasks.count,
131+ url=get_buglisting_search_filter_url(
132+ status=BugTaskStatus.NEW.title))
133+
134+ @property
135+ def open_bugs_info(self):
136+ """Return a dict with open bugs info."""
137+ return dict(
138+ count=self.context.open_bugtasks.count,
139+ url=canonical_url(
140+ self.context, rootsite='bugs', view_name='+bugs'))
141+
142+ @property
143+ def critical_bugs_info(self):
144+ """Return a dict with critical bugs info."""
145+ return dict(
146+ count=self.context.critical_bugtasks.count,
147+ url=get_buglisting_search_filter_url(
148+ status=[status.title for status
149+ in UNRESOLVED_BUGTASK_STATUSES],
150+ importance=BugTaskImportance.CRITICAL.title))
151+
152+ @property
153+ def my_bugs_info(self):
154+ """Return a dict with info on bugs assigned to the user, or None."""
155+ if self.user:
156+ return dict(
157+ count=self.context.searchTasks(
158+ BugTaskSearchParams(
159+ user=self.user, assignee=self.user,
160+ status=any(*UNRESOLVED_BUGTASK_STATUSES),
161+ omit_dupes=True)).count(),
162+ url=get_buglisting_search_filter_url(assignee=self.user.name))
163+ else:
164+ return None
165+
166+ @property
167+ def hot_bugtasks(self):
168+ """Return the 10 most recently updated bugtasks for this target."""
169+ params = BugTaskSearchParams(
170+ orderby="-date_last_updated", omit_dupes=True, user=self.user)
171+ return list(self.context.searchTasks(params)[:10])
172+
173+
174
175 class BugNominationsView(BugTaskSearchListingView):
176 """View for accepting/declining bug nominations."""
177
178=== modified file 'lib/lp/bugs/stories/bugs/xx-distribution-bugs-page.txt'
179--- lib/lp/bugs/stories/bugs/xx-distribution-bugs-page.txt 2009-09-10 20:12:12 +0000
180+++ lib/lp/bugs/stories/bugs/xx-distribution-bugs-page.txt 2009-09-18 16:08:07 +0000
181@@ -11,7 +11,7 @@
182
183 The page has a link to see all open bugs.
184
185- >>> anon_browser.getLink('List all open bugs').click()
186+ >>> anon_browser.getLink('Open bugs').click()
187 >>> anon_browser.url
188 'http://bugs.launchpad.dev/ubuntu/+bugs'
189 >>> find_tag_by_id(anon_browser.contents, 'buglisting') is not None
190@@ -31,9 +31,7 @@
191 fixed in some other context.
192
193 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu')
194- >>> fixed_elsewhere_link = anon_browser.getLink('bugs fixed elsewhere')
195- >>> fixed_elsewhere_link.text
196- '0 bugs fixed elsewhere'
197+ >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere')
198
199 The link takes you to the list of the bugs fixed elsewhere.
200
201@@ -52,9 +50,7 @@
202 It also displays the number of open bugs associated with a CVE.
203
204 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu')
205- >>> cve_bugs_link = anon_browser.getLink('open CVE bugs')
206- >>> cve_bugs_link.text
207- '2 open CVE bugs'
208+ >>> cve_bugs_link = anon_browser.getLink('Open CVE bugs')
209
210 The link takes you to the list of bugs with CVEs linked to them.
211
212@@ -78,9 +74,7 @@
213
214 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu')
215 >>> expirable_bugs_link = anon_browser.getLink(
216- ... 'incomplete bugs can expire')
217- >>> expirable_bugs_link.text
218- '0 incomplete bugs can expire'
219+ ... 'Incomplete bugs')
220
221 The link goes to the expirable bugs page, where the anonymous user can
222 see which bugs will expire if they are not confirmed.
223@@ -93,27 +87,8 @@
224 see any link reporting that bugs can expire.
225
226 >>> anon_browser.open('http://bugs.launchpad.dev/debian')
227- >>> expirable_bugs_link = anon_browser.getLink(
228- ... 'incomplete bugs can expire')
229+ >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
230 Traceback (most recent call last):
231 ...
232 LinkNotFoundError
233
234-
235-== Open Bugs Statistics ==
236-
237-There's also some statistics about the open bugs for the distribution.
238-This is displayed as a chart, which is generated using Javascript, but
239-for those browsers not supporting Javascript, the statistics are
240-displayed as normal text:
241-
242- >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu')
243- >>> stats_div = find_tag_by_id(anon_browser.contents, 'bugs-chart')
244- >>> for li_tag in stats_div.noscript.ul('li'):
245- ... print li_tag.renderContents()
246- 3 New bugs
247- 0 Incomplete bugs
248- 1 Confirmed bugs
249- 0 Triaged bugs
250- 0 In Progress bugs
251- 0 Fix Committed bugs
252
253=== modified file 'lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt'
254--- lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt 2009-09-10 20:12:12 +0000
255+++ lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt 2009-09-18 17:43:21 +0000
256@@ -13,7 +13,7 @@
257
258 The page has a link to see all open bugs.
259
260- >>> anon_browser.getLink('List all open bugs').click()
261+ >>> anon_browser.getLink('Open bugs').click()
262 >>> anon_browser.url
263 'http://bugs.launchpad.dev/ubuntu/warty/+bugs'
264 >>> find_tag_by_id(anon_browser.contents, 'buglisting') is not None
265@@ -33,9 +33,7 @@
266 other context.
267
268 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu/warty')
269- >>> fixed_elsewhere_link = anon_browser.getLink('bugs fixed elsewhere')
270- >>> fixed_elsewhere_link.text
271- '0 bugs fixed elsewhere'
272+ >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere')
273
274 The link takes you to the list of the bugs fixed elsewhere.
275
276@@ -55,10 +53,7 @@
277 can expire when the project has enabled bug expiration.
278
279 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu/warty')
280- >>> expirable_bugs_link = anon_browser.getLink(
281- ... 'incomplete bugs can expire')
282- >>> expirable_bugs_link.text
283- '0 incomplete bugs can expire'
284+ >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
285
286 The link goes to the expirable bugs page, where the anonymous user can
287 see which bugs will expire if they are not confirmed.
288@@ -67,27 +62,3 @@
289 >>> print anon_browser.title
290 +expirable-bugs : Bugs in warty : 4.10 : Ubuntu
291
292-
293-== Bugs Statistics ==
294-
295-There's also some statistics about the open and fixed bugs. This is
296-displayed as a chart, which is generated using Javascript, but for those
297-browsers not supporting Javascript, the statistics are displayed as
298-normal text:
299-
300-As opposed to the normal distribution Bugs page, Fix Released bugs are
301-included here, since it's a good measurement of seeing whether the
302-release is on track.
303-
304- >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu/warty')
305- >>> stats_div = find_tag_by_id(anon_browser.contents, 'bugs-chart')
306- >>> for li_tag in stats_div.noscript.ul('li'):
307- ... print li_tag.renderContents()
308- 1 New bugs
309- 0 Incomplete bugs
310- 0 Confirmed bugs
311- 0 Triaged bugs
312- 0 In Progress bugs
313- 0 Fix Committed bugs
314- 0 Fix Released bugs
315-
316
317=== modified file 'lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt'
318--- lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt 2009-09-10 20:12:12 +0000
319+++ lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt 2009-09-18 17:43:21 +0000
320@@ -144,10 +144,7 @@
321 >>> user_browser.title
322 'Bugs in Jokosher Audio Editor'
323
324- >>> expirable_bugs_link = user_browser.getLink(
325- ... 'incomplete bugs can expire')
326- >>> expirable_bugs_link.text
327- '2 incomplete bugs can expire'
328+ >>> expirable_bugs_link = user_browser.getLink('Incomplete bugs')
329
330 The link is to the expirable bugs page. No Privileges Person can see
331 the bug he set to Incomplete previously.
332@@ -190,7 +187,7 @@
333 >>> user_browser.getControl(name='field.comment').value = "bump"
334 >>> user_browser.getControl('Post Comment').click()
335 >>> user_browser.getLink('Bugs').click()
336- >>> user_browser.getLink('incomplete bugs can expire').click()
337+ >>> user_browser.getLink('Incomplete bugs').click()
338 >>> contents = find_main_content(user_browser.contents)
339 >>> buglisting = contents.find('table', id='buglisting')
340 >>> print extract_text(buglisting.thead)
341@@ -212,11 +209,7 @@
342 None
343
344 >>> user_browser.getLink('Bugs').click()
345- >>> expirable_bugs_link = user_browser.getLink(
346- ... 'incomplete bug can expire')
347- >>> expirable_bugs_link.text
348- '1 incomplete bug can expire'
349-
350+ >>> expirable_bugs_link = user_browser.getLink('Incomplete bugs')
351 >>> expirable_bugs_link.click()
352 >>> contents = find_main_content(user_browser.contents)
353 >>> buglisting = contents.find('table', id='buglisting')
354
355=== modified file 'lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt'
356--- lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2009-09-15 09:49:49 +0000
357+++ lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2009-09-18 17:43:21 +0000
358@@ -16,7 +16,7 @@
359
360 The page has a link to see all open bugs.
361
362- >>> anon_browser.getLink('List all open bugs').click()
363+ >>> anon_browser.getLink('Open bugs').click()
364 >>> anon_browser.url
365 'http://bugs.launchpad.dev/firefox/+bugs'
366 >>> find_tag_by_id(anon_browser.contents, 'buglisting') is not None
367@@ -34,14 +34,10 @@
368 It also displays the number of open bugs associated with a CVE.
369
370 >>> anon_browser.open('http://bugs.launchpad.dev/evolution')
371- >>> cve_bugs_link = anon_browser.getLink('open CVE bugs')
372- >>> cve_bugs_link.text
373- '0 open CVE bugs'
374+ >>> cve_bugs_link = anon_browser.getLink('Open CVE bugs')
375
376 >>> anon_browser.open('http://bugs.launchpad.dev/firefox')
377- >>> cve_bugs_link = anon_browser.getLink('open CVE bug')
378- >>> cve_bugs_link.text
379- '1 open CVE bug'
380+ >>> cve_bugs_link = anon_browser.getLink('Open CVE bugs')
381
382 The link takes you to the list of bugs with CVEs linked to them.
383
384@@ -78,9 +74,7 @@
385 Mozilla Firefox that are fixed in some other context:
386
387 >>> anon_browser.goBack(1)
388- >>> fixed_elsewhere_link = anon_browser.getLink('bugs fixed elsewhere')
389- >>> fixed_elsewhere_link.text
390- '0 bugs fixed elsewhere'
391+ >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere')
392
393 The link takes you to the list of the bugs fixed elsewhere:
394
395@@ -98,9 +92,7 @@
396 are fixed in some other context:
397
398 >>> anon_browser.open('http://bugs.launchpad.dev/thunderbird')
399- >>> fixed_elsewhere_link = anon_browser.getLink('bugs fixed elsewhere')
400- >>> fixed_elsewhere_link.text
401- '0 bugs fixed elsewhere'
402+ >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere')
403
404 Again, the link takes you to the list of the bugs fixed elsewhere.:
405
406@@ -121,10 +113,7 @@
407 is such a project.
408
409 >>> anon_browser.open('http://bugs.launchpad.dev/jokosher')
410- >>> expirable_bugs_link = anon_browser.getLink(
411- ... 'incomplete bugs can expire')
412- >>> expirable_bugs_link.text
413- '0 incomplete bugs can expire'
414+ >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
415
416 The link goes to the expirable bugs page, where the anonymous user can
417 see which bugs will expire if they are not confirmed.
418@@ -137,11 +126,7 @@
419 series has the link because Jokosher has enabled bug expiration.
420
421 >>> anon_browser.open('http://bugs.launchpad.dev/jokosher/trunk')
422- >>> expirable_bugs_link = anon_browser.getLink(
423- ... 'incomplete bugs can expire')
424- >>> expirable_bugs_link.text
425- '0 incomplete bugs can expire'
426-
427+ >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
428 >>> expirable_bugs_link.click()
429 >>> print anon_browser.title
430 +expirable-bugs : Bugs in trunk : Series trunk : Jokosher
431@@ -150,31 +135,12 @@
432 cannot see any link reporting that bugs can expire.
433
434 >>> anon_browser.open('http://bugs.launchpad.dev/thunderbird')
435- >>> expirable_bugs_link = anon_browser.getLink(
436- ... 'incomplete bugs can expire')
437+ >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
438 Traceback (most recent call last):
439 ...
440 LinkNotFoundError
441
442
443-== Open Bugs Statistics ==
444-
445-There's also some statistics about the open bugs. This is displayed as
446-a chart, which is generated using Javascript, but for those browsers not
447-supporting Javascript, the statistics are displayed as normal text:
448-
449- >>> anon_browser.open('http://bugs.launchpad.dev/firefox')
450- >>> stats_div = find_tag_by_id(anon_browser.contents, 'bugs-chart')
451- >>> for li_tag in stats_div.noscript.ul('li'):
452- ... print li_tag.renderContents()
453- 3 New bugs
454- 0 Incomplete bugs
455- 0 Confirmed bugs
456- 0 Triaged bugs
457- 0 In Progress bugs
458- 0 Fix Committed bugs
459-
460-
461 == Tags and Filters ==
462
463 There's also portlets for easy searching by tags and filters. Its content is
464@@ -182,11 +148,9 @@
465
466 >>> tags_portlet = find_tag_by_id(anon_browser.contents, 'portlet-tags')
467 >>> anon_browser.getLink(id='tags-content-link').click()
468- >>> for tag_link in find_tags_by_class(
469- ... anon_browser.contents, 'section')[0]('a'):
470- ... print tag_link.renderContents()
471- doc
472- layout-test
473+ >>> print extract_text(anon_browser.contents)
474+ Tags
475+ doc layout-test
476
477 They are there to provide easy navigation for bugs with a certain
478 tag...
479
480=== modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt'
481--- lib/lp/bugs/templates/bugtarget-bugs.pt 2009-07-18 00:05:49 +0000
482+++ lib/lp/bugs/templates/bugtarget-bugs.pt 2009-09-18 17:43:21 +0000
483@@ -6,7 +6,7 @@
484 xml:lang="en"
485 lang="en"
486 dir="ltr"
487- metal:use-macro="view/macro:page/default2.0"
488+ metal:use-macro="view/macro:page/main_side"
489 i18n:domain="malone"
490 >
491 <metal:block fill-slot="head_epilogue">
492@@ -14,18 +14,140 @@
493 <script type="text/javascript" src="/+icing/PlotKit_Packed.js"></script>
494 </metal:block>
495 <metal:portlets fill-slot="portlets">
496- <tal:block content="structure context/@@+portlet-bugfilters" />
497- <tal:block content="structure context/@@+portlet-bugtags" />
498- <tal:releasecriticalbugs
499- tal:condition="view/shouldShowReleaseCriticalPortlet"
500- tal:content="structure context/@@+portlet-bugtasklist-seriesbugs" />
501 </metal:portlets>
502 <body>
503+ <tal:side metal:fill-slot="side">
504+ <div id="involvement" class="portlet involvement">
505+ <ul>
506+ <li style="border: none">
507+ <a href="+filebug" class="menu-link-filebug sprite bugs">
508+ Report a bug
509+ </a>
510+ </li>
511+ <li>
512+ <a href="+filebug" class="menu-link-filebug sprite answers">
513+ Ask a question
514+ </a>
515+ </li>
516+ </ul>
517+ </div>
518+ <div class="portlet">
519+ <table class="bug-links">
520+ <tr tal:define="open_bugs_info view/open_bugs_info">
521+ <td class="bugs-count" tal:content="open_bugs_info/count" />
522+ <td class="bugs-link">
523+ <a tal:attributes="href open_bugs_info/url">Open bugs</a>
524+ </td>
525+ </tr>
526+ <tr tal:condition="view/user"
527+ tal:define="my_bugs_info view/my_bugs_info">
528+ <td class="bugs-count" tal:content="my_bugs_info/count" />
529+ <td class="bugs-link">
530+ <a tal:attributes="href my_bugs_info/url">Bugs assigned to me</a>
531+ </td>
532+ </tr>
533+ <tr tal:define="critical_bugs_info view/critical_bugs_info">
534+ <td class="bugs-count" tal:content="critical_bugs_info/count" />
535+ <td class="bugs-link">
536+ <a tal:attributes="href critical_bugs_info/url">Critical bugs</a>
537+ </td>
538+ </tr>
539+ <tr tal:define="fixed_elsewhere view/bugs_fixed_elsewhere_info">
540+ <td class="bugs-count" tal:content="fixed_elsewhere/count" />
541+ <td class="bugs-link">
542+ <a tal:attributes="href fixed_elsewhere/url">
543+ Bugs fixed elsewhere
544+ </a>
545+ </td>
546+ </tr>
547+ <tr tal:define="new_bugs_info view/new_bugs_info">
548+ <td class="bugs-count" tal:content="new_bugs_info/count" />
549+ <td class="bugs-link">
550+ <a tal:attributes="href new_bugs_info/url">New bugs</a>
551+ </td>
552+ </tr>
553+ <tr tal:define="cve_bugs_info view/open_cve_bugs_info">
554+ <td class="bugs-count" tal:content="cve_bugs_info/count" />
555+ <td class="bugs-link">
556+ <a tal:attributes="href cve_bugs_info/url">Open CVE bugs</a>
557+ -
558+ <a href="+cve">CVE reports</a>
559+ </td>
560+ </tr>
561+ <tr tal:define="expirable_bugs_info view/expirable_bugs_info"
562+ tal:condition="expirable_bugs_info">
563+ <td class="bugs-count" tal:content="expirable_bugs_info/count" />
564+ <td class="bugs-link">
565+ <a tal:attributes="href expirable_bugs_info/url">
566+ Incomplete bugs
567+ </a>
568+ (can expire)
569+ </td>
570+ </tr>
571+ <tr tal:define="subscribe_link context/menu:bugs/subscribe">
572+ <td class="bugs-count" style="padding-top: 1em">
573+ <a tal:attributes="href subscribe_link/url">
574+ <img tal:attributes="src subscribe_link/icon_url" />
575+ </a>
576+ </td>
577+ <td class="bugs-link">
578+ <a tal:attributes="href subscribe_link/url"
579+ tal:content="subscribe_link/escapedtext" />
580+ </td>
581+ </tr>
582+ </table>
583+ </div>
584+ <div tal:replace="structure context/@@+portlet-bugtags" />
585+ <tal:releasecriticalbugs
586+ tal:condition="view/shouldShowReleaseCriticalPortlet"
587+ tal:content="structure context/@@+portlet-bugtasklist-seriesbugs" />
588+ </tal:side>
589 <div metal:fill-slot="main" class="tab-bugs"
590 tal:define="search_url string:+bugs;
591 advanced_search_url string:+bugs?advanced=1">
592- <h1>Bugs in <tal:context replace="context/title">Ubuntu</tal:context></h1>
593- <div style="text-align: center; clear: both;">
594+
595+ <div class="portlet" style="float: right; border: none">
596+ <ul>
597+ <li>
598+ <strong>Bug tracker:</strong>
599+ <tal:bugtracker replace="structure view/bugtracker" />
600+ </li>
601+ <li tal:define="bug_supervisor context/bug_supervisor">
602+ Bug supervisor:
603+ <tal:none condition="not:bug_supervisor">None set</tal:none>
604+ <a tal:condition="bug_supervisor"
605+ tal:replace="structure bug_supervisor/fmt:link">Bob Johnson</a>
606+ <tal:edit-bug-supervisor
607+ condition="context/menu:bugs/bugsupervisor|nothing">
608+ <a tal:define="link context/menu:bugs/bugsupervisor"
609+ tal:condition="link/enabled"
610+ tal:attributes="href link/url; title link/text">
611+ <img tal:attributes="alt link/text" src="/@@/edit" />
612+ </a>
613+ </tal:edit-bug-supervisor>
614+ </li>
615+ <li tal:define="securitycontact context/security_contact">
616+ Security contact:
617+ <tal:none condition="not:securitycontact">None set</tal:none>
618+ <a tal:condition="securitycontact"
619+ tal:replace="structure securitycontact/fmt:link">
620+ Billy Anderson
621+ </a>
622+ <tal:edit-securitycontact
623+ condition="context/menu:bugs/securitycontact|nothing">
624+ <a tal:define="link context/menu:bugs/securitycontact"
625+ tal:condition="link/enabled"
626+ tal:attributes="href link/url; title link/text">
627+ <img tal:attributes="alt link/text" src="/@@/edit" />
628+ </a>
629+ </tal:edit-securitycontact>
630+ </li>
631+ <li>
632+ </li>
633+ </ul>
634+ </div>
635+
636+ <div class="search-box">
637 <metal:search
638 use-macro="context/@@+bugtarget-macros-search/simple-search-form"
639 />
640@@ -34,165 +156,39 @@
641 $('field.searchtext').focus();
642 --></script>
643
644- <div class="columns">
645- <script type="text/javascript"
646- tal:content="structure view/getChartJavascript">
647- </script>
648- <div class="two column left">
649- <div id="bugs-chart" height="200" width="200">
650- <noscript>
651- <ul>
652- <li tal:repeat="bug_count view/bug_count_items"
653- tal:content="string:${bug_count/count} ${bug_count/label} bugs">
654- 12 Unconfirmed bugs
655- </li>
656- </ul>
657- </noscript>
658- </div>
659- </div>
660- <div class="two column right">
661- <h2>Key contacts</h2>
662- <table class="summary" style="width: 100%;">
663- <tbody>
664- <tr>
665- <th>Driver:</th>
666- <td colspan="2">
667- <tal:none condition="not:context/driver">None set</tal:none>
668- <a
669- tal:condition="context/driver"
670- tal:replace="structure context/driver/fmt:link"
671- >John Smith</a>
672- </td>
673- </tr>
674- <tr tal:define="bug_supervisor context/bug_supervisor">
675- <th>Bug supervisor:</th>
676- <td>
677- <tal:none condition="not:bug_supervisor"
678- >None set</tal:none>
679- <a
680- tal:condition="bug_supervisor"
681- tal:replace="structure bug_supervisor/fmt:link"
682- >Bob Johnson</a>
683- </td>
684- <td>
685- <tal:edit-bug-supervisor
686- condition="context/menu:bugs/bugsupervisor|nothing">
687- <a tal:define="link context/menu:bugs/bugsupervisor"
688- tal:condition="link/enabled"
689- tal:attributes="href link/url; title link/text">
690- <img tal:attributes="alt link/text" src="/@@/edit" />
691- </a>
692- </tal:edit-bug-supervisor>
693- </td>
694- </tr>
695- <tr tal:define="securitycontact context/security_contact">
696- <th>Security contact:</th>
697- <td>
698- <tal:none condition="not:securitycontact"
699- >None set</tal:none>
700- <a
701- tal:condition="securitycontact"
702- tal:replace="structure securitycontact/fmt:link"
703- >Billy Anderson</a>
704- </td>
705- <td>
706- <tal:edit-securitycontact
707- condition="context/menu:bugs/securitycontact|nothing">
708- <a tal:define="link context/menu:bugs/securitycontact"
709- tal:condition="link/enabled"
710- tal:attributes="href link/url; title link/text">
711- <img tal:attributes="alt link/text" src="/@@/edit" />
712- </a>
713- </tal:edit-securitycontact>
714- </td>
715- </tr>
716- </tbody>
717- </table>
718- <ul class="cross-reference">
719- <li id="bugtracker">
720- <strong>Bug tracker:</strong>
721- <tal:bugtracker replace="structure view/bugtracker" />
722- </li>
723- <li tal:define="fixed_elsewhere view/bugs_fixed_elsewhere_info">
724- <a tal:attributes="href fixed_elsewhere/url">
725- <strong tal:content="fixed_elsewhere/count">42</strong>
726- <tal:label
727- tal:replace="fixed_elsewhere/label">bugs</tal:label>
728- fixed elsewhere
729- </a>
730- </li>
731- <li tal:define="cve_bugs view/open_cve_bugs_info">
732- <a tal:attributes="href cve_bugs/url">
733- <strong tal:content="cve_bugs/count"></strong>
734- open CVE
735- <tal:label tal:replace="cve_bugs/label">bugs</tal:label>
736- </a>
737- <tal:cve-reports
738- condition="context/menu:bugs/cve|nothing">
739- -<a tal:define="link context/menu:bugs/cve"
740- tal:replace="structure link/render"
741- tal:condition="link/enabled">
742- CVE reports
743- </a>
744- </tal:cve-reports>
745- </li>
746- <li tal:define="pending_bugwatches view/pending_bugwatches_info"
747- tal:condition="pending_bugwatches">
748- <a tal:attributes="href pending_bugwatches/url">
749- <strong tal:content="pending_bugwatches/count"></strong>
750- <tal:label
751- tal:replace="pending_bugwatches/label">bugs</tal:label>
752- <tal:need-or-needs
753- define="count pending_bugwatches/count"
754- content="python:(count == 1) and 'needs' or 'need'" />
755- forwarding upstream
756- </a>
757- </li>
758- <li tal:define="expirable_bugs view/expirable_bugs_info"
759- tal:condition="expirable_bugs">
760- <a tal:attributes="href expirable_bugs/url">
761- <strong tal:content="expirable_bugs/count"></strong>
762- incomplete
763- <tal:label
764- tal:replace="expirable_bugs/label">bugs</tal:label>
765- can expire
766- </a>
767- </li>
768- <tal:review-nominations
769- condition="context/menu:bugs/nominations|nothing">
770- <li tal:define="link context/menu:bugs/nominations">
771- <a tal:attributes="href link/url"
772- tal:content="link/text" />
773- </li>
774- </tal:review-nominations>
775- <li style="font-weight: bold;">
776- <a href="+bugs">List all open bugs</a>
777- </li>
778- <li>
779- <tal:subscribe define="link context/menu:bugs/subscribe"
780- replace="structure link/render" />
781- </li>
782- </ul>
783- <ul class="rollover buttons">
784- <li>
785- <a href="+filebug">
786- <img
787- alt="Report a bug"
788- src="/+icing/but-sml-reportabug.gif"
789- />
790- </a>
791- </li>
792- <li tal:content="structure context/@@+ask-a-question-button" />
793- </ul>
794- </div><!-- two column right -->
795- </div><!-- columns -->
796- <div class="clear"></div>
797- <div class="left">
798- <tal:reported replace="structure context/@@+portlet-latestbugs" />
799- </div>
800- <div class="right">
801- <tal:touched replace="structure context/@@+portlet-recently-touched-bugs" />
802- </div>
803+ <h2 style="margin-top: 1em">Hot bugs</h2>
804+
805+ <table class="listing" id="hot-bugs">
806+ <thead>
807+ <tr>
808+ <th colspan="3">Summary</th>
809+ <th>Status</th>
810+ <th>Importance</th>
811+ <th>Last changed</th>
812+ </tr>
813+ </thead>
814+ <tbody>
815+ <tr tal:repeat="bugtask view/hot_bugtasks">
816+ <td class="icon left">
817+ <img alt="" src="/@@/bug" />
818+ </td>
819+ <td style="text-align: right">
820+ #<span tal:replace="bugtask/id" />
821+ </td>
822+ <td>
823+ <a tal:attributes="href bugtask/fmt:url"
824+ tal:content="bugtask/title" />
825+ </td>
826+ <td tal:attributes="class string:status${bugtask/status/name}"
827+ tal:content="bugtask/status/title" />
828+ <td tal:attributes="
829+ class string:importance${bugtask/importance/name}"
830+ tal:content="bugtask/importance/title" />
831+ <td tal:content="bugtask/bug/date_last_updated/fmt:displaydate" />
832+ </tr>
833+ </tbody>
834+ </table>
835+
836 </div><!-- main -->
837 </body>
838 </html>
839
840=== modified file 'lib/lp/bugs/templates/bugtarget-macros-search.pt'
841--- lib/lp/bugs/templates/bugtarget-macros-search.pt 2009-09-13 20:19:53 +0000
842+++ lib/lp/bugs/templates/bugtarget-macros-search.pt 2009-09-18 14:43:52 +0000
843@@ -73,6 +73,7 @@
844 <tal:widget replace="structure view/widgets/has_patch/hidden" />
845 <tal:widget replace="structure view/widgets/component/hidden" />
846 <tal:widget replace="structure view/widgets/has_no_package/hidden" />
847+ <br /><br />
848 <a tal:attributes="href advanced_search_url|string:?advanced=1"
849 >Advanced search</a>
850 <div metal:define-slot="extra-search-widgets">
851
852=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-tags-content.pt'
853--- lib/lp/bugs/templates/bugtarget-portlet-tags-content.pt 2009-09-13 20:39:15 +0000
854+++ lib/lp/bugs/templates/bugtarget-portlet-tags-content.pt 2009-09-18 14:43:52 +0000
855@@ -1,36 +1,15 @@
856 <div xmlns:tal="http://xml.zope.org/namespaces/tal"
857 xmlns:metal="http://xml.zope.org/namespaces/metal"
858 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
859- tal:define="official_tags view/official_tags;
860- other_tags view/other_tags"
861- tal:condition="python: official_tags or other_tags">
862- <div class="section" tal:condition="official_tags">
863- <h2>Official tags</h2>
864- <table width="100%">
865- <tr tal:repeat="bug_tag_info official_tags">
866- <td width="100%">
867- <a tal:content="bug_tag_info/tag"
868- tal:attributes=" href bug_tag_info/url">
869- crash
870- </a>
871- </td>
872- <td tal:content="bug_tag_info/count">20</td>
873- </tr>
874- </table>
875- </div>
876- <div class="section" tal:condition="other_tags">
877- <h2 tal:condition="official_tags">Other tags</h2>
878- <h2 tal:condition="not: official_tags">Tags</h2>
879- <table width="100%">
880- <tr tal:repeat="bug_tag_info other_tags">
881- <td width="100%">
882- <a tal:content="bug_tag_info/tag"
883- tal:attributes=" href bug_tag_info/url">
884- crash
885- </a>
886- </td>
887- <td tal:content="bug_tag_info/count">20</td>
888- </tr>
889- </table>
890+ class="portletBody">
891+ <div class="section">
892+ <h2>Tags</h2>
893+ <div style="text-align: justify">
894+ <a tal:repeat="tag_info view/tags_cloud_data"
895+ tal:content="tag_info/tag"
896+ tal:attributes="href tag_info/url;
897+ style string:font-size: ${tag_info/factor}em" />
898+ </div>
899 </div>
900 </div>
901+