CONTEXTS/fmt:pagetitle is dependent on lib/c/l/pagetitles.py, which we
want to get rid of. The preferred way to move the <h1> out of the template
is to add a view.label attribute. Since, the BuildView is shared by both
build-index.pt and build-retry.pt, subclasses would need to be created to
provide them with the distinct label properties that match the build_index
and build_retry variables, which need to be removed from lib/c/l/pagetitles.py.
Hi Celso,
This branch looks like a nice improvement. Just a couple of comments below.
merge-conditional
-Edwin
>=== modified file 'lib/lp/ app/browser/ tests/base- layout. txt' app/browser/ tests/base- layout. txt 2009-09-12 01:39:04 +0000 app/browser/ tests/base- layout. txt 2009-09-16 20:19:40 +0000 registering" > www.w3. org/1999/ xhtml"> registering" > www.w3. org/1999/ xhtml"> registering" > www.w3. org/1999/ xhtml"> (LaunchpadView) : facetname_ _ = 'overview' eFile(' testfiles/ main-registerin g.pt')
>--- lib/lp/
>+++ lib/lp/
>@@ -93,7 +93,10 @@
> ...
> <div class="yui-b" dir="ltr">
> <div>
>- <h2>Heading</h2>
>+ <div class="
>+ <div />
>+ </div>
>+ <h2>Heading</h2>
> <ol class="breadcrumbs" xmlns="http://
> ...
>
>@@ -189,6 +192,9 @@
> <BLANKLINE>
> <div class="yui-b" dir="ltr">
> <div>
>+ <div class="
>+ <div />
>+ </div>
> <BLANKLINE>
> <ol class="breadcrumbs" xmlns="http://
> <BLANKLINE>
>@@ -307,6 +313,9 @@
> <BLANKLINE>
> <div class="yui-b" dir="ltr">
> <div>
>+ <div class="
>+ <div />
>+ </div>
> <BLANKLINE>
> <ol class="breadcrumbs" xmlns="http://
> <BLANKLINE>
>@@ -463,6 +472,34 @@
> <h1>Heading</h1>
>
>
>+Page registering
>+----------------
>+
>+The 'registering' slot is presented on the right side of the 'heading'
>+and can be filled with the context registering information (registrant
>+and date_created, normally).
>+
>+ >>> class RegisteringView
>+ ... """A simple view to test base-layout."""
>+ ... __launchpad_
>+ ... template = ViewPageTemplat
>+ ... page_title = 'Test base-layout: registering'
What is the purpose of this page_title variable that doesn't appear to be used
anywhere?
>+ (user, request) launchpad. testing. pages import ( by_class( html, 'registering') registering" > ------- ------- ------- --- app/browser/ tests/testfiles /main-registeri ng.pt' app/browser/ tests/testfiles /main-registeri ng.pt 1970-01-01 00:00:00 +0000 app/browser/ tests/testfiles /main-registeri ng.pt 2009-09-16 20:19:40 +0000 www.w3. org/1999/ xhtml" xml.zope. org/namespaces/ tal" xml.zope. org/namespaces/ metal" xml.zope. org/namespaces/ i18n" macro=" view/macro: page/main_ only"> slot="registeri ng"> slot="main" > soyuz/templates /build- index.pt' soyuz/templates /build- index.pt 2009-09-16 12:31:06 +0000 soyuz/templates /build- index.pt 2009-09-16 20:19:40 +0000 slot="heading" > "CONTEXTS/ fmt:pagetitle" >i386 build of "title context/ datecreated/ fmt:datetime" "context/ datecreated/ fmt:displaydate "
>+ >>> view = RegisteringView
>+ >>> html = view.render()
>+
>+ >>> from canonical.
>+ ... first_tag_by_class)
>+
>+ >>> print first_tag_
>+ <div class="
>+ <p>something nice about the context registering.</p>
>+ </div>
>+
>+Note that the slot itself will be already 'styled' and it rarely has
>+to be changed.
>+
>+
> Public and private presentation
> -------
>
>
>=== added file 'lib/lp/
>--- lib/lp/
>+++ lib/lp/
>@@ -0,0 +1,19 @@
>+<html
>+ xmlns="http://
>+ xmlns:tal="http://
>+ xmlns:metal="http://
>+ xmlns:i18n="http://
>+ metal:use-
>+
>+ <body>
>+
>+ <tal:registering metal:fill-
>+ <p>something nice about the context registering.</p>
>+ </tal:registering>
>+
>+ <tal:main metal:fill-
>+ ANYTHING
>+ </tal:main>
>+
>+ </body>
>+</html>
>
>=== modified file 'lib/lp/
>--- lib/lp/
>+++ lib/lp/
>@@ -10,19 +10,18 @@
> <body>
>
> <div metal:fill-
>- <div style="float: left;">
> <h1 tal:content=
> alsa-utils 1.0.9a-4ubuntu1 in ubuntu hoary RELEASE</h1>
>- </div>
>- <div style="float: right;">
>- <p class="discreet">
>- Created <span
>- tal:attributes=
>- tal:content=
>- >2005-10-05 5:45</span>
>+ </div> <!-- heading -->
CONTEXTS/ fmt:pagetitle is dependent on lib/c/l/ pagetitles. py, which we pagetitles. py.
want to get rid of. The preferred way to move the <h1> out of the template
is to add a view.label attribute. Since, the BuildView is shared by both
build-index.pt and build-retry.pt, subclasses would need to be created to
provide them with the distinct label properties that match the build_index
and build_retry variables, which need to be removed from lib/c/l/
>+ slot="registeri ng"> "context/ datecreated/ fmt:displaydate " "title context/ datecreated/ fmt:datetime" slot="main" >
>+ <tal:registering metal:fill-
>+ <p>
>+ created
>+ <span tal:content=
>+ tal:attributes=
>+ >on 2005-01-01</span>
> </p>
>- </div>
>- </div> <!-- heading -->
>+ </tal:registering>
>
> <div metal:fill-
>
>