=== modified file 'lib/lp/registry/stories/launchpad-root/xx-featuredprojects.txt'
--- lib/lp/registry/stories/launchpad-root/xx-featuredprojects.txt 2009-10-31 18:32:05 +0000
+++ lib/lp/registry/stories/launchpad-root/xx-featuredprojects.txt 2009-11-18 11:22:40 +0000
@@ -19,33 +19,26 @@
>>> from lp.registry.browser.root import LaunchpadRootIndexView
>>> LaunchpadRootIndexView._get_day_of_year = staticmethod(
... fake_get_day_of_year)
+
+Anonymous users will see the list of featured projects with links to the
+projects' pages in Launchpad. The "project of the day" is listed separately.
+
>>> anon_browser.open('http://launchpad.dev/')
>>> featured = find_tag_by_id(anon_browser.contents, 'homepage-featured')
>>> print extract_text(featured.h2)
Featured projects
-We show the featured projects in our sample data. The "project of the day"
-is "GNOME" and it is listed separately:
-
- >>> top_project = find_tag_by_id(featured, 'homepage-featured-top-title')
- >>> print extract_text(top_project)
+ >>> top_project = featured.find('', 'featured-project-top')
+ >>> print extract_text(top_project.h3)
GNOME
-These are the projects in the left column.
-
- >>> def print_column(column_id):
- ... column = find_tag_by_id(featured, column_id)
- ... for link in column.findAll('a'):
- ... print extract_text(link)
- >>> print_column('homepage-featured-left')
+ >>> featured_list = featured.find('', 'featured-projects-list')
+ >>> for link in featured_list.findAll('a'):
+ ... print extract_text(link)
Gnome Applets
Bazaar
Mozilla Firefox
Gentoo
-
-These are the projects in the right column.
-
- >>> print_column('homepage-featured-right')
GNOME Terminal
the Mozilla Project
Mozilla Thunderbird
@@ -99,29 +92,23 @@
-These are the projects in the left column. Because the number of projects in
-the columns is odd, the first column is longer.
-
- >>> print_column('homepage-featured-left')
+ >>> featured_list = featured.find('', 'featured-projects-list')
+ >>> for link in featured_list.findAll('a'):
+ ... print extract_text(link)
Apache
Gnome Applets
Bazaar
Mozilla Firefox
GNOME
-
-These are the projects in the right column.
-
- >>> print_column('homepage-featured-right')
GNOME Terminal
the Mozilla Project
Mozilla Thunderbird
Ubuntu
=== modified file 'lib/canonical/ launchpad/ templates/ root-index. pt' launchpad/ templates/ root-index. pt 2009-11-13 18:03:35 +0000 launchpad/ templates/ root-index. pt 2009-11-18 11:03:37 +0000
margin- top: 1em;
font- size: 161%; project- top h3 {
font- size: 131%;
font- weight: bold; project- top h3 img {
vertical- align: middle; project- top p {
margin- top: 0.5em;
margin- bottom: 1em;
border- bottom: 1px solid #888888; featured" class=" homepage- portlet" >
<h2>Featured projects</h2>
--- lib/canonical/
+++ lib/canonical/
@@ -51,14 +51,14 @@
}
- .featured-project h3 {
+ .featured-
}
- .featured-project h3 img {
+ .featured-
}
- .featured-project p {
+ .featured-
@@ -226,7 +226,7 @@
<div id="homepage-
- <div class=" featured- project" featured- project- top"
tal: define= "topproject view/featured_ projects_ top"
tal: condition= "topproject" >
<h3>
</div>
+ <div class="
@@ -241,7 +241,7 @@
<div class=" two-column- list"> featured" > featured- projects- list">
<li tal:repeat="project view/featured_ projects" >
<a tal:replace= "structure project/fmt:link" />
</ li>
- <ul id="homepage-
+ <ul class="
=== modified file 'lib/lp/ registry/ stories/ launchpad- root/xx- featuredproject s.txt' registry/ stories/ launchpad- root/xx- featuredproject s.txt 2009-10-31 18:32:05 +0000 registry/ stories/ launchpad- root/xx- featuredproject s.txt 2009-11-18 11:22:40 +0000 browser. root import LaunchpadRootIn dexView dexView. _get_day_ of_year = staticmethod( day_of_ year) launchpad. dev/') by_id(anon_ browser. contents, 'homepage- featured' ) text(featured. h2)
--- lib/lp/
+++ lib/lp/
@@ -19,33 +19,26 @@
>>> from lp.registry.
>>> LaunchpadRootIn
... fake_get_
+
+Anonymous users will see the list of featured projects with links to the
+projects' pages in Launchpad. The "project of the day" is listed separately.
+
>>> anon_browser.open('http://
>>> featured = find_tag_
>>> print extract_
Featured projects
-We show the featured projects in our sample data. The "project of the day" by_id(featured, 'homepage- featured- top-title' ) text(top_ project) project- top') text(top_ project. h3)
-is "GNOME" and it is listed separately:
-
- >>> top_project = find_tag_
- >>> print extract_
+ >>> top_project = featured.find('', 'featured-
+ >>> print extract_
GNOME
-These are the projects in the left column. column_ id): by_id(featured, column_id) findAll( 'a'): 'homepage- featured- left') projects- list') list.findAll( 'a'): 'homepage- featured- right')
-
- >>> def print_column(
- ... column = find_tag_
- ... for link in column.
- ... print extract_text(link)
- >>> print_column(
+ >>> featured_list = featured.find('', 'featured-
+ >>> for link in featured_
+ ... print extract_text(link)
Gnome Applets
Bazaar
Mozilla Firefox
Gentoo
-
-These are the projects in the right column.
-
- >>> print_column(
GNOME Terminal
the Mozilla Project
Mozilla Thunderbird
@@ -99,29 +92,23 @@
>>> anon_browser.open('http:// launchpad. dev/') by_id(anon_ browser. contents, 'homepage- featured' ) by_id(featured, 'homepage- featured- top-title' ) text(top_ project) project- top') text(top_ project. h3)
>>> featured = find_tag_
- >>> top_project = find_tag_
- >>> print extract_
+ >>> top_project = featured.find('', 'featured-
+ >>> print extract_
Gentoo
-These are the projects in the left column. Because the number of projects in 'homepage- featured- left') projects- list') list.findAll( 'a'): 'homepage- featured- right')
-the columns is odd, the first column is longer.
-
- >>> print_column(
+ >>> featured_list = featured.find('', 'featured-
+ >>> for link in featured_
+ ... print extract_text(link)
Apache
Gnome Applets
Bazaar
Mozilla Firefox
GNOME
-
-These are the projects in the right column.
-
- >>> print_column(
GNOME Terminal
the Mozilla Project
Mozilla Thunderbird
Ubuntu
-
== Removing a project ==
>>> admin_browser. getLink( MANAGE_ LINK).click( )