Merge lp:~barry/launchpad/416703-sprints into lp:launchpad

Proposed by Barry Warsaw
Status: Merged
Merged at revision: not available
Proposed branch: lp:~barry/launchpad/416703-sprints
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~barry/launchpad/416703-sprints
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+10551@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :
Download full text (7.9 KiB)

= Summary =

Bug 416703 describes the conversion of the top level /sprints page to UI 3.0.
This was a fairly mechanical change given that this is the fifth such related
branch I've done.

NOTE: This branch is dependent on one that has not yet landed. Please use the
attached diff if the generated one does not take the branch dependencies into
account.

== Proposed fix ==

Fiddle with templates, etc.

== Pre-implementation notes ==

Not much, except that after a discussion on irc, it was decided to restore the
'info' icons and the 'View...' prefix in the navmenu, for consistency with the
rest of the ui.

== Implementation details ==

Not much extra.

== Tests ==

Will run through ec2 before landing.

== Demo and Q/A ==

* Visit http://launchpad.dev/sprints

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/browser/configure.zcml
  lib/lp/blueprints/templates/sprints-index.pt
  lib/lp/registry/browser/menu.py
  lib/canonical/launchpad/pagetitles.py
  lib/lp/registry/browser/product.py
  lib/lp/blueprints/browser/sprint.py
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/blueprints/browser/configure.zcml
  lib/lp/registry/templates/projects-index.pt
  lib/lp/registry/templates/distros-index.pt
  lib/lp/registry/templates/products-index.pt
  lib/lp/registry/browser/distribution.py
  lib/lp/registry/browser/project.py

== diff ==

=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-08-21 15:19:02 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-08-21 20:04:25 +0000
@@ -1284,8 +1284,6 @@

 sprints_all = 'All sprints and meetings registered in Launchpad'

-sprints_index = 'Meetings and sprints registered in Launchpad'
-
 sprintspecification_decide = 'Consider spec for sprint agenda'

 sprintspecification_admin = 'Approve blueprint for sprint agenda'

=== modified file 'lib/lp/blueprints/browser/configure.zcml'
--- lib/lp/blueprints/browser/configure.zcml 2009-08-03 14:38:55 +0000
+++ lib/lp/blueprints/browser/configure.zcml 2009-08-21 20:04:25 +0000
@@ -147,9 +147,6 @@
         <browser:page
             name="+all"
             template="../templates/sprints-all.pt"/>
- <browser:page
- name="+portlet-details"
- template="../templates/sprints-portlet-details.pt"/>
     </browser:pages>
     <browser:page
         name="+new"

=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py 2009-06-25 00:00:26 +0000
+++ lib/lp/blueprints/browser/sprint.py 2009-08-21 20:04:25 +0000
@@ -28,8 +28,9 @@
 import pytz
 from StringIO import StringIO

+from zope.app.form.browser import TextAreaWidget
 from zope.component import getUtility
-from zope.app.form.browser import TextAreaWidget
+from zope.interface import implements

 from canonical.launchpad import _
 from canonical.cachedproperty import cachedproperty
@@ -40,6 +41,8 @@
     SpecificationDefinitionStatus, SpecificationFilter, SpecificationPriority,
     SpecificationSort)
 from lp.blueprints.interfaces.sprint import ISprint, ISprintS...

Read more...

Revision history for this message
Curtis Hovey (sinzui) wrote :

