Merge lp:~michael.nelson/launchpad/sprint-index-and-attend-3.0 into lp:launchpad

Proposed by Michael Nelson on 2009-09-18
Status: Merged
Approved by: Barry Warsaw on 2009-09-18
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/sprint-index-and-attend-3.0
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~michael.nelson/launchpad/sprint-index-and-attend-3.0
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical 2009-09-21 Approve on 2009-09-21
Barry Warsaw (community) code ui* 2009-09-18 Approve on 2009-09-18
Review via email: mp+12044@code.launchpad.net
To post a comment you must log in.
Michael Nelson (michael.nelson) wrote :

= Summary =

Mechanical updates to sprint-index and sprint-attend.

The index required a little re-working.

Before:
http://people.canonical.com/~michaeln/tmp/sprint-index-before.png
http://people.canonical.com/~michaeln/tmp/sprint-attend-before.png

After:
http://people.canonical.com/~michaeln/tmp/sprint-index-after.png
http://people.canonical.com/~michaeln/tmp/sprint-attend-after.png

== Proposed fix ==

== Pre-implementation notes ==

== Implementation details ==

== Tests ==

bin/test -vvt sprint

== Demo and Q/A ==

Demo:
https://launchpad.dev/sprints/paris

= 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/blueprints/browser/sprintattendance.py
  lib/lp/blueprints/stories/sprints/05-sprint-creation.txt
  lib/lp/blueprints/browser/sprint.py
  lib/lp/blueprints/stories/sprints/sprint-settopics.txt
  lib/lp/blueprints/stories/sprints/20-sprint-registration.txt
  lib/lp/blueprints/templates/sprint-attend.pt
  lib/lp/blueprints/templates/sprint-index.pt
  lib/lp/blueprints/stories/sprints/10-sprint-editing.txt

--
Michael

Barry Warsaw (barry) wrote :
Download full text (5.7 KiB)

Hi Michael,

Thanks for working on this branch. I'm psyched to see us nailing down these
blueprint pages as we finish up 3.0.

As mentioned in irc, sprint-index doesn't look quite right because of the
breadcrumbs that shouldn't be there. I have a hack, er, solution for that
attached below. It basically puts a null +hierarchy view on the page. We
might want to consider generalizing that or providing an easier way to do it.
If you want to open a bug asking for that, I might be able to fix it
post-3.0. For now, this hack will work.

First, let's look at the code. I'll omit the stuff that looks fine.

=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py 2009-09-16 18:18:49 +0000
+++ lib/lp/blueprints/browser/sprint.py 2009-09-18 10:49:12 +0000
> @@ -69,7 +70,7 @@
> usedfor = ISprint
>
>
> -class SprintOverviewMenu(ApplicationMenu):
> +class SprintOverviewMenu(NavigationMenu):

While you're here can you give this class a docstring?

=== modified file 'lib/lp/blueprints/stories/sprints/05-sprint-creation.txt'
--- lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-15 10:26:04 +0000
+++ lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-18 11:31:27 +0000
> @@ -80,14 +80,9 @@
> Since the sprint's time zone was set to UTC, the dates are displayed in
> that time zone:
>
> - >>> print find_portlet(user_browser.contents, 'Meeting details')
> - <...
> - ...Starts:...
> - 2006-10-10 09:15 UTC...
> - ...Ends:...
> - 2006-10-13 16:00 UTC...
> - ...
> -
> + >>> print extract_text(find_tag_by_id(user_browser.contents, 'start-end'))
> + Starts: 09:15 UTC on Tuesday, 2006-10-10
> + Ends: 16:00 UTC on Friday, 2006-10-13

Thanks for cleaning these up!

=== modified file 'lib/lp/blueprints/stories/sprints/10-sprint-editing.txt'
--- lib/lp/blueprints/stories/sprints/10-sprint-editing.txt 2009-09-16 17:32:51 +0000
+++ lib/lp/blueprints/stories/sprints/10-sprint-editing.txt 2009-09-18 10:49:12 +0000
> @@ -2,8 +2,8 @@
> available to those who have permissions to edit that sprint.
>
> >>> anon_browser.open('http://launchpad.dev/sprints/ubz')
> - >>> anon_browser.title
> - 'Ubuntu Below Zero (sprint or meeting)'
> + >>> print anon_browser.title
> + Ubuntu Below Zero : Meetings

And these. If you have the inclination, can you indent the interactive
prompts 4 spaces?

