Hi Brad. This is very nice. I think we should tweak the layout a bit before landing this. I explain XMLLint's spazzing below. > === modified file 'lib/canonical/launchpad/icing/style-3-0.css' > --- lib/canonical/launchpad/icing/style-3-0.css 2009-08-17 11:22:39 +0000 > +++ lib/canonical/launchpad/icing/style-3-0.css 2009-08-17 20:36:01 +0000 ... > @@ -581,6 +581,10 @@ > border-top: 1px solid #d0d0d0; > border-bottom: 1px solid #d0d0d0; > } > +.announcement .registered { > + font-size: 95%; This is not a support font-size you must use one of the percentages from the table to guarantee that they display the same on all platforms. font-size: 93%; is official. > + margin-top: -2px Missing semi-colon. + } ... > === modified file 'lib/lp/registry/browser/announcement.py' > --- lib/lp/registry/browser/announcement.py 2009-08-11 04:00:47 +0000 > +++ lib/lp/registry/browser/announcement.py 2009-08-17 20:36:01 +0000 ... > @@ -70,6 +69,12 @@ > text = 'Delete announcement' > return Link('+delete', text, icon='trash-icon') > > + @enabled_with_permission('launchpad.Edit') > + def announce(self): > + text = 'Make announcement' > + summary = 'Publish an item of news for this project' > + return Link('+announce', text, summary, icon='add') We use publish to describe the act of making public, not creating. ... > @@ -100,6 +105,19 @@ > self.context = context > > > +class IAnnouncementCreateMenu(Interface): > + """A marker interface for creation announcement navigation menu.""" > + > + > +class AnnouncementCreateNavigationMenu(NavigationMenu, AnnouncementMenuMixin): > + """A sub-menu for different aspects of modifying an announcement.""" > + > + usedfor = IAnnouncementCreateMenu > + facet = 'overview' > + title = 'Create announcement' > + links = ('announce', )xmlns:tal="http://xml.zope.org/namespaces/tal" Menus assume that links are a mutable list. This works, but may lead to cryptic errors if someone extends the menu, ... > === modified file 'lib/lp/registry/stories/announcements/xx-announcements.txt' > --- lib/lp/registry/stories/announcements/xx-announcements.txt 2009-08-13 18:10:15 +0000 > +++ lib/lp/registry/stories/announcements/xx-announcements.txt 2009-08-17 20:36:01 +0000 ... > @@ -418,47 +419,16 @@ > Editing announcements > --------------------- ... > -If you have the necessary privileges you will see links to edit the > -announcements. > +To edit an announcement you must go to the individual announcement > +page and then follow the proper links. Me? I am not doing anything. I think No Privileges Person is doing this. > >>> priv_browser.open('http://launchpad.dev/tomcat/+announcements') > - >>> listed_announcements = find_tag_by_id( > - ... priv_browser.contents, 'announcements') > - >>> edit_links = listed_announcements.fetch('a', text=edit_link_text) > - >>> len(edit_links) > - 2 > - > -Following a link takes you to a form where you can change the headline, > -summary and URL of the announcement: > - > - >>> 'Modified headline' not in announcements(priv_browser.contents) > - True > - >>> 'Modified summary' not in announcements(priv_browser.contents) > - True > >>> print priv_browser.getLink('Read more').url > http://apache.org/announcement/rocking/ > - >>> priv_browser.getLink(edit_link_text).click() > + >>> priv_browser.getLink('Apache announcement headline').click() > + >>> priv_browser.getLink('Modify announcement').click() > >>> print priv_browser.url > - http://launchpad.dev/apache/+announcement/... > + http://launchpad.dev/apache/+announcement/.../+edit I think the user cares about the title, not the url. ... > === modified file 'lib/lp/registry/templates/announcement-listing-detailed.pt' > --- lib/lp/registry/templates/announcement-listing-detailed.pt 2009-07-17 17:59:07 +0000 > +++ lib/lp/registry/templates/announcement-listing-detailed.pt 2009-08-17 20:36:01 +0000 > @@ -1,59 +1,47 @@ You are missing xmlns:tal="http://xml.zope.org/namespaces/tal" i18n:domain="launchpad" in the root element, which xmllint considers to be heresy. ... > +
I do not believe this is a valid id in XML/CSS. An id must start with a letter you can use tal:attributes="id context/id/fmt:css-id" to guarantee a valid id. > +
> + > +

> + > + : > + > + News item title > +

> +
Th anchor element cannot contain a block element. The anchor must go inside the

. I could not see this was a link. maybe it is not important since we have read more below. > +

> + Written for > + > + by > + . > +

> + > + + tal:replace="structure context/summary/fmt:text-to-html" /> Is this guaranteed to make a block-element? I do not think it does, which will lead to unpredictable spacing. You should wrap this in a
. /me looks. No. place this in a div to ensure inline content does not mix with block content. > +

+ + + + + This announcement will be published on + . + + + + + + Retracted. + + + No publishing date set. + + + Updated + . + + + Link Read more This does not look right. We use sprites. The icon used is for offsite links which these announcements are not. Maybe we need an new sprite for announcement. I think we should report a bug and assign it to Martin. ... > === modified file 'lib/lp/registry/templates/hasannouncements-index.pt' > --- lib/lp/registry/templates/hasannouncements-index.pt 2009-07-17 17:59:07 +0000 > +++ lib/lp/registry/templates/hasannouncements-index.pt 2009-08-17 20:36:01 +0000 > @@ -3,53 +3,73 @@ > xmlns:tal="http://xml.zope.org/namespaces/tal" > xmlns:metal="http://xml.zope.org/namespaces/metal" > xmlns:i18n="http://xml.zope.org/namespaces/i18n" ... > + metal:use-macro="view/macro:page/main_side" > + i18n:domain="launchpad"> > + > + > + > + > + > + > + > +

News and announcements

> + > + > +
> +

> + There are no announcements for this project. > +

This page looks like it is missing something. The announcement top-border is under the

, separating the content from the heading. We can fix this either by adding an explanatory paragraph about this page or we add a rule... > +
+ id="announcements"> > + + repeat="announcement view/announcement_nav/currentBatch" > + replace="structure announcement/@@+listing-detailed" /> ... here to set set the class of the first announcement to top-portlet. > +
> +
+ tal:content="structure view/announcement_nav/@@+navigation-links-lower" > + /> > +
> + > + + define="announcements view/announcement_nav/currentBatch; > + overview_menu context/menu:overview"> I do not think you use an overview_menu. > + > + > +
> +

> + Do we have a class="right"? No I guess not. This is fine I think > + + tal:attributes="href view/feed_url"> > + > + Announcements > +

> + > +

> + has no announcements. > +

I think this is stated in the main content. We should not need this. > + This condition can be moved into the
    > +
      > +
    • > + [Not published] + title="This is not yet a public announcement" > + tal:condition="not: announcement/published" /> > + + tal:content="announcement/title"> > + Announcement title > + > + + tal:condition="announcement/date_announced" > + tal:content="announcement/date_announced/fmt:displaydate" /> > +
      > +
      Two
      in a row is a classic symptom implementation flaw. If you want a block element use one. In this case I don't think either is needed. We can look at adjusting the padding or margins of the
    • /me looks Yes too much space no more than 0.5em; should separate list items. A full em (or more than that in this case) breaks the list. Try: margin-bottom: .5em; on the
    • . It is better to have than in the stylesheet if we can isolate the rule > +
    • > +
    > + > +
> +
> +