We discusses the new style added and concluded that .summary and .application-summary are used for different purposes. .summary is for user-entered content link the summary of a project. .application-summary is for information that introduces a part of the application, which might be list pages.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-08-20 14:01:26 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-08-20 21:13:30 +0000
@@ -442,6 +442,15 @@
442 color: #000;442 color: #000;
443 font-weight: normal;443 font-weight: normal;
444 }444 }
445.application-summary {
446 font-size: 123.1%;
447}
448.search-results {
449 margin-top: 1em;
450}
451p.search-results {
452 font-size: 116%;
453}
445454
446455
447/* Exceptions they may be common. */456/* Exceptions they may be common. */
448457
=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-08-21 09:39:13 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-08-21 20:04:25 +0000
@@ -508,8 +508,6 @@
508508
509distroseriessourcepackagerelease_index = ContextTitle('%s')509distroseriessourcepackagerelease_index = ContextTitle('%s')
510510
511distros_index = 'Distributions registered in Launchpad'
512
513edit_bug_supervisor = ContextTitle('Edit bug supervisor for %s')511edit_bug_supervisor = ContextTitle('Edit bug supervisor for %s')
514512
515errorservice_config = 'Configure error log'513errorservice_config = 'Configure error log'
@@ -1065,8 +1063,6 @@
10651063
1066project_translators = ContextTitle('Set translation group for %s')1064project_translators = ContextTitle('Set translation group for %s')
10671065
1068projects_index = 'Project groups registered in Launchpad'
1069
1070projects_request = 'Launchpad Translations: Request a project group'1066projects_request = 'Launchpad Translations: Request a project group'
10711067
1072projects_search = 'Search for project groups in Launchpad'1068projects_search = 'Search for project groups in Launchpad'
@@ -1288,8 +1284,6 @@
12881284
1289sprints_all = 'All sprints and meetings registered in Launchpad'1285sprints_all = 'All sprints and meetings registered in Launchpad'
12901286
1291sprints_index = 'Meetings and sprints registered in Launchpad'
1292
1293sprintspecification_decide = 'Consider spec for sprint agenda'1287sprintspecification_decide = 'Consider spec for sprint agenda'
12941288
1295sprintspecification_admin = 'Approve blueprint for sprint agenda'1289sprintspecification_admin = 'Approve blueprint for sprint agenda'
12961290
=== modified file 'lib/lp/blueprints/browser/configure.zcml'
--- lib/lp/blueprints/browser/configure.zcml 2009-08-03 14:38:55 +0000
+++ lib/lp/blueprints/browser/configure.zcml 2009-08-21 20:04:25 +0000
@@ -147,9 +147,6 @@
147 <browser:page147 <browser:page
148 name="+all"148 name="+all"
149 template="../templates/sprints-all.pt"/>149 template="../templates/sprints-all.pt"/>
150 <browser:page
151 name="+portlet-details"
152 template="../templates/sprints-portlet-details.pt"/>
153 </browser:pages>150 </browser:pages>
154 <browser:page151 <browser:page
155 name="+new"152 name="+new"
156153
=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py 2009-06-25 00:00:26 +0000
+++ lib/lp/blueprints/browser/sprint.py 2009-08-21 20:04:25 +0000
@@ -28,8 +28,9 @@
28import pytz28import pytz
29from StringIO import StringIO29from StringIO import StringIO
3030
31from zope.app.form.browser import TextAreaWidget
31from zope.component import getUtility32from zope.component import getUtility
32from zope.app.form.browser import TextAreaWidget33from zope.interface import implements
3334
34from canonical.launchpad import _35from canonical.launchpad import _
35from canonical.cachedproperty import cachedproperty36from canonical.cachedproperty import cachedproperty
@@ -40,6 +41,8 @@
40 SpecificationDefinitionStatus, SpecificationFilter, SpecificationPriority,41 SpecificationDefinitionStatus, SpecificationFilter, SpecificationPriority,
41 SpecificationSort)42 SpecificationSort)
42from lp.blueprints.interfaces.sprint import ISprint, ISprintSet43from lp.blueprints.interfaces.sprint import ISprint, ISprintSet
44from lp.registry.browser.menu import (
45 IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)
43from canonical.launchpad.webapp import (46from canonical.launchpad.webapp import (
44 ApplicationMenu, ContextMenu, GetitemNavigation, LaunchpadEditFormView,47 ApplicationMenu, ContextMenu, GetitemNavigation, LaunchpadEditFormView,
45 LaunchpadFormView, LaunchpadView, Link, Navigation,48 LaunchpadFormView, LaunchpadView, Link, Navigation,
@@ -488,7 +491,22 @@
488 return body.encode('utf-8')491 return body.encode('utf-8')
489492
490493
494class SprintSetNavigationMenu(RegistryCollectionActionMenuBase):
495 """Action menu for sprints index."""
496 usedfor = ISprintSet
497 links = [
498 'register_team',
499 'register_project',
500 'create_account',
501 ]
502
503
491class SprintSetView(LaunchpadView):504class SprintSetView(LaunchpadView):
505 """View for the /sprints top level collection page."""
506
507 implements(IRegistryCollectionNavigationMenu)
508
509 page_title = 'Meetings and sprints registered in Launchpad'
492510
493 def all_batched(self):511 def all_batched(self):
494 return BatchNavigator(self.context.all, self.request)512 return BatchNavigator(self.context.all, self.request)
495513
=== modified file 'lib/lp/blueprints/templates/sprints-index.pt'
--- lib/lp/blueprints/templates/sprints-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprints-index.pt 2009-08-21 20:07:57 +0000
@@ -6,34 +6,37 @@
6 xml:lang="en"6 xml:lang="en"
7 lang="en"7 lang="en"
8 dir="ltr"8 dir="ltr"
9 metal:use-macro="view/macro:page/pillarindex"9 metal:use-macro="view/macro:page/main_side"
10 i18n:domain="launchpad">10 i18n:domain="launchpad">
11
11 <body>12 <body>
12 <h1 metal:fill-slot="heading">Coming events</h1>13 <h1 metal:fill-slot="heading">Coming events</h1>
1314
14<metal:rightportlets fill-slot="portlets_two">15 <tal:side metal:fill-slot="side">
15 <div tal:replace="structure context/@@+portlet-details" />16 <tal:menu replace="structure view/@@+global-actions" />
16</metal:rightportlets>17 <tal:menu replace="structure context/@@+related-pages" />
1718 </tal:side>
18<div metal:fill-slot="main">19
1920 <div metal:fill-slot="main">
20 <p id="application-summary">21
21 Launchpad can help you organise your developer sprints, summits and22 <table class="listing">
22 gatherings. Register the meeting here, then you can invite people to23 <tbody>
23 nominate blueprints for discussion at the event. The meeting drivers24 <tal:sprint
24 control the agenda, but everyone can see what's proposed and what's25 repeat="sprint context"
25 been accepted.26 replace="structure sprint/@@+listing-detailed"
26 </p>27 />
2728 </tbody>
28 <table>29 </table>
29 <tbody>30
30 <tal:sprint31 <p/>
31 repeat="sprint context"32 <p id="application-summary">
32 replace="structure sprint/@@+listing-detailed"33 Launchpad can help you organise your developer sprints, summits and
33 />34 gatherings. Register the meeting here, then you can invite people to
34 </tbody>35 nominate blueprints for discussion at the event. The meeting drivers
35 </table>36 control the agenda, but everyone can see what's proposed and what's
3637 been accepted.
37</div>38 </p>
38</body>39
40 </div>
41 </body>
39</html>42</html>
4043
=== removed file 'lib/lp/blueprints/templates/sprints-portlet-details.pt'
--- lib/lp/blueprints/templates/sprints-portlet-details.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprints-portlet-details.pt 1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
1<tal:root
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">
6
7<div class="portlet" id="portlet-details">
8
9 <h2>About these meetings</h2>
10
11 <div class="portletBody portletContent">
12
13 <img src="/@@/info" />
14 You can register a meeting, and
15 then easily manage the agenda of the meeting. Anybody can propose a
16 blueprint for discussion at the meeting, but only the meeting
17 organisers (the "drivers") can approve a topic on the meeting agenda.
18
19 </div>
20
21</div>
22</tal:root>
230
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2009-08-20 14:01:26 +0000
+++ lib/lp/registry/browser/configure.zcml 2009-08-21 15:19:02 +0000
@@ -424,7 +424,7 @@
424 <browser:pages424 <browser:pages
425 for="lp.registry.interfaces.project.IProjectSet"425 for="lp.registry.interfaces.project.IProjectSet"
426 facet="overview"426 facet="overview"
427 permission="launchpad.ProjectReview"427 permission="zope.Public"
428 class="lp.registry.browser.project.ProjectSetView">428 class="lp.registry.browser.project.ProjectSetView">
429 <browser:page429 <browser:page
430 name="+all"430 name="+all"
@@ -456,16 +456,18 @@
456 template="../templates/project-series-portlet-details.pt"/>456 template="../templates/project-series-portlet-details.pt"/>
457 <browser:menus457 <browser:menus
458 classes="458 classes="
459 ProjectFacets
460 ProjectActionMenu459 ProjectActionMenu
460 ProjectAnswersMenu
461 ProjectBountiesMenu
462 ProjectBugsMenu
461 ProjectEditNavigationMenu463 ProjectEditNavigationMenu
464 ProjectFacets
462 ProjectOverviewMenu465 ProjectOverviewMenu
463 ProjectBountiesMenu
464 ProjectBugsMenu
465 ProjectSeriesSpecificationsMenu466 ProjectSeriesSpecificationsMenu
467 ProjectSetContextMenu
468 ProjectSetNavigationMenu
466 ProjectSpecificationsMenu469 ProjectSpecificationsMenu
467 ProjectSetContextMenu470 "
468 ProjectAnswersMenu"
469 module="lp.registry.browser.project"/>471 module="lp.registry.browser.project"/>
470 <browser:defaultView472 <browser:defaultView
471 for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"473 for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
@@ -2010,15 +2012,17 @@
2010 template="../../app/templates/generic-edit.pt"/>2012 template="../../app/templates/generic-edit.pt"/>
2011 <browser:menus2013 <browser:menus
2012 classes="2014 classes="
2015 DistributionBountiesMenu
2016 DistributionBugsMenu
2013 DistributionFacets2017 DistributionFacets
2018 DistributionMirrorsNavigationMenu
2019 DistributionNavigationMenu
2014 DistributionOverviewMenu2020 DistributionOverviewMenu
2015 DistributionBugsMenu2021 DistributionSetActionNavigationMenu
2016 DistributionBountiesMenu2022 DistributionSetContextMenu
2023 DistributionSetFacets
2017 DistributionSpecificationsMenu2024 DistributionSpecificationsMenu
2018 DistributionSetFacets2025 "
2019 DistributionSetContextMenu
2020 DistributionNavigationMenu
2021 DistributionMirrorsNavigationMenu"
2022 module="lp.registry.browser.distribution"/>2026 module="lp.registry.browser.distribution"/>
2023 <browser:defaultView2027 <browser:defaultView
2024 for="lp.registry.interfaces.sourcepackage.ISourcePackage"2028 for="lp.registry.interfaces.sourcepackage.ISourcePackage"
20252029
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2009-08-20 11:15:55 +0000
+++ lib/lp/registry/browser/distribution.py 2009-08-20 22:59:38 +0000
@@ -20,11 +20,12 @@
20 'DistributionFacets',20 'DistributionFacets',
21 'DistributionLanguagePackAdminView',21 'DistributionLanguagePackAdminView',
22 'DistributionNavigation',22 'DistributionNavigation',
23 'DistributionPPASearchView',
23 'DistributionPackageSearchView',24 'DistributionPackageSearchView',
24 'DistributionPendingReviewMirrorsView',25 'DistributionPendingReviewMirrorsView',
25 'DistributionPPASearchView',
26 'DistributionSeriesMirrorsRSSView',26 'DistributionSeriesMirrorsRSSView',
27 'DistributionSeriesMirrorsView',27 'DistributionSeriesMirrorsView',
28 'DistributionSetActionNavigationMenu',
28 'DistributionSetBreadcrumbBuilder',29 'DistributionSetBreadcrumbBuilder',
29 'DistributionSetContextMenu',30 'DistributionSetContextMenu',
30 'DistributionSetFacets',31 'DistributionSetFacets',
@@ -46,6 +47,8 @@
4647
47from canonical.cachedproperty import cachedproperty48from canonical.cachedproperty import cachedproperty
48from lp.registry.browser.announcement import HasAnnouncementsView49from lp.registry.browser.announcement import HasAnnouncementsView
50from lp.registry.browser.menu import (
51 IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)
49from lp.soyuz.browser.archive import traverse_distro_archive52from lp.soyuz.browser.archive import traverse_distro_archive
50from lp.bugs.browser.bugtask import BugTargetTraversalMixin53from lp.bugs.browser.bugtask import BugTargetTraversalMixin
51from lp.soyuz.browser.build import BuildRecordsView54from lp.soyuz.browser.build import BuildRecordsView
@@ -770,12 +773,21 @@
770 self.batchnav = BatchNavigator(results, self.request)773 self.batchnav = BatchNavigator(results, self.request)
771774
772775
773class DistributionSetView:776class DistributionSetActionNavigationMenu(RegistryCollectionActionMenuBase):
774777 """Action menu for `DistributionSetView`."""
775 def __init__(self, context, request):778
776 self.context = context779 usedfor = IDistributionSet
777 self.request = request780 links = ['register_team', 'register_project', 'create_account']
778781
782
783class DistributionSetView(LaunchpadView):
784 """View for /distros top level collection."""
785
786 implements(IRegistryCollectionNavigationMenu)
787
788 page_title = 'Distributions registered in Launchpad'
789
790 @cachedproperty
779 def count(self):791 def count(self):
780 return self.context.count()792 return self.context.count()
781793
782794
=== modified file 'lib/lp/registry/browser/menu.py'
--- lib/lp/registry/browser/menu.py 2009-08-20 16:28:54 +0000
+++ lib/lp/registry/browser/menu.py 2009-08-21 20:04:25 +0000
@@ -22,19 +22,19 @@
22 """Menu shared by top level collection objects."""22 """Menu shared by top level collection objects."""
2323
24 def projects(self):24 def projects(self):
25 return Link('/projects/', 'Projects')25 return Link('/projects/', 'View projects', icon='info')
2626
27 def distributions(self):27 def distributions(self):
28 return Link('/distros/', 'Distributions')28 return Link('/distros/', 'View distributions', icon='info')
2929
30 def people(self):30 def people(self):
31 return Link('/people/', 'People')31 return Link('/people/', 'View people', icon='info')
3232
33 def meetings(self):33 def meetings(self):
34 return Link('/sprints/', 'Meetings')34 return Link('/sprints/', 'View meetings', icon='info')
3535
36 def project_groups(self):36 def project_groups(self):
37 return Link('/projectgroups', 'Project groups')37 return Link('/projectgroups', 'View project groups', icon='info')
3838
39 def register_project(self):39 def register_project(self):
40 text = 'Register a project'40 text = 'Register a project'
4141
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py 2009-08-21 07:17:28 +0000
+++ lib/lp/registry/browser/product.py 2009-08-21 15:05:23 +0000
@@ -1393,7 +1393,7 @@
13931393
1394 @enabled_with_permission('launchpad.ProjectReview')1394 @enabled_with_permission('launchpad.ProjectReview')
1395 def review_licenses(self):1395 def review_licenses(self):
1396 return Link('+review-licenses', 'Review projects')1396 return Link('+review-licenses', 'Review projects', icon='edit')
13971397
13981398
1399class ProductSetView(LaunchpadView):1399class ProductSetView(LaunchpadView):
@@ -1405,27 +1405,27 @@
14051405
1406 max_results_to_display = config.launchpad.default_batch_size1406 max_results_to_display = config.launchpad.default_batch_size
1407 results = None1407 results = None
1408 searchrequested = False1408 search_requested = False
14091409
1410 def initialize(self):1410 def initialize(self):
1411 """See `LaunchpadFormView`."""1411 """See `LaunchpadView`."""
1412 form = self.request.form_ng1412 form = self.request.form_ng
1413 self.search_string = form.getOne('text')1413 self.search_string = form.getOne('text')
1414 if self.search_string is not None:1414 if self.search_string is not None:
1415 self.searchrequested = True1415 self.search_requested = True
14161416
1417 def all_batched(self):1417 def all_batched(self):
1418 return BatchNavigator(self.context.all_active, self.request)1418 return BatchNavigator(self.context.all_active, self.request)
14191419
1420 @cachedproperty1420 @cachedproperty
1421 def matches(self):1421 def matches(self):
1422 if not self.searchrequested:1422 if not self.search_requested:
1423 return None1423 return None
1424 pillarset = getUtility(IPillarNameSet)1424 pillarset = getUtility(IPillarNameSet)
1425 return pillarset.count_search_matches(self.search_string)1425 return pillarset.count_search_matches(self.search_string)
14261426
1427 @cachedproperty1427 @cachedproperty
1428 def searchresults(self):1428 def search_results(self):
1429 search_string = self.search_string.lower()1429 search_string = self.search_string.lower()
1430 limit = self.max_results_to_display1430 limit = self.max_results_to_display
1431 return getUtility(IPillarNameSet).search(search_string, limit)1431 return getUtility(IPillarNameSet).search(search_string, limit)
14321432
=== modified file 'lib/lp/registry/browser/project.py'
--- lib/lp/registry/browser/project.py 2009-08-20 15:23:34 +0000
+++ lib/lp/registry/browser/project.py 2009-08-21 15:14:09 +0000
@@ -6,6 +6,7 @@
6__metaclass__ = type6__metaclass__ = type
77
8__all__ = [8__all__ = [
9 'ProjectActionMenu',
9 'ProjectAddProductView',10 'ProjectAddProductView',
10 'ProjectAddQuestionView',11 'ProjectAddQuestionView',
11 'ProjectAddView',12 'ProjectAddView',
@@ -18,14 +19,14 @@
18 'ProjectFacets',19 'ProjectFacets',
19 'ProjectMaintainerReassignmentView',20 'ProjectMaintainerReassignmentView',
20 'ProjectNavigation',21 'ProjectNavigation',
22 'ProjectOverviewMenu',
21 'ProjectRdfView',23 'ProjectRdfView',
22 'ProjectReviewView',24 'ProjectReviewView',
23 'ProjectActionMenu',
24 'ProjectOverviewMenu',
25 'ProjectSeriesSpecificationsMenu',25 'ProjectSeriesSpecificationsMenu',
26 'ProjectSetBreadcrumbBuilder',26 'ProjectSetBreadcrumbBuilder',
27 'ProjectSetContextMenu',27 'ProjectSetContextMenu',
28 'ProjectSetNavigation',28 'ProjectSetNavigation',
29 'ProjectSetNavigationMenu',
29 'ProjectSetView',30 'ProjectSetView',
30 'ProjectSpecificationsMenu',31 'ProjectSpecificationsMenu',
31 'ProjectView',32 'ProjectView',
@@ -49,6 +50,8 @@
49from lp.registry.interfaces.project import (50from lp.registry.interfaces.project import (
50 IProject, IProjectSeries, IProjectSet)51 IProject, IProjectSeries, IProjectSet)
51from lp.registry.browser.announcement import HasAnnouncementsView52from lp.registry.browser.announcement import HasAnnouncementsView
53from lp.registry.browser.menu import (
54 IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)
52from lp.registry.browser.product import (55from lp.registry.browser.product import (
53 ProductAddView, ProjectAddStepOne, ProjectAddStepTwo)56 ProductAddView, ProjectAddStepOne, ProjectAddStepTwo)
54from canonical.launchpad.browser.branding import BrandingChangeView57from canonical.launchpad.browser.branding import BrandingChangeView
@@ -229,10 +232,6 @@
229 text = 'See all milestones'232 text = 'See all milestones'
230 return Link('+milestones', text)233 return Link('+milestones', text)
231234
232 def milestones(self):
233 text = 'See all milestones'
234 return Link('+milestones', text)
235
236 def rdf(self):235 def rdf(self):
237 text = structured(236 text = structured(
238 'Download <abbr title="Resource Description Framework">'237 'Download <abbr title="Resource Description Framework">'
@@ -479,10 +478,18 @@
479 return ProjectGroupAddStepOne478 return ProjectGroupAddStepOne
480479
481480
481class ProjectSetNavigationMenu(RegistryCollectionActionMenuBase):
482 """Action menu for project group index."""
483 usedfor = IProjectSet
484 links = ['register_team', 'register_project', 'create_account']
485
486
482class ProjectSetView(LaunchpadView):487class ProjectSetView(LaunchpadView):
483488 """View for project group index page."""
484 header = "Project groups registered in Launchpad"489
485 page_title = header490 implements(IRegistryCollectionNavigationMenu)
491
492 page_title = "Project groups registered in Launchpad"
486493
487 def __init__(self, context, request):494 def __init__(self, context, request):
488 super(ProjectSetView, self).__init__(context, request)495 super(ProjectSetView, self).__init__(context, request)
@@ -492,17 +499,26 @@
492 self.malone = self.form.getOne('malone', None)499 self.malone = self.form.getOne('malone', None)
493 self.bazaar = self.form.getOne('bazaar', None)500 self.bazaar = self.form.getOne('bazaar', None)
494 self.text = self.form.getOne('text', None)501 self.text = self.form.getOne('text', None)
495 self.searchrequested = False502 self.search_requested = False
503 self.search_string = None
496 if (self.text is not None or504 if (self.text is not None or
497 self.bazaar is not None or505 self.bazaar is not None or
498 self.malone is not None or506 self.malone is not None or
499 self.rosetta is not None or507 self.rosetta is not None or
500 self.soyuz is not None):508 self.soyuz is not None):
501 self.searchrequested = True509 self.search_requested = True
502 self.results = None510 self.results = None
503 self.matches = 0511 self.matches = 0
504512
505 def searchresults(self):513 def initialize(self):
514 """See `LaunchpadView`."""
515 form = self.request.form_ng
516 self.search_string = form.getOne('text')
517 if self.search_string is not None:
518 self.search_requested = True
519
520 @cachedproperty
521 def search_results(self):
506 """Use searchtext to find the list of Projects that match522 """Use searchtext to find the list of Projects that match
507 and then present those as a list. Only do this the first523 and then present those as a list. Only do this the first
508 time the method is called, otherwise return previous results.524 time the method is called, otherwise return previous results.
509525
=== modified file 'lib/lp/registry/templates/distros-index.pt'
--- lib/lp/registry/templates/distros-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/distros-index.pt 2009-08-20 22:57:10 +0000
@@ -6,35 +6,23 @@
6 xml:lang="en"6 xml:lang="en"
7 lang="en"7 lang="en"
8 dir="ltr"8 dir="ltr"
9 metal:use-macro="view/macro:page/pillarindex"9 metal:use-macro="view/macro:page/main_side"
10 i18n:domain="launchpad"10 i18n:domain="launchpad"
11>11>
12 <body>12 <body>
13 <h1 metal:fill-slot="heading">Registered distributions</h1>13 <h1 metal:fill-slot="heading">Registered distributions</h1>
1414
15<metal:rightportlets fill-slot="portlets_two">15 <tal:side metal:fill-slot="side">
16 <div class="portlet">16 <tal:menu replace="structure view/@@+global-actions" />
17 <h2>About these distributions</h2>17 <tal:menu replace="structure context/@@+related-pages" />
1818 </tal:side>
19 <div class="portletBody portletContent">19
20 <img src="/@@/info" />20 <div metal:fill-slot="main">
21 Launchpad can manage the source packages, builds, archive publishing21 There are currently
22 and historical record-keeping necessary to create a distribution.22 <strong class="registry-stat"
23 Some of the distributions described here are fully managed in23 tal:content="view/count">2</strong>
24 Launchpad, others are managed elsewhere but Launchpad keeps track of24 distributions registered in Launchpad.
25 their progress.25 <p/>
26 </div>
27 </div>
28</metal:rightportlets>
29
30<div metal:fill-slot="main">
31
32 <div id="application-summary">
33 Launchpad can keep track of the software packages in a distribution,
34 and provide information about the bugs, translations and code
35 associated with each of them.
36 </div>
37
38 <table class="listing">26 <table class="listing">
39 <thead>27 <thead>
40 <tr>28 <tr>
@@ -67,6 +55,13 @@
67 and its information might be out of date.55 and its information might be out of date.
68 </p>56 </p>
6957
58 <div id="application-summary">
59 Launchpad manages the source packages, builds, archive publishing, bugs,
60 translations, code, and historical record-keeping necessary to create a
61 distribution. Some of the distributions described here are fully
62 managed in Launchpad, others are managed elsewhere with Launchpad
63 keeping track of their progress.
64 </div>
70 </div>65 </div>
7166
72</body>67</body>
7368
=== modified file 'lib/lp/registry/templates/products-index.pt'
--- lib/lp/registry/templates/products-index.pt 2009-08-20 16:13:15 +0000
+++ lib/lp/registry/templates/products-index.pt 2009-08-20 21:13:30 +0000
@@ -43,17 +43,17 @@
43 tal:attributes="action request/URL"43 tal:attributes="action request/URL"
44 accept-charset="UTF-8">44 accept-charset="UTF-8">
45 <input size="30" name="text" tal:attributes="value view/search_string" />45 <input size="30" name="text" tal:attributes="value view/search_string" />
46 <input tal:condition="view/searchrequested"46 <input tal:condition="view/search_requested"
47 type="submit"47 type="submit"
48 value="Search again"48 value="Search again"
49 />49 />
50 <input tal:condition="not: view/searchrequested"50 <input tal:condition="not: view/search_requested"
51 type="submit"51 type="submit"
52 value="Search projects"52 value="Search projects"
53 />53 />
54 </form>54 </form>
5555
56 <tal:searching condition="view/searchrequested">56 <tal:searching condition="view/search_requested">
5757
58 <p id="empty-search-string" tal:condition="not: view/search_string">58 <p id="empty-search-string" tal:condition="not: view/search_string">
59 Enter one or more words related to the project you want to find.59 Enter one or more words related to the project you want to find.
@@ -69,22 +69,22 @@
69 do another search with more relevant search terms.69 do another search with more relevant search terms.
70 </p>70 </p>
7171
72 <p tal:condition="view/searchresults">72 <tal:searching tal:condition="view/search_results">
73 <span tal:replace="view/matches">3</span>73 <p class="search-results">
74 <span tal:condition="python: view.matches == 1">project found</span>74 <span tal:replace="view/matches">3</span>
75 <span tal:condition="python: view.matches != 1">projects found</span>75 <span tal:condition="python: view.matches == 1">project found</span>
76 matching &#8220;<tal:string replace="view/search_string" />&#8221;76 <span tal:condition="python: view.matches != 1">projects found</span>
77 <span tal:condition="view/tooManyResultsFound">,77 matching &#8220;<tal:string replace="view/search_string" />&#8221;
78 showing the most relevant78 <span tal:condition="view/tooManyResultsFound">,
79 <span tal:replace="view/max_results_to_display" />79 showing the most relevant
80 </span>80 <span tal:replace="view/max_results_to_display" />
81 </p>81 </span>
82 </p>
83 </tal:searching>
8284
83 <table85 <table tal:condition="view/matches"
84 tal:condition="view/matches"86 tal:define="results view/search_results"
85 tal:define="results view/searchresults"87 class="search-results">
86 id="search-results"
87 >
88 <tbody>88 <tbody>
89 <tr tal:repeat="pillarname results"89 <tr tal:repeat="pillarname results"
90 tal:replace="structure pillarname/@@+listing-simple">90 tal:replace="structure pillarname/@@+listing-simple">
@@ -94,42 +94,32 @@
9494
95 <div id="application-summary">95 <div id="application-summary">
96 <p class="error"96 <p class="error"
97 tal:condition="not: view/searchresults">97 tal:condition="not: view/search_results">
98 No projects matching98 No projects matching
99 &#8220;<span tal:replace="view/search_string">moz</span>&#8221;99 &#8220;<span tal:replace="view/search_string">moz</span>&#8221;
100 were found.100 were found.
101 </p>101 </p>
102102
103 <h2>Haven&#8217;t found your project?</h2>
104
105 <p>103 <p>
106 If the project you are looking for isn't here, go ahead and register104 If the project you are looking for isn't here, go ahead and
107 it yourself!105 <a href=""
106 tal:attributes="href view/menu:overview/register_project/url"
107 >register it yourself!</a>
108 </p>108 </p>
109109
110 <ul class="rollover buttons">
111 <li>
112 <a href="/projects/+new">
113 <img
114 alt="Register a project"
115 src="/+icing/but-lrg-registerproj.gif"
116 />
117 </a>
118 </li>
119 </ul>
120 </div>110 </div>
121 </tal:non-empty-search-string>111 </tal:non-empty-search-string>
122112
123 </tal:searching>113 </tal:searching>
124 <tal:no_search condition="not: view/searchrequested">114 <tal:no_search condition="not: view/search_requested">
125115
126 <p id="application-summary">116 <p class="application-summary">
127 Launchpad helps people to work together by making it easy to share117 Launchpad helps people to work together by making it easy to share
128 code, bug reports, translations, and ideas. To get started, search here118 code, bug reports, translations, and ideas. To get started, search here
129 for a project you want to know more about.119 for a project you want to know more about.
130 </p>120 </p>
131121
132 <p>122 <p class="application-summary">
133 If you find a project you run, <a href="/launchpad/+addquestion">ask123 If you find a project you run, <a href="/launchpad/+addquestion">ask
134 us</a> and we'll hand the project over to you.124 us</a> and we'll hand the project over to you.
135 <br />To set that project up for translation to your language, <a125 <br />To set that project up for translation to your language, <a
136126
=== modified file 'lib/lp/registry/templates/projects-index.pt'
--- lib/lp/registry/templates/projects-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/projects-index.pt 2009-08-20 21:13:30 +0000
@@ -6,96 +6,81 @@
6 xml:lang="en"6 xml:lang="en"
7 lang="en"7 lang="en"
8 dir="ltr"8 dir="ltr"
9 metal:use-macro="view/macro:page/pillarindex"9 metal:use-macro="view/macro:page/main_side"
10 i18n:domain="launchpad"10 i18n:domain="launchpad"
11>11>
12 <body>12 <body>
13 <h1 metal:fill-slot="heading">Project groups in Launchpad</h1>13 <h1 metal:fill-slot="heading">Project groups</h1>
1414
15<metal:rightportlets fill-slot="portlets_two">15 <tal:side metal:fill-slot="side">
16 <div class="portlet">16 <tal:menu replace="structure view/@@+global-actions" />
17 <h2>About Projects in Launchpad:</h2>17 <tal:menu replace="structure context/@@+related-pages" />
18 <div class="portletBody portletContent">18 </tal:side>
19 <img src="/@@/info" />19
20 There are currently20 <div metal:fill-slot="main">
21 <a href="+all"><span tal:replace="context/count_all">5</span>21 <p>There are
22 projects</a> registered.22 <strong class="registry-stat"
23 <br />23 tal:content="context/count_all">5</strong>
24 <br />24 project groups registered in Launchpad.
25 Only the Launchpad administrators and registry experts can register new25 </p>
26 project groups. You can register an individual application (what we call26
27 a project). To do so, first <a href="/projects/">search to see if your27 <form class="central" method="get" accept-charset="UTF-8">
28 project is already in Launchpad</a>.28 <input size="30" name="text" tal:attributes="value view/search_string" />
29 <input
30 tal:condition="view/search_requested"
31 type="submit" value="Search Again" />
32 <input
33 tal:condition="not: view/search_requested"
34 type="submit" value="Search project groups" />
35 </form>
36
37 <div tal:condition="view/search_requested">
38 <tal:searching tal:condition="view/search_results">
39 <p class="search-results">
40 <span tal:replace="view/matches">3</span>
41 <span tal:condition="python: view.matches == 1">project
42 group found</span>
43 <span tal:condition="python: view.matches != 1">projects
44 groups found</span>
45 matching
46 &#8220;<tal:string replace="view/search_string" />&#8221;
47 </p>
48 </tal:searching>
49
50 <table tal:condition="view/matches"
51 tal:define="results view/search_results"
52 class="search-results">
53 <tbody>
54 <tr tal:repeat="product results">
55 <td tal:content="structure product/@@+listing-detailed" />
56 </tr>
57 </tbody>
58 </table>
59
60 <p class="error application-summary"
61 tal:condition="not: view/search_results">
62 No project groups matching
63 &#8220;<span tal:replace="view/search_string">moz</span>&#8221;
64 were found.
65 </p>
66 </div>
67 <p class="application-summary">
68 In Launchpad, <dfn>project groups</dfn> are special groups of
69 software projects that share a development community. Examples
70 include <a href="gnome">Gnome</a>,
71 <a href="kde"><abbr>KDE</abbr></a>, and
72 <a href="mozilla">Mozilla</a>. Launchpad allows you to group
73 several projects together into a project group, to make coordination
74 and tracking simpler.
75 </p>
76
77 <p class="application-summary">
78 Only the Launchpad administrators and registry experts can register
79 new project groups. You can register an individual application (what
80 we call a project). To do so, first <a href="/projects/">search to
81 see if your project is already in Launchpad</a>.
82 </p>
83
29 </div>84 </div>
30 </div>85 </body>
31</metal:rightportlets>
32
33<div metal:fill-slot="main">
34
35 <p>
36 In Launchpad, <dfn>project groups</dfn> are special groups of software
37 projects that share a development community.
38 Examples include <a href="gnome">Gnome</a>,
39 <a href="kde"><abbr>KDE</abbr></a>, and
40 <a href="mozilla">Mozilla</a>. Launchpad allows you to group several
41 projects together in a project, to make coordination and tracking
42 simpler.
43 </p>
44
45 <form method="get" accept-charset="UTF-8">
46 <label for="text">Search projects:</label>
47 <input name="text" tal:attributes="value view/text" />
48 <input
49 tal:condition="view/searchrequested"
50 type="submit" value="Search Again" />
51 <input
52 tal:condition="not: view/searchrequested"
53 type="submit" value="Search" />
54 </form>
55
56 <tal:notsearching condition="not:view/searchrequested">
57 <p>
58 For individual computer programs, applications or libraries,
59 see <a href="/projects">projects</a>.
60 </p>
61
62 <p>
63 For groups of people, see
64 <a href="/people">Launchpad teams</a>.
65 </p>
66 </tal:notsearching>
67
68 <tal:searching condition="view/searchrequested">
69
70 <table class="data" tal:define="results view/searchresults">
71 <thead>
72 <tr class="results">
73 <th colspan="0">
74 <span tal:replace="view/matches">3</span>
75 <span tal:condition="python: view.matches == 1">result</span>
76 <span tal:condition="python: view.matches != 1">results</span>
77 </th>
78 </tr>
79 </thead>
80 <tbody>
81 <tr tal:condition="view/matches"
82 tal:repeat="product results">
83 <td tal:content="structure product/@@+listing-detailed" />
84 </tr>
85 <tr tal:condition="not: view/matches">
86 <td tal:condition="not: view/matches">
87 <p>No projects matching
88 &#8220;<span tal:replace="view/text">moz</span>&#8221;
89 were found.
90 You can <a href="+new">register a new project</a>.</p>
91 </td>
92 </tr>
93 </tbody>
94 </table>
95
96 </tal:searching>
97
98</div>
99
100</body>
101</html>86</html>