=== modified file 'lib/lp/blueprints/stories/sprints/sprint-settopics.txt'
--- lib/lp/blueprints/stories/sprints/sprint-settopics.txt 2009-08-13 19:03:36 +0000
+++ lib/lp/blueprints/stories/sprints/sprint-settopics.txt 2009-09-18 10:49:12 +0000
> @@ -55,8 +55,8 @@
> 'http://launchpad.dev/sprints/uds-guacamole'
>
> >>> ut = 'Ubuntu Team'
> - >>> meeting_portlet = find_portlet(browser.contents, 'Meeting details')
> - >>> ut in extract_text(meeting_portlet.find(text='Driver:').findNext('a'))
> + >>> meeting_drivers = find_tag_by_id(browser.contents, 'meeting-drivers')
> + >>> ut in extract_text(meeting_drivers.findNext('a'))
> True

Is it possible to just print the text and use ellipses to omit anything you
don't care about? That would be better for documentation/testing purposes
than jus...

Read more...

review: Approve (code ui*)
Michael Nelson (michael.nelson) wrote :
Download full text (7.4 KiB)

Barry Warsaw wrote:
> Review: Approve code ui*
> Hi Michael,
>
> Thanks for working on this branch. I'm psyched to see us nailing down these
> blueprint pages as we finish up 3.0.
>
> As mentioned in irc, sprint-index doesn't look quite right because of the
> breadcrumbs that shouldn't be there. I have a hack, er, solution for that
> attached below. It basically puts a null +hierarchy view on the page. We
> might want to consider generalizing that or providing an easier way to do it.
> If you want to open a bug asking for that, I might be able to fix it
> post-3.0. For now, this hack will work.

Thanks for the work-around!

>
> First, let's look at the code. I'll omit the stuff that looks fine.
>
> === modified file 'lib/lp/blueprints/browser/sprint.py'
> --- lib/lp/blueprints/browser/sprint.py 2009-09-16 18:18:49 +0000
> +++ lib/lp/blueprints/browser/sprint.py 2009-09-18 10:49:12 +0000
>> @@ -69,7 +70,7 @@
>> usedfor = ISprint
>>
>>
>> -class SprintOverviewMenu(ApplicationMenu):
>> +class SprintOverviewMenu(NavigationMenu):
>
> While you're here can you give this class a docstring?

Done.

>
> === modified file 'lib/lp/blueprints/stories/sprints/05-sprint-creation.txt'
> --- lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-15 10:26:04 +0000
> +++ lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-18 11:31:27 +0000
>> @@ -80,14 +80,9 @@
>> Since the sprint's time zone was set to UTC, the dates are displayed in
>> that time zone:
>>
>> - >>> print find_portlet(user_browser.contents, 'Meeting details')
>> - <...
>> - ...Starts:...
>> - 2006-10-10 09:15 UTC...
>> - ...Ends:...
>> - 2006-10-13 16:00 UTC...
>> - ...
>> -
>> + >>> print extract_text(find_tag_by_id(user_browser.contents, 'start-end'))
>> + Starts: 09:15 UTC on Tuesday, 2006-10-10
>> + Ends: 16:00 UTC on Friday, 2006-10-13
>
> Thanks for cleaning these up!
>
> === modified file 'lib/lp/blueprints/stories/sprints/10-sprint-editing.txt'
> --- lib/lp/blueprints/stories/sprints/10-sprint-editing.txt 2009-09-16 17:32:51 +0000
> +++ lib/lp/blueprints/stories/sprints/10-sprint-editing.txt 2009-09-18 10:49:12 +0000
>> @@ -2,8 +2,8 @@
>> available to those who have permissions to edit that sprint.
>>
>> >>> anon_browser.open('http://launchpad.dev/sprints/ubz')
>> - >>> anon_browser.title
>> - 'Ubuntu Below Zero (sprint or meeting)'
>> + >>> print anon_browser.title
>> + Ubuntu Below Zero : Meetings
>
> And these. If you have the inclination, can you indent the interactive
> prompts 4 spaces?

Done.

>
> === modified file 'lib/lp/blueprints/stories/sprints/sprint-settopics.txt'
> --- lib/lp/blueprints/stories/sprints/sprint-settopics.txt 2009-08-13 19:03:36 +0000
> +++ lib/lp/blueprints/stories/sprints/sprint-settopics.txt 2009-09-18 10:49:12 +0000
>> @@ -55,8 +55,8 @@
>> 'http://launchpad.dev/sprints/uds-guacamole'
>>
>> >>> ut = 'Ubuntu Team'
>> - >>> meeting_portlet = find_portlet(browser.contents, 'Meeting details')
>> - >>> ut in extract_text(meeting_portlet.find(text='Driver:').findNext('a'))
>> + >>> meeting_drivers = find_tag_by_id(browser.contents, 'meeting-drivers')
>> + >>> ut in extract_text...

