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

=== modified file 'lib/canonical/launchpad/browser/launchpad.py'
--- lib/canonical/launchpad/browser/launchpad.py 2009-09-20 19:40:47 +0000
+++ lib/canonical/launchpad/browser/launchpad.py 2009-09-21 12:43:33 +0000
@@ -52,6 +52,7 @@
52from canonical.launchpad.helpers import intOrZero52from canonical.launchpad.helpers import intOrZero
53from canonical.launchpad.layers import WebServiceLayer53from canonical.launchpad.layers import WebServiceLayer
5454
55from lp.app.interfaces.headings import IMajorHeadingView
55from lp.registry.interfaces.announcement import IAnnouncementSet56from lp.registry.interfaces.announcement import IAnnouncementSet
56from lp.soyuz.interfaces.binarypackagename import (57from lp.soyuz.interfaces.binarypackagename import (
57 IBinaryPackageNameSet)58 IBinaryPackageNameSet)
@@ -259,6 +260,12 @@
259 breadcrumbs.append(page_crumb)260 breadcrumbs.append(page_crumb)
260 return breadcrumbs261 return breadcrumbs
261262
263 @property
264 def _context_view(self):
265 """Return the unproxied view for the context of the hierarchy."""
266 from zope.security.proxy import removeSecurityProxy
267 return removeSecurityProxy(self.request.traversed_objects[-1])
268
262 def makeBreadcrumbForRequestedPage(self):269 def makeBreadcrumbForRequestedPage(self):
263 """Return an `IBreadcrumb` for the requested page.270 """Return an `IBreadcrumb` for the requested page.
264271
@@ -269,10 +276,9 @@
269 one for our parent view's context, return None.276 one for our parent view's context, return None.
270 """277 """
271 url = self.request.getURL()278 url = self.request.getURL()
272 from zope.security.proxy import removeSecurityProxy
273 view = removeSecurityProxy(self.request.traversed_objects[-1])
274 obj = self.request.traversed_objects[-2]279 obj = self.request.traversed_objects[-2]
275 default_view_name = zapi.getDefaultViewName(obj, self.request)280 default_view_name = zapi.getDefaultViewName(obj, self.request)
281 view = self._context_view
276 if view.__name__ != default_view_name:282 if view.__name__ != default_view_name:
277 title = getattr(view, 'page_title', None)283 title = getattr(view, 'page_title', None)
278 if title is None:284 if title is None:
@@ -296,7 +302,10 @@
296 """Return whether the breadcrumbs should be displayed."""302 """Return whether the breadcrumbs should be displayed."""
297 # If there is only one breadcrumb then it does not make sense303 # If there is only one breadcrumb then it does not make sense
298 # to display it as it will simply repeat the context.title.304 # to display it as it will simply repeat the context.title.
299 return len(self.items) > 1305 # If the view is an IMajorHeadingView then we do not want
306 # to display breadcrumbs either.
307 return (len(self.items) > 1 and
308 not IMajorHeadingView.providedBy(self._context_view))
300309
301310
302class MaintenanceMessage:311class MaintenanceMessage:
303312
=== modified file 'lib/canonical/launchpad/doc/hierarchical-menu.txt'
--- lib/canonical/launchpad/doc/hierarchical-menu.txt 2009-09-18 12:00:56 +0000
+++ lib/canonical/launchpad/doc/hierarchical-menu.txt 2009-09-21 12:28:14 +0000
@@ -143,6 +143,25 @@
143 >>> cooker_hierarchy.display_breadcrumbs143 >>> cooker_hierarchy.display_breadcrumbs
144 False144 False
145145
146Additionally, if the view implements IMajorHeadingView then the breadcrumbs
147will not be displayed.
148
149 >>> ham_recipe = Recipe('ham', cookbook)
150 >>> ham_request = make_fake_request(
151 ... 'http://launchpad.dev/joy-of-cooking/ham',
152 ... [root, cookbook, ham_recipe])
153
154 >>> ham_hierarchy = getMultiAdapter(
155 ... (ham_recipe, ham_request), name='+hierarchy')
156 >>> hierarchy.display_breadcrumbs
157 True
158
159 >>> from zope.interface import alsoProvides
160 >>> from lp.app.interfaces.headings import IMajorHeadingView
161 >>> alsoProvides(ham_recipe, IMajorHeadingView)
162 >>> ham_hierarchy.display_breadcrumbs
163 False
164
146165
147== Building IBreadcrumb objects ==166== Building IBreadcrumb objects ==
148167
149168
=== modified file 'lib/lp/blueprints/browser/configure.zcml'
--- lib/lp/blueprints/browser/configure.zcml 2009-09-19 04:50:52 +0000
+++ lib/lp/blueprints/browser/configure.zcml 2009-09-21 12:39:15 +0000
@@ -23,13 +23,6 @@
23 for="lp.blueprints.interfaces.sprint.ISprint"23 for="lp.blueprints.interfaces.sprint.ISprint"
24 path_expression="name"24 path_expression="name"
25 parent_utility="lp.blueprints.interfaces.sprint.ISprintSet"/>25 parent_utility="lp.blueprints.interfaces.sprint.ISprintSet"/>
26 <browser:page
27 for="lp.blueprints.interfaces.sprint.ISprint"
28 name="+hierarchy"
29 class="lp.blueprints.browser.sprint.SprintIndexHierarchy"
30 template="../../app/templates/launchpad-hierarchy.pt"
31 permission="zope.Public"
32 />
33 <browser:pages26 <browser:pages
34 for="lp.blueprints.interfaces.sprint.ISprint"27 for="lp.blueprints.interfaces.sprint.ISprint"
35 class="lp.blueprints.browser.sprint.SprintView"28 class="lp.blueprints.browser.sprint.SprintView"
3629
=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py 2009-09-21 07:13:45 +0000
+++ lib/lp/blueprints/browser/sprint.py 2009-09-21 12:39:15 +0000
@@ -10,7 +10,6 @@
10 'SprintBrandingView',10 'SprintBrandingView',
11 'SprintEditView',11 'SprintEditView',
12 'SprintFacets',12 'SprintFacets',
13 'SprintIndexHierarchy',
14 'SprintMeetingExportView',13 'SprintMeetingExportView',
15 'SprintNavigation',14 'SprintNavigation',
16 'SprintOverviewMenu',15 'SprintOverviewMenu',
@@ -156,12 +155,6 @@
156 enable_only = ['overview', ]155 enable_only = ['overview', ]
157156
158157
159class SprintIndexHierarchy(Hierarchy):
160 """We force the breadcrumbs not to display for the sprint index."""
161
162 display_breadcrumbs = False
163
164
165class SprintView(HasSpecificationsView, LaunchpadView):158class SprintView(HasSpecificationsView, LaunchpadView):
166159
167 __used_for__ = ISprint160 __used_for__ = ISprint
@@ -302,7 +295,6 @@
302295
303 schema = ISprint296 schema = ISprint
304 label = "Edit sprint details"297 label = "Edit sprint details"
305 page_title = label
306298
307 field_names = ['name', 'title', 'summary', 'home_page', 'driver',299 field_names = ['name', 'title', 'summary', 'home_page', 'driver',
308 'time_zone', 'time_starts', 'time_ends', 'address',300 'time_zone', 'time_starts', 'time_ends', 'address',
309301
=== modified file 'lib/lp/blueprints/stories/sprints/20-sprint-registration.txt'
--- lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-09-19 04:50:52 +0000
+++ lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-09-21 12:39:15 +0000
@@ -11,7 +11,7 @@
11 'http://launchpad.dev/sprints/ubz/+attend'11 'http://launchpad.dev/sprints/ubz/+attend'
1212
13 >>> print browser.title13 >>> print browser.title
14 Register your attendance at Ubuntu Below Zero14 Register your attendance : Ubuntu Below Zero : Meetings
1515
16Invalid dates, for instance entering a starting date after the ending date,16Invalid dates, for instance entering a starting date after the ending date,
17are reported as errors to the users. (See also the tests in17are 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
=== 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
@@ -32,6 +32,7 @@
3232
33from canonical.launchpad import _33from canonical.launchpad import _
34from canonical.cachedproperty import cachedproperty34from canonical.cachedproperty import cachedproperty
35from lp.app.interfaces.headings import IMajorHeadingView
35from lp.registry.browser.branding import BrandingChangeView36from lp.registry.browser.branding import BrandingChangeView
36from lp.blueprints.browser.specificationtarget import (37from lp.blueprints.browser.specificationtarget import (
37 HasSpecificationsView)38 HasSpecificationsView)
@@ -43,7 +44,7 @@
43 IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)44 IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)
44from canonical.launchpad.webapp import (45from canonical.launchpad.webapp import (
45 ApplicationMenu, GetitemNavigation, LaunchpadEditFormView,46 ApplicationMenu, GetitemNavigation, LaunchpadEditFormView,
46 LaunchpadFormView, LaunchpadView, Link, Navigation,47 LaunchpadFormView, LaunchpadView, Link, Navigation, NavigationMenu,
47 StandardLaunchpadFacets, action, canonical_url, custom_widget,48 StandardLaunchpadFacets, action, canonical_url, custom_widget,
48 enabled_with_permission)49 enabled_with_permission)
49from canonical.launchpad.webapp.batching import BatchNavigator50from canonical.launchpad.webapp.batching import BatchNavigator
@@ -69,7 +70,7 @@
69 usedfor = ISprint70 usedfor = ISprint
7071
7172
72class SprintOverviewMenu(ApplicationMenu):73class SprintOverviewMenu(NavigationMenu):
7374
74 usedfor = ISprint75 usedfor = ISprint
75 facet = 'overview'76 facet = 'overview'
@@ -154,6 +155,8 @@
154155
155 __used_for__ = ISprint156 __used_for__ = ISprint
156157
158 implements(IMajorHeadingView)
159
157 def initialize(self):160 def initialize(self):
158 self.notices = []161 self.notices = []
159 self.latest_specs_limit = 5162 self.latest_specs_limit = 5
@@ -200,7 +203,7 @@
200 dt = dt.astimezone(self.tzinfo)203 dt = dt.astimezone(self.tzinfo)
201 return dt.strftime('%Y-%m-%d')204 return dt.strftime('%Y-%m-%d')
202205
203 _local_timeformat = '%H:%M on %A, %Y-%m-%d'206 _local_timeformat = '%H:%M %Z on %A, %Y-%m-%d'
204 @property207 @property
205 def local_start(self):208 def local_start(self):
206 """The sprint start time, in the local time zone, as text."""209 """The sprint start time, in the local time zone, as text."""
207210
=== modified file 'lib/lp/blueprints/browser/sprintattendance.py'
--- lib/lp/blueprints/browser/sprintattendance.py 2009-06-25 00:00:26 +0000
+++ lib/lp/blueprints/browser/sprintattendance.py 2009-09-18 11:31:27 +0000
@@ -124,6 +124,8 @@
124124
125 field_names = ['time_starts', 'time_ends']125 field_names = ['time_starts', 'time_ends']
126126
127 label = "Register your attendance"
128
127 @property129 @property
128 def initial_values(self):130 def initial_values(self):
129 """Show committed attendance, or default to the sprint times."""131 """Show committed attendance, or default to the sprint times."""
@@ -141,6 +143,11 @@
141 time_starts, time_ends = self.getDates(data)143 time_starts, time_ends = self.getDates(data)
142 self.context.attend(self.user, time_starts, time_ends)144 self.context.attend(self.user, time_starts, time_ends)
143145
146 @property
147 def cancel_url(self):
148 """Canceling goes back to the sprint page."""
149 return canonical_url(self.context)
150
144151
145class SprintAttendanceRegisterView(BaseSprintAttendanceAddView):152class SprintAttendanceRegisterView(BaseSprintAttendanceAddView):
146 """A view used to register someone else's attendance at a sprint."""153 """A view used to register someone else's attendance at a sprint."""
147154
=== 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 @@
80Since the sprint's time zone was set to UTC, the dates are displayed in80Since the sprint's time zone was set to UTC, the dates are displayed in
81that time zone:81that time zone:
8282
83 >>> print find_portlet(user_browser.contents, 'Meeting details')83 >>> print extract_text(find_tag_by_id(user_browser.contents, 'start-end'))
84 <...84 Starts: 09:15 UTC on Tuesday, 2006-10-10
85 ...Starts:...85 Ends: 16:00 UTC on Friday, 2006-10-13
86 2006-10-10 09:15 UTC...
87 ...Ends:...
88 2006-10-13 16:00 UTC...
89 ...
90
9186
92Because this is a brand new sprint, it will have no specs, and we should see87Because this is a brand new sprint, it will have no specs, and we should see
93a warning to that effect on the page.88a warning to that effect on the page.
@@ -115,11 +110,7 @@
115 >>> user_browser.url110 >>> user_browser.url
116 'http://launchpad.dev/sprints/africa-sprint'111 'http://launchpad.dev/sprints/africa-sprint'
117112
118 >>> print find_portlet(user_browser.contents, 'Meeting details')113 >>> print extract_text(find_tag_by_id(user_browser.contents, 'start-end'))
119 <...114 Starts: 09:15 SAST on Monday, 2006-07-10
120 ...Starts:...115 Ends: 16:00 SAST on Thursday, 2006-07-13
121 2006-07-10 09:15 SAST...
122 ...Ends:...
123 2006-07-13 16:00 SAST...
124 ...
125116
126117
=== 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 @@
2available to those who have permissions to edit that sprint.2available to those who have permissions to edit that sprint.
33
4 >>> anon_browser.open('http://launchpad.dev/sprints/ubz')4 >>> anon_browser.open('http://launchpad.dev/sprints/ubz')
5 >>> anon_browser.title5 >>> print anon_browser.title
6 'Ubuntu Below Zero (sprint or meeting)'6 Ubuntu Below Zero : Meetings
77
8 >>> anon_browser.getLink('Change details')8 >>> anon_browser.getLink('Change details')
9 Traceback (most recent call last):9 Traceback (most recent call last):
@@ -15,8 +15,8 @@
15 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')15 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
1616
17 >>> browser.open('http://launchpad.dev/sprints/ubz')17 >>> browser.open('http://launchpad.dev/sprints/ubz')
18 >>> browser.title18 >>> print browser.title
19 'Ubuntu Below Zero (sprint or meeting)'19 Ubuntu Below Zero : Meetings
2020
21 >>> address = 'Holiday Inn Select, Downtown Montreal, Canada'21 >>> address = 'Holiday Inn Select, Downtown Montreal, Canada'
22 >>> address in browser.contents22 >>> address in browser.contents
@@ -64,19 +64,14 @@
64 'http://launchpad.dev/sprints/ubz'64 'http://launchpad.dev/sprints/ubz'
6565
6666
67The address of the sprint is now visible in the sprint details portlet.67The address of the sprint is now visible.
6868
69 >>> details_portlet = find_portlet(browser.contents, 'Meeting details')69 >>> print extract_text(find_tag_by_id(browser.contents, 'sprint-address'))
70 >>> address in details_portlet.renderContents()70 Address: Holiday Inn Select, Downtown Montreal, Canada
71 True71
7272 >>> print extract_text(find_tag_by_id(browser.contents, 'start-end'))
73 >>> print details_portlet73 Starts: 08:30 EST on Tuesday, 2006-01-10
74 <...74 Ends: 17:00 EST on Sunday, 2006-02-12
75 ...Starts:...
76 2006-01-10 08:30 EST...
77 ...Ends:...
78 2006-02-12 17:00 EST...
79 ...
8075
8176
82If we just change the time zone on the edit form, the start and finish77If we just change the time zone on the edit form, the start and finish
@@ -88,11 +83,7 @@
88 >>> print browser.url83 >>> print browser.url
89 http://launchpad.dev/sprints/ubz84 http://launchpad.dev/sprints/ubz
9085
91 >>> print find_portlet(browser.contents, 'Meeting details')86 >>> print extract_text(find_tag_by_id(browser.contents, 'start-end'))
92 <...87 Starts: 08:30 CST on Tuesday, 2006-01-10
93 ...Starts:...88 Ends: 17:00 CST on Sunday, 2006-02-12
94 2006-01-10 08:30 CST...
95 ...Ends:...
96 2006-02-12 17:00 CST...
97 ...
9889
9990
=== modified file 'lib/lp/blueprints/stories/sprints/20-sprint-registration.txt'
--- lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-07-23 17:49:31 +0000
+++ lib/lp/blueprints/stories/sprints/20-sprint-registration.txt 2009-09-18 11:31:27 +0000
@@ -10,8 +10,8 @@
10 >>> browser.url10 >>> browser.url
11 'http://launchpad.dev/sprints/ubz/+attend'11 'http://launchpad.dev/sprints/ubz/+attend'
1212
13 >>> browser.title13 >>> print browser.title
14 'Register your attendance at Ubuntu Below Zero'14 +attend : Ubuntu Below Zero : Meetings
1515
16Invalid dates, for instance entering a starting date after the ending date,16Invalid dates, for instance entering a starting date after the ending date,
17are reported as errors to the users. (See also the tests in17are reported as errors to the users. (See also the tests in
1818
=== 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 @@
55 'http://launchpad.dev/sprints/uds-guacamole'55 'http://launchpad.dev/sprints/uds-guacamole'
5656
57 >>> ut = 'Ubuntu Team'57 >>> ut = 'Ubuntu Team'
58 >>> meeting_portlet = find_portlet(browser.contents, 'Meeting details')58 >>> meeting_drivers = find_tag_by_id(browser.contents, 'meeting-drivers')
59 >>> ut in extract_text(meeting_portlet.find(text='Driver:').findNext('a'))59 >>> ut in extract_text(meeting_drivers.findNext('a'))
60 True60 True
6161
62Any member of the Ubuntu-Team can now approve and/or decline items to the UDS 62Any member of the Ubuntu-Team can now approve and/or decline items to the UDS
6363
=== modified file 'lib/lp/blueprints/templates/sprint-attend.pt'
--- lib/lp/blueprints/templates/sprint-attend.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprint-attend.pt 2009-09-18 11:31:27 +0000
@@ -3,10 +3,7 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
129
@@ -16,17 +13,10 @@
16 use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" />13 use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" />
17 </metal:block>14 </metal:block>
1815
19<metal:portlets fill-slot="portlets">
20 <div tal:replace="structure context/@@+portlet-details" />
21 <div tal:replace="structure context/@@+portlet-attendees" />
22</metal:portlets>
23
24<div metal:fill-slot="main">16<div metal:fill-slot="main">
2517
26 <div metal:use-macro="context/@@launchpad_form/form">18 <div metal:use-macro="context/@@launchpad_form/form">
2719
28 <h1 metal:fill-slot="heading">Register your attendance</h1>
29
30 <div metal:fill-slot="extra_info" class="documentDescription">20 <div metal:fill-slot="extra_info" class="documentDescription">
31 Indicate the times during which you will be available for meetings at21 Indicate the times during which you will be available for meetings at
32 the sprint. The sprint runs from22 the sprint. The sprint runs from
@@ -37,16 +27,16 @@
3727
38 </div>28 </div>
3929
40</div>30 <p class="aside">
4131 Note: Please be as accurate as possible with the time that you will
42<div metal:fill-slot="help">32 arrive and depart from the conference or sprint venue. This allows the
43<p>33 event organisers to schedule the sessions knowing who can attend at
44 Please be as accurate as possible with the time that you will arrive and34 various times on the opening and closing day.
45 depart from the conference or sprint venue. This allows the event organisers35 </p>
46 to schedule the sessions knowing who can attend at various times on the36
47 opening and closing day.37</div>
48</p>38
49</div>39
5040
51</body>41</body>
52</html>42</html>
5343
=== modified file 'lib/lp/blueprints/templates/sprint-index.pt'
--- lib/lp/blueprints/templates/sprint-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprint-index.pt 2009-09-18 10:49:12 +0000
@@ -3,112 +3,126 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_side"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
129
13<body>10<body>
1411
15<metal:portlets fill-slot="portlets">12<tal:registering metal:fill-slot="registering">
16 <div tal:replace="structure context/@@+portlet-details" />13 <p>Registered by <a tal:replace="structure context/owner/fmt:link" />
17 <div tal:replace="structure context/@@+portlet-attendees" />14 on <span tal:content="context/datecreated/fmt:displaydate"
18</metal:portlets>15 tal:attributes="title context/datecreated/fmt:datetime"
16 >on 2005-01-01</span>
17 </p>
18</tal:registering>
1919
20<div metal:fill-slot="main"20<div metal:fill-slot="main"
21 tal:define="specs view/specs;21 tal:define="specs view/specs;
22 has_any_specs view/has_any_specifications">22 has_any_specs view/has_any_specifications">
2323
24 <tal:mugshot replace="structure context/image:mugshot" />24 <div class="top-portlet">
25 <h1>Meeting overview</h1>25 <h2>Meeting overview</h2>
2626
27 <p>
28 <strong>
29 <tal:start replace="view/local_start" /> till
30 <tal:end replace="view/local_end" />
31 </strong>
32 </p>
33
34 <p>
35 <span tal:replace="context/summary">
36 Sprint Summary Goes Here
37 </span>
38 <tal:has_homepage condition="context/home_page">
39 <img src="/@@/meeting" />
40 <a tal:attributes="href context/home_page">
41 View the Meeting Home Page
42 </a>
43 </tal:has_homepage>
44 </p>
45
46 <tal:no_specifications_at_all condition="not: has_any_specs">
47 <p>27 <p>
48 Nobody has yet proposed any blueprints for discussion at this sprint.28 <span tal:replace="context/summary">
49 If you will be attending the sprint you should make sure that the29 Sprint Summary Goes Here
50 blueprints you are interested in discussing get nominated for the30 </span>
51 agenda. You can do this using the "Propose for meeting agenda" action31 <tal:has_homepage condition="context/home_page">
52 link on the blueprint page.32 <img src="/@@/meeting" />
33 <a tal:attributes="href context/home_page">
34 View the Meeting Home Page
35 </a>
36 </tal:has_homepage>
53 </p>37 </p>
5438
39 <dl id="start-end">
40 <dt>Starts:</dt>
41 <dd><tal:start replace="view/local_start" /></dd>
42 <dt>Ends:</dt>
43 <dd><tal:start replace="view/local_end" /></dd>
44 </dl>
45
46 <dl id="sprint-address" tal:condition="context/address">
47 <dt>Address:</dt>
48 <dd><span tal:replace="context/address" /></dd>
49 </dl>
50
51 <dl id="meeting-drivers">
52 <dt>Meeting drivers:</dt>
53 <dd tal:repeat="driver context/drivers" style="margin-bottom:0.2em">
54 <span tal:replace="structure driver/fmt:link" />
55 </dd>
56 </dl>
57
55 <p>58 <p>
56 Each meeting has a person, or team, responsible for deciding which59 Each meeting has a person, or team, responsible for deciding which
57 items are accepted for the agenda. This team is called the "meeting60 items are accepted for the agenda. This team is called the "meeting
58 driver" and for <tal:meeting replace="context/title" /> they are:61 driver" and for <tal:meeting replace="context/title" /> they are:
59 </p>62 </p>
6063
61 <ul>
62 <li class="person" tal:repeat="driver context/drivers">
63 <a tal:attributes="href driver/fmt:url"
64 tal:content="driver/displayname" />
65 </li>
66 </ul>
67
68 <p>64 <p>
69 You should contact the meeting driver if you have any additional65 You should contact the meeting driver if you have any additional
70 questions about the structure or agenda of the meeting.66 questions about the structure or agenda of the meeting.
71 </p>67 </p>
7268 </div>
73 </tal:no_specifications_at_all>69
7470 <div class="portlet">
75 <tal:some_specs_nominated condition="has_any_specs">71 <h2>Blueprints</h2>
7672 <tal:no_specifications_at_all condition="not: has_any_specs">
77 <p tal:condition="not:specs">
78 No blueprints are yet approved for discussion at
79 <span tal:replace="context/title">Ubuntu Below Zero</span>.
80 If you are one of the meeting drivers you should review the proposed
81 blueprint list and accept those topics you wish to show up on the
82 agenda for the meeting.
83 </p>
84
85 <tal:approved_specs condition="specs">
86
87 <h2>Latest <span tal:replace="view/latest_specs_limit">5</span>
88 additions to the meeting agenda</h2>
89
90 <table>
91 <div tal:repeat="spec view/latest_approved"
92 tal:replace="structure spec/@@+listing-simple"
93 />
94 </table>
95
96 <p>73 <p>
97 There are a total of <span tal:replace="view/count">5</span>74 Nobody has yet proposed any blueprints for discussion at this sprint.
98 specifications on the meeting agenda.75 If you will be attending the sprint you should make sure that the
99 <tal:proposed define="proposed view/proposed_count"76 blueprints you are interested in discussing get nominated for the
100 condition="proposed">77 agenda. You can do this using the "Propose for meeting agenda" action
101 There are <span tal:replace="proposed">7</span>78 link on the blueprint page.
102 specifications 79 </p>
103 <a tal:omit-tag="not: context/required:launchpad.Driver" href="+settopics">80
104 proposed81 </tal:no_specifications_at_all>
105 </a> which the organisers will review.82
106 </tal:proposed>83 <tal:some_specs_nominated condition="has_any_specs">
107 You can view the <a href="+specs">full current agenda here</a>.84
108 </p>85 <p tal:condition="not:specs">
109 </tal:approved_specs>86 No blueprints are yet approved for discussion at
110 </tal:some_specs_nominated>87 <span tal:replace="context/title">Ubuntu Below Zero</span>.
11188 If you are one of the meeting drivers you should review the proposed
89 blueprint list and accept those topics you wish to show up on the
90 agenda for the meeting.
91 </p>
92
93 <tal:approved_specs condition="specs">
94
95 <h2>Latest <span tal:replace="view/latest_specs_limit">5</span>
96 additions to the meeting agenda</h2>
97
98 <table>
99 <div tal:repeat="spec view/latest_approved"
100 tal:replace="structure spec/@@+listing-simple"
101 />
102 </table>
103
104 <p>
105 There are a total of <span tal:replace="view/count">5</span>
106 specifications on the meeting agenda.
107 <tal:proposed define="proposed view/proposed_count"
108 condition="proposed">
109 There are <span tal:replace="proposed">7</span>
110 specifications
111 <a tal:omit-tag="not: context/required:launchpad.Driver" href="+settopics">
112 proposed
113 </a> which the organisers will review.
114 </tal:proposed>
115 You can view the <a href="+specs">full current agenda here</a>.
116 </p>
117 </tal:approved_specs>
118 </tal:some_specs_nominated>
119 </div> <!-- class="portlet" -->
112</div>120</div>
121
122<tal:side metal:fill-slot="side">
123 <tal:menu replace="structure context/@@+global-actions" />
124 <div tal:replace="structure context/@@+portlet-attendees" />
125</tal:side>
126
113</body>127</body>
114</html>128</html>