Read more...

Michael Nelson (michael.nelson) wrote :

Michael Nelson wrote:
> Barry Warsaw wrote:
>> Review: Approve code ui*
> Thanks Barry - incremental attached.
>
> I'll send it off to ec2test now, but not to land, just in case you're
> around and have any changes. I'll land it if the tests all succeed.
>
>
>

Hi Barry,

My ec2test failed (an error in devel) and when I re-merged RF this
morning, I found that, due to the work-around that we added (setting
display_breadcrumbs to False for SprintIndexHierarchy) that I was also
affecting most other sprint views (which had perfect breadcrumbs
otherwise - but none with this fix).

I created:

https://bugs.edge.launchpad.net/launchpad-foundations/+bug/433852

and have included a fix in this branch. This enables us to correctly
suppress the breadcrumbs when the view provides IMajorHeadingView, but
display them for other sub-pages (that share the same context).

Let me know if you agree or not. I'll then try to get an RC to get these
landed.

Thanks!

--
Michael

1=== modified file 'lib/canonical/launchpad/browser/launchpad.py'
2--- lib/canonical/launchpad/browser/launchpad.py 2009-09-20 19:40:47 +0000
3+++ lib/canonical/launchpad/browser/launchpad.py 2009-09-21 12:43:33 +0000
4@@ -52,6 +52,7 @@
5 from canonical.launchpad.helpers import intOrZero
6 from canonical.launchpad.layers import WebServiceLayer
7
8+from lp.app.interfaces.headings import IMajorHeadingView
9 from lp.registry.interfaces.announcement import IAnnouncementSet
10 from lp.soyuz.interfaces.binarypackagename import (
11 IBinaryPackageNameSet)
12@@ -259,6 +260,12 @@
13 breadcrumbs.append(page_crumb)
14 return breadcrumbs
15
16+ @property
17+ def _context_view(self):
18+ """Return the unproxied view for the context of the hierarchy."""
19+ from zope.security.proxy import removeSecurityProxy
20+ return removeSecurityProxy(self.request.traversed_objects[-1])
21+
22 def makeBreadcrumbForRequestedPage(self):
23 """Return an `IBreadcrumb` for the requested page.
24
25@@ -269,10 +276,9 @@
26 one for our parent view's context, return None.
27 """
28 url = self.request.getURL()
29- from zope.security.proxy import removeSecurityProxy
30- view = removeSecurityProxy(self.request.traversed_objects[-1])
31 obj = self.request.traversed_objects[-2]
32 default_view_name = zapi.getDefaultViewName(obj, self.request)
33+ view = self._context_view
34 if view.__name__ != default_view_name:
35 title = getattr(view, 'page_title', None)
36 if title is None:
37@@ -296,7 +302,10 @@
38 """Return whether the breadcrumbs should be displayed."""
39 # If there is only one breadcrumb then it does not make sense
40 # to display it as it will simply repeat the context.title.
41- return len(self.items) > 1
42+ # If the view is an IMajorHeadingView then we do not want
43+ # to display breadcrumbs either.
44+ return (len(self.items) > 1 and
45+ not IMajorHeadingView.providedBy(self._context_view))
46
47
48 class MaintenanceMessage:
49
50=== modified file 'lib/canonical/launchpad/doc/hierarchical-menu.txt'
51--- lib/canonical/launchpad/doc/hierarchical-menu.txt 2009-09-18 12:00:56 +0000
52+++ lib/canonical/launchpad/doc/hierarchical-menu.txt 2009-09-21 12:28:14 +0000
53@@ -143,6 +143,25 @@
54 >>> cooker_hierarchy.display_breadcrumbs
55 False
56
57+Additionally, if the view implements IMajorHeadingView then the breadcrumbs
58+will not be displayed.
59+
60+ >>> ham_recipe = Recipe('ham', cookbook)
61+ >>> ham_request = make_fake_request(
62+ ... 'http://launchpad.dev/joy-of-cooking/ham',
63+ ... [root, cookbook, ham_recipe])
64+
65+ >>> ham_hierarchy = getMultiAdapter(
66+ ... (ham_recipe, ham_request), name='+hierarchy')
67+ >>> hierarchy.display_breadcrumbs
68+ True
69+
70+ >>> from zope.interface import alsoProvides
71+ >>> from lp.app.interfaces.headings import IMajorHeadingView
72+ >>> alsoProvides(ham_recipe, IMajorHeadingView)
73+ >>> ham_hierarchy.display_breadcrumbs
74+ False
75+
76
77 == Building IBreadcrumb objects ==
78
79
80=== modified file 'lib/lp/blueprints/browser/configure.zcml'
81--- lib/lp/blueprints/browser/configure.zcml 2009-09-19 04:50:52 +0000
82+++ lib/lp/blueprints/browser/configure.zcml 2009-09-21 12:39:15 +0000
83@@ -23,13 +23,6 @@
84 for="lp.blueprints.interfaces.sprint.ISprint"
85 path_expression="name"
86 parent_utility="lp.blueprints.interfaces.sprint.ISprintSet"/>
87- <browser:page
88- for="lp.blueprints.interfaces.sprint.ISprint"
89- name="+hierarchy"
90- class="lp.blueprints.browser.sprint.SprintIndexHierarchy"
91- template="../../app/templates/launchpad-hierarchy.pt"
92- permission="zope.Public"
93- />
94 <browser:pages
95 for="lp.blueprints.interfaces.sprint.ISprint"
96 class="lp.blueprints.browser.sprint.SprintView"
97
98=== modified file 'lib/lp/blueprints/browser/sprint.py'
99--- lib/lp/blueprints/browser/sprint.py 2009-09-21 07:13:45 +0000
100+++ lib/lp/blueprints/browser/sprint.py 2009-09-21 12:39:15 +0000
101@@ -10,7 +10,6 @@
102 'SprintBrandingView',
103 'SprintEditView',
104 'SprintFacets',
105- 'SprintIndexHierarchy',
106 'SprintMeetingExportView',
107 'SprintNavigation',
108 'SprintOverviewMenu',
109@@ -156,12 +155,6 @@
110 enable_only = ['overview', ]
111
112
113-class SprintIndexHierarchy(Hierarchy):
114- """We force the breadcrumbs not to display for the sprint index."""
115-
116- display_breadcrumbs = False
117-
118-
119 class SprintView(HasSpecificationsView, LaunchpadView):
120
121 __used_for__ = ISprint
122@@ -302,7 +295,6 @@
123
124 schema = ISprint
125 label = "Edit sprint details"
126- page_title = label
127
128 field_names = ['name', 'title', 'summary', 'home_page', 'driver',
129 'time_zone', 'time_starts', 'time_ends', 'address',
130
131=== modified file 'lib/lp/blueprints/stories/sprints/20-sprint-registration.txt'
132--- lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-09-19 04:50:52 +0000
133+++ lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-09-21 12:39:15 +0000
134@@ -11,7 +11,7 @@
135 'http://launchpad.dev/sprints/ubz/+attend'
136
137 >>> print browser.title
138- Register your attendance at Ubuntu Below Zero
139+ Register your attendance : Ubuntu Below Zero : Meetings
140
141 Invalid dates, for instance entering a starting date after the ending date,
142 are reported as errors to the users. (See also the tests in
Brad Crittenden (bac) wrote :

RC approved pending submission through ec2.
Thanks for knocking two more templates down!

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/blueprints/browser/sprint.py'
2--- lib/lp/blueprints/browser/sprint.py 2009-09-16 18:18:49 +0000
3+++ lib/lp/blueprints/browser/sprint.py 2009-09-18 10:49:12 +0000
4@@ -32,6 +32,7 @@
5
6 from canonical.launchpad import _
7 from canonical.cachedproperty import cachedproperty
8+from lp.app.interfaces.headings import IMajorHeadingView
9 from lp.registry.browser.branding import BrandingChangeView
10 from lp.blueprints.browser.specificationtarget import (
11 HasSpecificationsView)
12@@ -43,7 +44,7 @@
13 IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)
14 from canonical.launchpad.webapp import (
15 ApplicationMenu, GetitemNavigation, LaunchpadEditFormView,
16- LaunchpadFormView, LaunchpadView, Link, Navigation,
17+ LaunchpadFormView, LaunchpadView, Link, Navigation, NavigationMenu,
18 StandardLaunchpadFacets, action, canonical_url, custom_widget,
19 enabled_with_permission)
20 from canonical.launchpad.webapp.batching import BatchNavigator
21@@ -69,7 +70,7 @@
22 usedfor = ISprint
23
24
25-class SprintOverviewMenu(ApplicationMenu):
26+class SprintOverviewMenu(NavigationMenu):
27
28 usedfor = ISprint
29 facet = 'overview'
30@@ -154,6 +155,8 @@
31
32 __used_for__ = ISprint
33
34+ implements(IMajorHeadingView)
35+
36 def initialize(self):
37 self.notices = []
38 self.latest_specs_limit = 5
39@@ -200,7 +203,7 @@
40 dt = dt.astimezone(self.tzinfo)
41 return dt.strftime('%Y-%m-%d')
42
43- _local_timeformat = '%H:%M on %A, %Y-%m-%d'
44+ _local_timeformat = '%H:%M %Z on %A, %Y-%m-%d'
45 @property
46 def local_start(self):
47 """The sprint start time, in the local time zone, as text."""
48
49=== modified file 'lib/lp/blueprints/browser/sprintattendance.py'
50--- lib/lp/blueprints/browser/sprintattendance.py 2009-06-25 00:00:26 +0000
51+++ lib/lp/blueprints/browser/sprintattendance.py 2009-09-18 11:31:27 +0000
52@@ -124,6 +124,8 @@
53
54 field_names = ['time_starts', 'time_ends']
55
56+ label = "Register your attendance"
57+
58 @property
59 def initial_values(self):
60 """Show committed attendance, or default to the sprint times."""
61@@ -141,6 +143,11 @@
62 time_starts, time_ends = self.getDates(data)
63 self.context.attend(self.user, time_starts, time_ends)
64
65+ @property
66+ def cancel_url(self):
67+ """Canceling goes back to the sprint page."""
68+ return canonical_url(self.context)
69+
70
71 class SprintAttendanceRegisterView(BaseSprintAttendanceAddView):
72 """A view used to register someone else's attendance at a sprint."""
73
74=== modified file 'lib/lp/blueprints/stories/sprints/05-sprint-creation.txt'
75--- lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-15 10:26:04 +0000
76+++ lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-18 11:31:27 +0000
77@@ -80,14 +80,9 @@
78 Since the sprint's time zone was set to UTC, the dates are displayed in
79 that time zone:
80
81- >>> print find_portlet(user_browser.contents, 'Meeting details')
82- <...
83- ...Starts:...
84- 2006-10-10 09:15 UTC...
85- ...Ends:...
86- 2006-10-13 16:00 UTC...
87- ...
88-
89+ >>> print extract_text(find_tag_by_id(user_browser.contents, 'start-end'))
90+ Starts: 09:15 UTC on Tuesday, 2006-10-10
91+ Ends: 16:00 UTC on Friday, 2006-10-13
92
93 Because this is a brand new sprint, it will have no specs, and we should see
94 a warning to that effect on the page.
95@@ -115,11 +110,7 @@
96 >>> user_browser.url
97 'http://launchpad.dev/sprints/africa-sprint'
98
99- >>> print find_portlet(user_browser.contents, 'Meeting details')
100- <...
101- ...Starts:...
102- 2006-07-10 09:15 SAST...
103- ...Ends:...
104- 2006-07-13 16:00 SAST...
105- ...
106+ >>> print extract_text(find_tag_by_id(user_browser.contents, 'start-end'))
107+ Starts: 09:15 SAST on Monday, 2006-07-10
108+ Ends: 16:00 SAST on Thursday, 2006-07-13
109
110
111=== modified file 'lib/lp/blueprints/stories/sprints/10-sprint-editing.txt'
112--- lib/lp/blueprints/stories/sprints/10-sprint-editing.txt 2009-09-16 17:32:51 +0000
113+++ lib/lp/blueprints/stories/sprints/10-sprint-editing.txt 2009-09-18 10:49:12 +0000
114@@ -2,8 +2,8 @@
115 available to those who have permissions to edit that sprint.
116
117 >>> anon_browser.open('http://launchpad.dev/sprints/ubz')
118- >>> anon_browser.title
119- 'Ubuntu Below Zero (sprint or meeting)'
120+ >>> print anon_browser.title
121+ Ubuntu Below Zero : Meetings
122
123 >>> anon_browser.getLink('Change details')
124 Traceback (most recent call last):
125@@ -15,8 +15,8 @@
126 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
127
128 >>> browser.open('http://launchpad.dev/sprints/ubz')
129- >>> browser.title
130- 'Ubuntu Below Zero (sprint or meeting)'
131+ >>> print browser.title
132+ Ubuntu Below Zero : Meetings
133
134 >>> address = 'Holiday Inn Select, Downtown Montreal, Canada'
135 >>> address in browser.contents
136@@ -64,19 +64,14 @@
137 'http://launchpad.dev/sprints/ubz'
138
139
140-The address of the sprint is now visible in the sprint details portlet.
141-
142- >>> details_portlet = find_portlet(browser.contents, 'Meeting details')
143- >>> address in details_portlet.renderContents()
144- True
145-
146- >>> print details_portlet
147- <...
148- ...Starts:...
149- 2006-01-10 08:30 EST...
150- ...Ends:...
151- 2006-02-12 17:00 EST...
152- ...
153+The address of the sprint is now visible.
154+
155+ >>> print extract_text(find_tag_by_id(browser.contents, 'sprint-address'))
156+ Address: Holiday Inn Select, Downtown Montreal, Canada
157+
158+ >>> print extract_text(find_tag_by_id(browser.contents, 'start-end'))
159+ Starts: 08:30 EST on Tuesday, 2006-01-10
160+ Ends: 17:00 EST on Sunday, 2006-02-12
161
162
163 If we just change the time zone on the edit form, the start and finish
164@@ -88,11 +83,7 @@
165 >>> print browser.url
166 http://launchpad.dev/sprints/ubz
167
168- >>> print find_portlet(browser.contents, 'Meeting details')
169- <...
170- ...Starts:...
171- 2006-01-10 08:30 CST...
172- ...Ends:...
173- 2006-02-12 17:00 CST...
174- ...
175+ >>> print extract_text(find_tag_by_id(browser.contents, 'start-end'))
176+ Starts: 08:30 CST on Tuesday, 2006-01-10
177+ Ends: 17:00 CST on Sunday, 2006-02-12
178
179
180=== modified file 'lib/lp/blueprints/stories/sprints/20-sprint-registration.txt'
181--- lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-07-23 17:49:31 +0000
182+++ lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-09-18 11:31:27 +0000
183@@ -10,8 +10,8 @@
184 >>> browser.url
185 'http://launchpad.dev/sprints/ubz/+attend'
186
187- >>> browser.title
188- 'Register your attendance at Ubuntu Below Zero'
189+ >>> print browser.title
190+ +attend : Ubuntu Below Zero : Meetings
191
192 Invalid dates, for instance entering a starting date after the ending date,
193 are reported as errors to the users. (See also the tests in
194
195=== modified file 'lib/lp/blueprints/stories/sprints/sprint-settopics.txt'
196--- lib/lp/blueprints/stories/sprints/sprint-settopics.txt 2009-08-13 19:03:36 +0000
197+++ lib/lp/blueprints/stories/sprints/sprint-settopics.txt 2009-09-18 10:49:12 +0000
198@@ -55,8 +55,8 @@
199 'http://launchpad.dev/sprints/uds-guacamole'
200
201 >>> ut = 'Ubuntu Team'
202- >>> meeting_portlet = find_portlet(browser.contents, 'Meeting details')
203- >>> ut in extract_text(meeting_portlet.find(text='Driver:').findNext('a'))
204+ >>> meeting_drivers = find_tag_by_id(browser.contents, 'meeting-drivers')
205+ >>> ut in extract_text(meeting_drivers.findNext('a'))
206 True
207
208 Any member of the Ubuntu-Team can now approve and/or decline items to the UDS
209
210=== modified file 'lib/lp/blueprints/templates/sprint-attend.pt'
211--- lib/lp/blueprints/templates/sprint-attend.pt 2009-07-17 17:59:07 +0000
212+++ lib/lp/blueprints/templates/sprint-attend.pt 2009-09-18 11:31:27 +0000
213@@ -3,10 +3,7 @@
214 xmlns:tal="http://xml.zope.org/namespaces/tal"
215 xmlns:metal="http://xml.zope.org/namespaces/metal"
216 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
217- xml:lang="en"
218- lang="en"
219- dir="ltr"
220- metal:use-macro="context/@@main_template/master"
221+ metal:use-macro="view/macro:page/main_only"
222 i18n:domain="launchpad"
223 >
224
225@@ -16,17 +13,10 @@
226 use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" />
227 </metal:block>
228
229-<metal:portlets fill-slot="portlets">
230- <div tal:replace="structure context/@@+portlet-details" />
231- <div tal:replace="structure context/@@+portlet-attendees" />
232-</metal:portlets>
233-
234 <div metal:fill-slot="main">
235
236 <div metal:use-macro="context/@@launchpad_form/form">
237
238- <h1 metal:fill-slot="heading">Register your attendance</h1>
239-
240 <div metal:fill-slot="extra_info" class="documentDescription">
241 Indicate the times during which you will be available for meetings at
242 the sprint. The sprint runs from
243@@ -37,16 +27,16 @@
244
245 </div>
246
247-</div>
248-
249-<div metal:fill-slot="help">
250-<p>
251- Please be as accurate as possible with the time that you will arrive and
252- depart from the conference or sprint venue. This allows the event organisers
253- to schedule the sessions knowing who can attend at various times on the
254- opening and closing day.
255-</p>
256-</div>
257+ <p class="aside">
258+ Note: Please be as accurate as possible with the time that you will
259+ arrive and depart from the conference or sprint venue. This allows the
260+ event organisers to schedule the sessions knowing who can attend at
261+ various times on the opening and closing day.
262+ </p>
263+
264+</div>
265+
266+
267
268 </body>
269 </html>
270
271=== modified file 'lib/lp/blueprints/templates/sprint-index.pt'
272--- lib/lp/blueprints/templates/sprint-index.pt 2009-07-17 17:59:07 +0000
273+++ lib/lp/blueprints/templates/sprint-index.pt 2009-09-18 10:49:12 +0000
274@@ -3,112 +3,126 @@
275 xmlns:tal="http://xml.zope.org/namespaces/tal"
276 xmlns:metal="http://xml.zope.org/namespaces/metal"
277 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
278- xml:lang="en"
279- lang="en"
280- dir="ltr"
281- metal:use-macro="context/@@main_template/master"
282+ metal:use-macro="view/macro:page/main_side"
283 i18n:domain="launchpad"
284 >
285
286 <body>
287
288-<metal:portlets fill-slot="portlets">
289- <div tal:replace="structure context/@@+portlet-details" />
290- <div tal:replace="structure context/@@+portlet-attendees" />
291-</metal:portlets>
292+<tal:registering metal:fill-slot="registering">
293+ <p>Registered by <a tal:replace="structure context/owner/fmt:link" />
294+ on <span tal:content="context/datecreated/fmt:displaydate"
295+ tal:attributes="title context/datecreated/fmt:datetime"
296+ >on 2005-01-01</span>
297+ </p>
298+</tal:registering>
299
300 <div metal:fill-slot="main"
301 tal:define="specs view/specs;
302 has_any_specs view/has_any_specifications">
303
304- <tal:mugshot replace="structure context/image:mugshot" />
305- <h1>Meeting overview</h1>
306-
307- <p>
308- <strong>
309- <tal:start replace="view/local_start" /> till
310- <tal:end replace="view/local_end" />
311- </strong>
312- </p>
313-
314- <p>
315- <span tal:replace="context/summary">
316- Sprint Summary Goes Here
317- </span>
318- <tal:has_homepage condition="context/home_page">
319- <img src="/@@/meeting" />
320- <a tal:attributes="href context/home_page">
321- View the Meeting Home Page
322- </a>
323- </tal:has_homepage>
324- </p>
325-
326- <tal:no_specifications_at_all condition="not: has_any_specs">
327+ <div class="top-portlet">
328+ <h2>Meeting overview</h2>
329+
330 <p>
331- Nobody has yet proposed any blueprints for discussion at this sprint.
332- If you will be attending the sprint you should make sure that the
333- blueprints you are interested in discussing get nominated for the
334- agenda. You can do this using the "Propose for meeting agenda" action
335- link on the blueprint page.
336+ <span tal:replace="context/summary">
337+ Sprint Summary Goes Here
338+ </span>
339+ <tal:has_homepage condition="context/home_page">
340+ <img src="/@@/meeting" />
341+ <a tal:attributes="href context/home_page">
342+ View the Meeting Home Page
343+ </a>
344+ </tal:has_homepage>
345 </p>
346
347+ <dl id="start-end">
348+ <dt>Starts:</dt>
349+ <dd><tal:start replace="view/local_start" /></dd>
350+ <dt>Ends:</dt>
351+ <dd><tal:start replace="view/local_end" /></dd>
352+ </dl>
353+
354+ <dl id="sprint-address" tal:condition="context/address">
355+ <dt>Address:</dt>
356+ <dd><span tal:replace="context/address" /></dd>
357+ </dl>
358+
359+ <dl id="meeting-drivers">
360+ <dt>Meeting drivers:</dt>
361+ <dd tal:repeat="driver context/drivers" style="margin-bottom:0.2em">
362+ <span tal:replace="structure driver/fmt:link" />
363+ </dd>
364+ </dl>
365+
366 <p>
367 Each meeting has a person, or team, responsible for deciding which
368 items are accepted for the agenda. This team is called the "meeting
369 driver" and for <tal:meeting replace="context/title" /> they are:
370 </p>
371
372- <ul>
373- <li class="person" tal:repeat="driver context/drivers">
374- <a tal:attributes="href driver/fmt:url"
375- tal:content="driver/displayname" />
376- </li>
377- </ul>
378-
379 <p>
380 You should contact the meeting driver if you have any additional
381 questions about the structure or agenda of the meeting.
382 </p>
383-
384- </tal:no_specifications_at_all>
385-
386- <tal:some_specs_nominated condition="has_any_specs">
387-
388- <p tal:condition="not:specs">
389- No blueprints are yet approved for discussion at
390- <span tal:replace="context/title">Ubuntu Below Zero</span>.
391- If you are one of the meeting drivers you should review the proposed
392- blueprint list and accept those topics you wish to show up on the
393- agenda for the meeting.
394- </p>
395-
396- <tal:approved_specs condition="specs">
397-
398- <h2>Latest <span tal:replace="view/latest_specs_limit">5</span>
399- additions to the meeting agenda</h2>
400-
401- <table>
402- <div tal:repeat="spec view/latest_approved"
403- tal:replace="structure spec/@@+listing-simple"
404- />
405- </table>
406-
407+ </div>
408+
409+ <div class="portlet">
410+ <h2>Blueprints</h2>
411+ <tal:no_specifications_at_all condition="not: has_any_specs">
412 <p>
413- There are a total of <span tal:replace="view/count">5</span>
414- specifications on the meeting agenda.
415- <tal:proposed define="proposed view/proposed_count"
416- condition="proposed">
417- There are <span tal:replace="proposed">7</span>
418- specifications
419- <a tal:omit-tag="not: context/required:launchpad.Driver" href="+settopics">
420- proposed
421- </a> which the organisers will review.
422- </tal:proposed>
423- You can view the <a href="+specs">full current agenda here</a>.
424- </p>
425- </tal:approved_specs>
426- </tal:some_specs_nominated>
427-
428+ Nobody has yet proposed any blueprints for discussion at this sprint.
429+ If you will be attending the sprint you should make sure that the
430+ blueprints you are interested in discussing get nominated for the
431+ agenda. You can do this using the "Propose for meeting agenda" action
432+ link on the blueprint page.
433+ </p>
434+
435+ </tal:no_specifications_at_all>
436+
437+ <tal:some_specs_nominated condition="has_any_specs">
438+
439+ <p tal:condition="not:specs">
440+ No blueprints are yet approved for discussion at
441+ <span tal:replace="context/title">Ubuntu Below Zero</span>.
442+ If you are one of the meeting drivers you should review the proposed
443+ blueprint list and accept those topics you wish to show up on the
444+ agenda for the meeting.
445+ </p>
446+
447+ <tal:approved_specs condition="specs">
448+
449+ <h2>Latest <span tal:replace="view/latest_specs_limit">5</span>
450+ additions to the meeting agenda</h2>
451+
452+ <table>
453+ <div tal:repeat="spec view/latest_approved"
454+ tal:replace="structure spec/@@+listing-simple"
455+ />
456+ </table>
457+
458+ <p>
459+ There are a total of <span tal:replace="view/count">5</span>
460+ specifications on the meeting agenda.
461+ <tal:proposed define="proposed view/proposed_count"
462+ condition="proposed">
463+ There are <span tal:replace="proposed">7</span>
464+ specifications
465+ <a tal:omit-tag="not: context/required:launchpad.Driver" href="+settopics">
466+ proposed
467+ </a> which the organisers will review.
468+ </tal:proposed>
469+ You can view the <a href="+specs">full current agenda here</a>.
470+ </p>
471+ </tal:approved_specs>
472+ </tal:some_specs_nominated>
473+ </div> <!-- class="portlet" -->
474 </div>
475+
476+<tal:side metal:fill-slot="side">
477+ <tal:menu replace="structure context/@@+global-actions" />
478+ <div tal:replace="structure context/@@+portlet-attendees" />
479+</tal:side>
480+
481 </body>
482 </html>