Merge lp:~salgado/launchpad/three-o into lp:launchpad
- three-o
- Merge into devel
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~salgado/launchpad/three-o |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~salgado/launchpad/three-o |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | Approve | ||
Martin Albisetti (community) | ui | Needs Fixing | |
Canonical Launchpad Engineering | Pending | ||
Review via email: mp+9977@code.launchpad.net |
Commit message
Description of the change
Guilherme Salgado (salgado) wrote : | # |
Martin Albisetti (beuno) wrote : | # |
Hi Salgado,
This branch looks like the future, thank you for working on it. It looks great.
I have a few small nitpicks:
- As mentioned on IRC, the "Project group information" section is huge
- In "Top contributors", the "more contributors" should be on the top right of that section, as per the 3.0 design
- Same for questions
- The "Register another project that is part of the Mozilla Project" link looks out of place. We should try and shorten it to maybe: (drop the >>) "(+) Register another project in Mozilla Project", and maybe float the link to the right
That's all I have. This is going to be a great landing.
Guilherme Salgado (salgado) wrote : | # |
On Tue, 2009-08-11 at 18:15 +0000, Martin Albisetti wrote:
> Review: Needs Fixing ui
> Hi Salgado,
>
> This branch looks like the future, thank you for working on it. It looks great.
>
> I have a few small nitpicks:
>
> - As mentioned on IRC, the "Project group information" section is huge
Yeah, that'll be fixed.
> - In "Top contributors", the "more contributors" should be on the top
> right of that section, as per the 3.0 design
> - Same for questions
But this would make it inconsistent with what we have in the new project
page, no? Maybe we should change it in both?
> - The "Register another project that is part of the Mozilla Project"
> link looks out of place. We should try and shorten it to maybe: (drop
> the >>) "(+) Register another project in Mozilla Project", and maybe
> float the link to the right
I'll fix this too.
>
> That's all I have. This is going to be a great landing.
Thanks!
--
Guilherme Salgado <email address hidden>
Martin Albisetti (beuno) wrote : | # |
> On Tue, 2009-08-11 at 18:15 +0000, Martin Albisetti wrote:
> > - In "Top contributors", the "more contributors" should be on the top
> > right of that section, as per the 3.0 design
> > - Same for questions
>
> But this would make it inconsistent with what we have in the new project
> page, no? Maybe we should change it in both?
Yes, it should be that way in both.
Curtis Hovey (sinzui) wrote : | # |
On Tue, 2009-08-11 at 18:15 +0000, Martin Albisetti wrote:
> Review: Needs Fixing ui
> Hi Salgado,
>
> This branch looks like the future, thank you for working on it. It
> looks great.
>
> I have a few small nitpicks:
>
> - As mentioned on IRC, the "Project group information" section is huge
I am preparing an exmaple of how this could be fixed
> - In "Top contributors", the "more contributors" should be on the top
> right of that section, as per the 3.0 design
These are fixed in the tree or are landing. PQM is stuck. When the
project page lands (maybe in a few hours) all the code will be
available.
> - Same for questions
Same as above
> - The "Register another project that is part of the Mozilla Project"
> link looks out of place. We should try and shorten it to maybe: (drop
> the >>) "(+) Register another project in Mozilla Project", and maybe
> float the link to the right
All links need icon and we render with fmt:link
--
__Curtis C. Hovey_________
http://
Curtis Hovey (sinzui) wrote : | # |
On Tue, 2009-08-11 at 19:12 +0000, Martin Albisetti wrote:
> > On Tue, 2009-08-11 at 18:15 +0000, Martin Albisetti wrote:
> > > - In "Top contributors", the "more contributors" should be on the top
> > > right of that section, as per the 3.0 design
> > > - Same for questions
> >
> > But this would make it inconsistent with what we have in the new project
> > page, no? Maybe we should change it in both?
> Yes, it should be that way in both.
They cannot be until all pillars are converted. They design breaks other
pages that share the portlets. I am doing distributions. I will have a
design for you on Wednesday.
--
__Curtis C. Hovey_________
http://
Curtis Hovey (sinzui) wrote : | # |
Hi Guilherme.
This is a very promising start. I have several suggestions to improve
this branch based on code that final revision of the project page. I
stole some code to express my ideas. I am certain none of it works.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -6,24 +6,22 @@
> xml:lang="en"
> lang="en"
> dir="ltr"
> - metal:use-
> + metal:use-
onecolumn is 2.0. use the replacement macro
metal:
...
> +<div metal:fill-
> +
> + <div style="float:right" id="floating-links"
> + tal:define="menu context/
> + <div tal:define="link menu/branch_
> + tal:condition=
> + tal:content=
> + </div>
This is 2.0 style. We do not want to float admin links the to side. They
may be in the content or in the side portlet as an action menu. Since this
page does not have side portlet, I think we can work this into the content
above the branch listing...
> <h1>Bazaar branches for <tal:project-name replace=
...Something like this before the listing.
<p>
Branches are <tal:visibility replace="magic command to get value" />
by default.
<a tal:replace=
</p>
...
> <tal:branchlisting content="structure branches/
...
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
...
@@ -220,19 +215,39 @@
...
> +class ProjectActionMe
> +
> + usedfor = IProjectActionMenu
> + facet = 'overview'
> + title = 'Action menu'
> + links = ('subscribe', 'edit', 'administer')
> +
> + # XXX: salgado, 2009-08-10: This should be shown in the +index page of the
> + # project's bugs facet, but that would require too much work and I just
> + # want to convert this page to 3.0, so I'll leave it here for now.
> def subscribe(self):
> text = 'Subscribe to bug mail'
> return Link('+subscribe', text, icon='edit')
Do we need a bug number for this XXX. I am tempted to say we want to do to
define two clean up tasks for links and menus:
1. Define all links in mixins so that we are certain there is a single
definition. Menus *must* use the mixin instead of define their own
links.
2. Make menu mixins for interfaces such as IPillar and
...
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
...
> +<div id="portlet-
> + <table class="summary" tal:define=
Guilherme Salgado (salgado) wrote : | # |
On Tue, 2009-08-11 at 20:37 +0000, Curtis Hovey wrote:
> Review: Needs Fixing code
> Hi Guilherme.
>
> This is a very promising start. I have several suggestions to improve
> this branch based on code that final revision of the project page. I
> stole some code to express my ideas. I am certain none of it works.
>
>
> > === modified file 'lib/lp/
> > --- lib/lp/
> > +++ lib/lp/
> > @@ -6,24 +6,22 @@
> > xml:lang="en"
> > lang="en"
> > dir="ltr"
> > - metal:use-
> > + metal:use-
>
> onecolumn is 2.0. use the replacement macro
> metal:use-
Right, this is because I didn't mean to upgrade this to 3.0 -- I just
wanted to make it look like product-branches.pt so that I could float
the 'subscribe to branches' link to the top right. For projects, this
link is currently shown in the action menu of the +index page and I had
to move it somewhere else.
>
> ...
>
> > +<div metal:fill-
> > +
> > + <div style="float:right" id="floating-links"
> > + tal:define="menu context/
> > + <div tal:define="link menu/branch_
> > + tal:condition=
> > + tal:content=
> > + </div>
>
> This is 2.0 style. We do not want to float admin links the to side. They
> may be in the content or in the side portlet as an action menu. Since this
> page does not have side portlet, I think we can work this into the content
> above the branch listing...
>
> > <h1>Bazaar branches for <tal:project-name replace=
>
> ...Something like this before the listing.
>
> <p>
> Branches are <tal:visibility replace="magic command to get value" />
> by default.
> <a tal:replace=
> </p>
I could do that, but I think it's important that product-branches.pt is
updated at the same time, to make sure they're consistent. I'd also have
to get this past UI review, which might delay this branch -- that's the
reason why I didn't try converting it to 3.0
>
> ...
>
> > <tal:branchlisting content="structure branches/
>
> ...
>
> > === modified file 'lib/lp/
> > --- lib/lp/
> > +++ lib/lp/
>
> ...
>
> @@ -220,19 +215,39 @@
>
> ...
>
> > +class ProjectActionMe
> > +
> > + usedfor = IProjectActionMenu
> > + facet = 'overview'
> > + title = 'Action menu'
> > + links = ('subscribe', 'edit', 'administer')
> > +
> > + # XXX: salgado, 2009-08-10: This should be shown in the +index page of the
> > + # project's bugs facet, but that would require too much work and I just
> > + # want to convert this page to 3.0, so I'll leave it here for now.
> > def subscribe(self):
> > text = 'S...
Curtis Hovey (sinzui) wrote : | # |
Hi Salgado.
Thanks for making the revisions. Your series and milestone fix is great.
I have a few suggests before you land this. In general, I think we need
this landed, so we should report bugs for issues we do not want to fix
in this branch.
review approve
...
> <ul tal:condition=
> <li>
> <a rel="nofollow"
> tal:attributes=
> class string:sprite external-link">
> <strong>Visit the <tal:name replace=
> home page »</strong>
> </a>
> </li>
> </ul>
This is not the same presentation as is on the project page.
/me steals from product-index.pt
<ul id="external-links" class="horizontal"
<li tal:condition=
<a id="homepageurl
</li>
</ul>
...
> <div class="discreet" style="text-align: right"
> tal:content=
I think this still looks wrong. We can include in in the external links list
above or move it into the project group information portlet.
...
<div class="yui-u" id="products">
<div class="portlet">
This new presentation is great.
> <ul class="horizontal" style="float: right"
> tal:condition=
> <li>
> <a tal:replace=
> </li>
> </ul>
We should not be floating content anymore. This list should not render
if the link does not render.
<ul class="horizontal"
<li>
<a tal:replace=
</li>
</ul>
...
> <div class="yui-g">
> <div class="yui-u first">
> <tal:bugs content="structure context/
> <tal:specs content="structure context/
> <tal:sprints content="structure context/
> </div>
> <div class="yui-u">
> <tal:questions content="structure context/
> <tal:contributors content="structure context/
> </div>
I think we may adjust this. The list of project and series and can be very
long. We may want questions moved to the left column,
...
> <div id="involvement" class="portlet involvement"
> tal:condition=
> <h2>Get Involved</h2>
> <ul>
> <li>
> <a class="bugs"
> tal:attributes=
> </li>
> <li>
> <a class="question"
> tal:attributes=
Guilherme Salgado (salgado) wrote : | # |
On Wed, 2009-08-12 at 15:33 +0000, Curtis Hovey wrote:
> Review: Approve
> Hi Salgado.
>
> Thanks for making the revisions. Your series and milestone fix is great.
> I have a few suggests before you land this. In general, I think we need
> this landed, so we should report bugs for issues we do not want to fix
> in this branch.
>
Cool, thanks!
> review approve
>
> ...
>
> > <ul tal:condition=
> > <li>
> > <a rel="nofollow"
> > tal:attributes=
> > class string:sprite external-link">
> > <strong>Visit the <tal:name replace=
> > home page »</strong>
> > </a>
> > </li>
> > </ul>
>
> This is not the same presentation as is on the project page.
> /me steals from product-index.pt
>
> <ul id="external-links" class="horizontal"
> tal:condition=
> <li tal:condition=
> <a id="homepageurl
> rel="nofollow"
> tal:attributes=
> </li>
> </ul>
Fixed
>
>
> ...
>
> > <div class="discreet" style="text-align: right"
> > tal:content=
>
> I think this still looks wrong. We can include in in the external links list
> above or move it into the project group information portlet.
I think I prefer moving it to the -details portlet.
But that doesn't look nice -- see the screenshot attached.
>
> ...
>
> <div class="yui-u" id="products">
> <div class="portlet">
> <h2>Projects</h2>
>
> This new presentation is great.
>
> > <ul class="horizontal" style="float: right"
> > tal:condition=
> > <li>
> > <a tal:replace=
> > </li>
> > </ul>
>
> We should not be floating content anymore. This list should not render
> if the link does not render.
I removed the float:right from there, but I don't see what you mean by
not rendering the list -- the <ul> is conditional on the link being
enabled, so everything else is too.
>
> <ul class="horizontal"
> tal:condition=
> <li>
> <a tal:replace=
> </li>
> </ul>
> ...
>
> > <div class="yui-g">
> > <div class="yui-u first">
> > <tal:bugs content="structure context/
> > <tal:specs content="structure context/
> > <tal:sprints content="structure context/
> > </div>
> > <div class="yui-u">
> > <tal:questions content="structure context/
> > <tal:contributors content="structure context/
Curtis Hovey (sinzui) wrote : | # |
On Wed, 2009-08-12 at 18:00 +0000, Guilherme Salgado wrote:
> On Wed, 2009-08-12 at 15:33 +0000, Curtis Hovey wrote:
...
> > > <div class="discreet" style="text-align: right"
> > > tal:content=
> >
> > I think this still looks wrong. We can include in in the external links list
> > above or move it into the project group information portlet.
>
> I think I prefer moving it to the -details portlet.
>
> But that doesn't look nice -- see the screenshot attached.
I did not get the image, but this is what I think we can do to land. The
registrant paragraph and link list must follow the DL DIV to ensure the
floating is cleared:
</dl>
</div>
<p id="registrant">
Registered
<tal:created replace=
by <tal:registrant replace="structure context/
</p>
<ul class="horizontal">
<li>
<a tal:replace=
<li>
</ul>
</div>
You need to change icon of the rdf to match the sprite:
return Link('+rdf', text, icon='download-
or maybe duplicate the rule in style.css
.download-icon {background:
.download {background:
to make the natural implementation work
> > > <ul class="horizontal" style="float: right"
> > > tal:condition=
> > > <li>
> > > <a tal:replace=
> > > </li>
> > > </ul>
> >
> > We should not be floating content anymore. This list should not render
> > if the link does not render.
>
> I removed the float:right from there, but I don't see what you mean by
> not rendering the list -- the <ul> is conditional on the link being
> enabled, so everything else is too.
You are correct. I was wrong.
> > > <div class="yui-g">
> > > <div class="yui-u first">
> > > <tal:bugs content="structure context/
> > > <tal:specs content="structure context/
> > > <tal:sprints content="structure context/
> > > </div>
> > > <div class="yui-u">
> > > <tal:questions content="structure context/
> > > <tal:contributors content="structure context/
> > > </div>
> >
> > I think we may adjust this. The list of project and series and can be very
> > long. We may want questions moved to the left column,
>
> Shall I file a bug about this, wait for us to see what it will look like
> against real data or JF move questions to the left?
I think we should wait. I only suspect a problem and I cannot recommend
an solution without seeing product data.
Preview Diff
1 | === modified file 'lib/lp/code/templates/project-branches.pt' |
2 | --- lib/lp/code/templates/project-branches.pt 2009-07-17 17:59:07 +0000 |
3 | +++ lib/lp/code/templates/project-branches.pt 2009-08-10 19:04:22 +0000 |
4 | @@ -6,24 +6,22 @@ |
5 | xml:lang="en" |
6 | lang="en" |
7 | dir="ltr" |
8 | - metal:use-macro="context/@@main_template/master" |
9 | + metal:use-macro="view/macro:page/onecolumn" |
10 | i18n:domain="launchpad" |
11 | > |
12 | |
13 | <body> |
14 | |
15 | -<metal:leftportlets fill-slot="portlets_one"> |
16 | -</metal:leftportlets> |
17 | - |
18 | -<metal:rightportlets fill-slot="portlets_two"> |
19 | -</metal:rightportlets> |
20 | - |
21 | -<metal:heading fill-slot="pageheading"> |
22 | +<div metal:fill-slot="main" tal:define="branches view/branches"> |
23 | + |
24 | + <div style="float:right" id="floating-links" |
25 | + tal:define="menu context/menu:overview"> |
26 | + <div tal:define="link menu/branch_visibility" |
27 | + tal:condition="link/enabled" |
28 | + tal:content="structure link/render" /> |
29 | + </div> |
30 | + |
31 | <h1>Bazaar branches for <tal:project-name replace="context/displayname"/></h1> |
32 | -</metal:heading> |
33 | - |
34 | -<div metal:fill-slot="main" |
35 | - tal:define="branches view/branches"> |
36 | |
37 | <tal:branchlisting content="structure branches/@@+branch-listing" /> |
38 | |
39 | |
40 | === modified file 'lib/lp/registry/browser/configure.zcml' |
41 | --- lib/lp/registry/browser/configure.zcml 2009-08-06 19:14:40 +0000 |
42 | +++ lib/lp/registry/browser/configure.zcml 2009-08-10 19:53:47 +0000 |
43 | @@ -480,8 +480,10 @@ |
44 | <browser:menus |
45 | classes=" |
46 | ProjectFacets |
47 | + ProjectActionMenu |
48 | ProjectOverviewMenu |
49 | ProjectBountiesMenu |
50 | + ProjectBugsMenu |
51 | ProjectSeriesSpecificationsMenu |
52 | ProjectSpecificationsMenu |
53 | ProjectSetContextMenu |
54 | |
55 | === modified file 'lib/lp/registry/browser/project.py' |
56 | --- lib/lp/registry/browser/project.py 2009-08-05 01:49:41 +0000 |
57 | +++ lib/lp/registry/browser/project.py 2009-08-10 19:53:47 +0000 |
58 | @@ -13,12 +13,14 @@ |
59 | 'ProjectBountiesMenu', |
60 | 'ProjectBrandingView', |
61 | 'ProjectBreadcrumbBuilder', |
62 | + 'ProjectBugsMenu', |
63 | 'ProjectEditView', |
64 | 'ProjectFacets', |
65 | 'ProjectMaintainerReassignmentView', |
66 | 'ProjectNavigation', |
67 | 'ProjectRdfView', |
68 | 'ProjectReviewView', |
69 | + 'ProjectActionMenu', |
70 | 'ProjectOverviewMenu', |
71 | 'ProjectSeriesSpecificationsMenu', |
72 | 'ProjectSetBreadcrumbBuilder', |
73 | @@ -34,6 +36,7 @@ |
74 | from zope.component import getUtility |
75 | from zope.event import notify |
76 | from zope.formlib import form |
77 | +from zope.interface import implements, Interface |
78 | from zope.schema import Choice |
79 | |
80 | from z3c.ptcompat import ViewPageTemplateFile |
81 | @@ -41,6 +44,7 @@ |
82 | from canonical.cachedproperty import cachedproperty |
83 | from canonical.launchpad import _ |
84 | from canonical.launchpad.webapp.interfaces import NotFoundError |
85 | +from canonical.launchpad.webapp.menu import NavigationMenu |
86 | from lp.registry.interfaces.product import IProductSet |
87 | from lp.registry.interfaces.project import ( |
88 | IProject, IProjectSeries, IProjectSet) |
89 | @@ -137,25 +141,21 @@ |
90 | def bugs(self): |
91 | site = 'bugs' |
92 | text = 'Bugs' |
93 | - |
94 | return Link('', text, enabled=self.context.hasProducts(), site=site) |
95 | |
96 | def answers(self): |
97 | site = 'answers' |
98 | text = 'Answers' |
99 | - |
100 | return Link('', text, enabled=self.context.hasProducts(), site=site) |
101 | |
102 | def specifications(self): |
103 | site = 'blueprints' |
104 | text = 'Blueprints' |
105 | - |
106 | return Link('', text, enabled=self.context.hasProducts(), site=site) |
107 | |
108 | def translations(self): |
109 | site = 'translations' |
110 | text = 'Translations' |
111 | - |
112 | return Link('', text, enabled=self.context.hasProducts(), site=site) |
113 | |
114 | |
115 | @@ -164,14 +164,8 @@ |
116 | usedfor = IProject |
117 | facet = 'overview' |
118 | links = [ |
119 | - 'edit', 'branding', 'driver', 'reassign', 'top_contributors', |
120 | - 'mentorship', 'announce', 'announcements', 'administer', |
121 | - 'branch_visibility', 'rdf', 'subscribe'] |
122 | - |
123 | - @enabled_with_permission('launchpad.Edit') |
124 | - def edit(self): |
125 | - text = 'Change details' |
126 | - return Link('+edit', text, icon='edit') |
127 | + 'branding', 'driver', 'reassign', 'top_contributors', 'mentorship', |
128 | + 'announce', 'announcements', 'branch_visibility', 'rdf'] |
129 | |
130 | @enabled_with_permission('launchpad.Edit') |
131 | def branding(self): |
132 | @@ -181,12 +175,13 @@ |
133 | @enabled_with_permission('launchpad.Edit') |
134 | def reassign(self): |
135 | text = 'Change maintainer' |
136 | - return Link('+reassign', text, icon='edit') |
137 | + summary = 'Change the maintainer of this project group' |
138 | + return Link('+reassign', text, summary, icon='edit') |
139 | |
140 | @enabled_with_permission('launchpad.Edit') |
141 | def driver(self): |
142 | text = 'Appoint driver' |
143 | - summary = 'Someone with permission to set goals for all projects' |
144 | + summary = 'Appoint the driver of this project group' |
145 | return Link('+driver', text, summary, icon='edit') |
146 | |
147 | def top_contributors(self): |
148 | @@ -220,19 +215,39 @@ |
149 | return Link('+rdf', text, icon='download') |
150 | |
151 | @enabled_with_permission('launchpad.Admin') |
152 | - def administer(self): |
153 | - text = 'Administer' |
154 | - return Link('+review', text, icon='edit') |
155 | - |
156 | - @enabled_with_permission('launchpad.Admin') |
157 | def branch_visibility(self): |
158 | text = 'Define branch visibility' |
159 | return Link('+branchvisibility', text, icon='edit', site='mainsite') |
160 | |
161 | + |
162 | +class IProjectActionMenu(Interface): |
163 | + """Marker interface for views that use ProjectActionMenu.""" |
164 | + |
165 | + |
166 | +class ProjectActionMenu(NavigationMenu): |
167 | + |
168 | + usedfor = IProjectActionMenu |
169 | + facet = 'overview' |
170 | + title = 'Action menu' |
171 | + links = ('subscribe', 'edit', 'administer') |
172 | + |
173 | + # XXX: salgado, 2009-08-10: This should be shown in the +index page of the |
174 | + # project's bugs facet, but that would require too much work and I just |
175 | + # want to convert this page to 3.0, so I'll leave it here for now. |
176 | def subscribe(self): |
177 | text = 'Subscribe to bug mail' |
178 | return Link('+subscribe', text, icon='edit') |
179 | |
180 | + @enabled_with_permission('launchpad.Edit') |
181 | + def edit(self): |
182 | + text = 'Change details' |
183 | + return Link('+edit', text, icon='edit') |
184 | + |
185 | + @enabled_with_permission('launchpad.Admin') |
186 | + def administer(self): |
187 | + text = 'Administer' |
188 | + return Link('+review', text, icon='edit') |
189 | + |
190 | |
191 | class ProjectBountiesMenu(ApplicationMenu): |
192 | |
193 | @@ -286,8 +301,19 @@ |
194 | return Link('+addquestion', text, icon='add') |
195 | |
196 | |
197 | +class ProjectBugsMenu(ApplicationMenu): |
198 | + |
199 | + usedfor = IProject |
200 | + facet = 'bugs' |
201 | + links = ['new'] |
202 | + |
203 | + def new(self): |
204 | + text = 'Report a Bug' |
205 | + return Link('+filebug', text, icon='add') |
206 | + |
207 | + |
208 | class ProjectView(HasAnnouncementsView, FeedsMixin): |
209 | - pass |
210 | + implements(IProjectActionMenu) |
211 | |
212 | |
213 | class ProjectEditView(LaunchpadEditFormView): |
214 | |
215 | === modified file 'lib/lp/registry/templates/project-details.pt' |
216 | --- lib/lp/registry/templates/project-details.pt 2009-07-17 17:59:07 +0000 |
217 | +++ lib/lp/registry/templates/project-details.pt 2009-08-10 19:04:22 +0000 |
218 | @@ -4,53 +4,53 @@ |
219 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
220 | omit-tag=""> |
221 | |
222 | -<div class="portlet" id="portlet-details"> |
223 | - <div class="portletBody portletContent"> |
224 | - <table class="summary"> |
225 | - <tbody> |
226 | - <tr tal:condition="context/required:launchpad.Admin"> |
227 | - <th>Project group status:</th> |
228 | - <td> |
229 | - <tal:block condition="context/active">Active</tal:block> |
230 | - <tal:block condition="not: context/active">Disabled</tal:block> |
231 | - <tal:block condition="context/reviewed"><br />Reviewed</tal:block> |
232 | - <tal:block condition="context/icon"><br />Branded |
233 | - <tal:icon replace="structure context/image:icon" /> |
234 | - </tal:block> |
235 | - </td> |
236 | - </tr> |
237 | - <tr> |
238 | - <th>Maintainer:</th> |
239 | - <td> |
240 | - <a |
241 | - tal:content="context/owner/displayname" |
242 | - tal:attributes="href context/owner/fmt:url" |
243 | - >ownername</a> |
244 | - </td> |
245 | - </tr> |
246 | - <tr> |
247 | - <th>Driver:</th> |
248 | - <td tal:condition="not:context/driver">Not yet appointed</td> |
249 | - <td tal:condition="context/driver"> |
250 | - <a |
251 | - tal:content="context/driver/displayname" |
252 | - tal:attributes="href context/driver/fmt:url" |
253 | - >Carlos Perello</a> |
254 | - </td> |
255 | - </tr> |
256 | - <tr> |
257 | - <th>Bug tracker:</th> |
258 | - <td> |
259 | - <a |
260 | - tal:condition="context/bugtracker" |
261 | - tal:content="context/bugtracker/title" |
262 | - tal:attributes="href context/bugtracker/fmt:url" |
263 | - >tracker title</a> |
264 | - <tal:none condition="not:context/bugtracker">None specified</tal:none> |
265 | - </td> |
266 | - </tr> |
267 | - </tbody> |
268 | - </table> |
269 | - </div> |
270 | +<div id="portlet-details"> |
271 | + <table class="summary" tal:define="overview_menu context/menu:overview"> |
272 | + <tbody> |
273 | + <tr tal:condition="context/required:launchpad.Admin"> |
274 | + <th>Status:</th> |
275 | + <td> |
276 | + <tal:block condition="context/active">Active</tal:block> |
277 | + <tal:block condition="not: context/active">Disabled</tal:block> |
278 | + <tal:block condition="context/reviewed"><br />Reviewed</tal:block> |
279 | + <tal:block condition="context/icon"><br />Branded |
280 | + <tal:icon replace="structure context/image:icon" /> |
281 | + </tal:block> |
282 | + </td> |
283 | + </tr> |
284 | + <tr> |
285 | + <th>Maintainer:</th> |
286 | + <td> |
287 | + <a tal:replace="structure context/owner/fmt:link" /> |
288 | + <tal:edit-maintainer |
289 | + content="structure overview_menu/reassign/fmt:icon" /> |
290 | + </td> |
291 | + </tr> |
292 | + <tr> |
293 | + <th>Driver:</th> |
294 | + <td> |
295 | + <tal:no-driver condition="not:context/driver"> |
296 | + Not yet appointed |
297 | + </tal:no-driver> |
298 | + <tal:has-driver condition="context/driver"> |
299 | + <a tal:replace="structure context/driver/fmt:link">Driver</a> |
300 | + </tal:has-driver> |
301 | + <tal:edit-maintainer |
302 | + content="structure overview_menu/driver/fmt:icon" /> |
303 | + </td> |
304 | + </tr> |
305 | + <tr> |
306 | + <th>Bug tracker:</th> |
307 | + <td> |
308 | + <a |
309 | + tal:condition="context/bugtracker" |
310 | + tal:content="context/bugtracker/title" |
311 | + tal:attributes="href context/bugtracker/fmt:url" |
312 | + >tracker title</a> |
313 | + <tal:none condition="not:context/bugtracker">None specified</tal:none> |
314 | + </td> |
315 | + </tr> |
316 | + </tbody> |
317 | + </table> |
318 | </div> |
319 | </tal:root> |
320 | |
321 | === modified file 'lib/lp/registry/templates/project-edit.pt' |
322 | --- lib/lp/registry/templates/project-edit.pt 2009-07-18 00:05:49 +0000 |
323 | +++ lib/lp/registry/templates/project-edit.pt 2009-08-05 19:26:37 +0000 |
324 | @@ -3,20 +3,14 @@ |
325 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
326 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
327 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
328 | - xml:lang="en" |
329 | - lang="en" |
330 | - dir="ltr" |
331 | - metal:use-macro="context/@@main_template/master" |
332 | + metal:use-macro="view/macro:page/main_only" |
333 | i18n:domain="launchpad" |
334 | > |
335 | <body> |
336 | - <metal:heading fill-slot="heading"> |
337 | - <h1>Change project group details</h1> |
338 | - </metal:heading> |
339 | - |
340 | <div metal:fill-slot="main"> |
341 | |
342 | - <div metal:use-macro="context/@@launchpad_form/form"> |
343 | + <div class="top-portlet" |
344 | + metal:use-macro="context/@@launchpad_form/form"> |
345 | |
346 | <p metal:fill-slot="extra_info"> |
347 | Avoid changing the Name, |
348 | @@ -28,6 +22,7 @@ |
349 | |
350 | </div> |
351 | |
352 | + <tal:menu replace="structure view/@@+related-pages" /> |
353 | </div> |
354 | |
355 | </body> |
356 | |
357 | === modified file 'lib/lp/registry/templates/project-index.pt' |
358 | --- lib/lp/registry/templates/project-index.pt 2009-07-17 17:59:07 +0000 |
359 | +++ lib/lp/registry/templates/project-index.pt 2009-08-11 14:26:36 +0000 |
360 | @@ -3,41 +3,32 @@ |
361 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
362 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
363 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
364 | - xml:lang="en" |
365 | - lang="en" |
366 | - dir="ltr" |
367 | - metal:use-macro="view/macro:page/default" |
368 | + metal:use-macro="view/macro:page/main_side" |
369 | i18n:domain="launchpad" |
370 | > |
371 | <body> |
372 | |
373 | - <metal:portlets fill-slot="portlets"> |
374 | - <tal:portlet tal:replace="structure context/@@+portlet-lifecycle" /> |
375 | - <tal:portlet tal:replace="structure context/@@+portlet-milestones" /> |
376 | - </metal:portlets> |
377 | - |
378 | - <div metal:fill-slot="main"> |
379 | - |
380 | - <p id="project-inactive" tal:condition="not: context/active" class="warning message"> |
381 | - This project is currently inactive <a href="+review">(change this)</a> |
382 | - </p> |
383 | - |
384 | - <tal:block condition="view/required:launchpad.Edit"> |
385 | - <p tal:condition="not: context/products" class="warning message"> |
386 | - There are no projects registered for |
387 | - <span tal:replace="context/displayname">project displayname</span>. |
388 | - <br /> |
389 | - You need to <a href="+newproduct">register another project that is |
390 | - part of <tal:project replace="context/displayname" /></a> or associate |
391 | - an existing project with it. |
392 | + <tal:heading metal:fill-slot="heading"> |
393 | + <h1 tal:content="context/title">Mozilla</h1> |
394 | + </tal:heading> |
395 | + |
396 | + <tal:main metal:fill-slot="main"> |
397 | + |
398 | + <div class="top-portlet"> |
399 | + <p id="project-inactive" tal:condition="not: context/active" class="warning message"> |
400 | + This project is currently inactive <a href="+review">(change this)</a> |
401 | </p> |
402 | - </tal:block> |
403 | |
404 | - <div |
405 | - style="width: 200px; height: 200px; float: right;" |
406 | - tal:content="structure context/image:mugshot" |
407 | - /> |
408 | - <h1 tal:content="context/title">Mozilla</h1> |
409 | + <tal:block condition="view/required:launchpad.Edit"> |
410 | + <p tal:condition="not: context/products" class="warning message"> |
411 | + There are no projects registered for |
412 | + <span tal:replace="context/displayname">project displayname</span>. |
413 | + <br /> |
414 | + You need to <a href="+newproduct">register another project that is |
415 | + part of <tal:project replace="context/displayname" /></a> or associate |
416 | + an existing project with it. |
417 | + </p> |
418 | + </tal:block> |
419 | |
420 | <div class="description" tal:content="context/summary"> |
421 | This is the project group Summary, which should be a single paragraph |
422 | @@ -68,82 +59,94 @@ |
423 | </a> |
424 | </li> |
425 | </ul> |
426 | - <ul class="buttons" tal:condition="context/products"> |
427 | - <li> |
428 | - <a href="+filebug"> |
429 | - <img alt="Report a bug" src="/+icing/but-sml-reportabug.gif" /> |
430 | - </a> |
431 | - </li> |
432 | - <li tal:content="structure context/@@+ask-a-question-button" /> |
433 | - <li tal:content="structure context/@@+help-translate-button" /> |
434 | - <li tal:define="has_mentoring context/mentoring_offers/count"> |
435 | - <a href="+mentoring" tal:condition="has_mentoring"> |
436 | - <img alt="Mentoring available" |
437 | - src="/+icing/but-sml-mentoring.gif"/> |
438 | - </a> |
439 | - <a href="+mentoring" tal:condition="not: has_mentoring"> |
440 | - <img alt="No mentoring available" |
441 | - src="/+icing/but-sml-mentoring-off.gif" /> |
442 | - </a> |
443 | - </li> |
444 | - </ul> |
445 | - <div class="left"> |
446 | - <div |
447 | - class="section" |
448 | - tal:content="structure context/@@+portlet-coming-sprints" |
449 | - /> |
450 | - <div |
451 | - class="section" |
452 | - tal:content="structure context/@@+portlet-latestannouncements" |
453 | - /> |
454 | - <div class="portlet" id="products"> |
455 | - <h2>Projects</h2> |
456 | - <p tal:condition="not: context/products"> |
457 | - There are no projects registered for |
458 | - <span tal:replace="context/displayname">project displayname</span>. |
459 | - </p> |
460 | - <div |
461 | - tal:condition="context/products" |
462 | - tal:repeat="product context/products"> |
463 | - <tal:link replace="structure product/fmt:link" /> |
464 | - <div tal:condition="product/releases/count"> |
465 | - Releases: |
466 | - <tal:release repeat="release product/releases"> |
467 | - <a |
468 | - tal:attributes="href release/fmt:url" |
469 | - tal:content="release/version" |
470 | - >version</a><tal:comma |
471 | - condition="not:repeat/release/end">,</tal:comma> |
472 | - </tal:release> |
473 | - </div> |
474 | - <div tal:condition="product/milestones"> |
475 | - Milestones: |
476 | - <tal:milestone repeat="milestone product/milestones"> |
477 | - <a |
478 | - tal:attributes="href milestone/fmt:url" |
479 | - tal:content="milestone/name" |
480 | - >name</a><tal:comma |
481 | - condition="not:repeat/milestone/end">,</tal:comma> |
482 | - </tal:milestone> |
483 | - </div> |
484 | - </div> |
485 | - <tal:block condition="context/required:launchpad.Edit"> |
486 | - <a href="+newproduct">» Register another project that is |
487 | - part of <tal:project replace="context/displayname" /></a> |
488 | - </tal:block> |
489 | - </div> |
490 | - <div tal:replace="structure context/@@+portlet-latestspecs" /> |
491 | - </div> |
492 | - <div class="right"> |
493 | - <div tal:replace="structure context/@@+details" /> |
494 | - <div tal:replace="structure context/@@+portlet-top-contributors" /> |
495 | - <div tal:replace="structure context/@@+portlet-latestbugs" /> |
496 | - <div |
497 | - class="section" |
498 | - tal:content="structure context/@@+portlet-latestquestions" |
499 | - /> |
500 | - </div> |
501 | + <div class="discreet" style="text-align: right" |
502 | + tal:content="structure context/menu:overview/rdf/fmt:link-icon" /> |
503 | </div> |
504 | + |
505 | + <div class="yui-g"> |
506 | + <div class="yui-u first"> |
507 | + <div class="portlet"> |
508 | + <h2>Project group information</h2> |
509 | + <tal:details replace="structure context/@@+details" /> |
510 | + </div> |
511 | + </div> |
512 | + <div class="yui-u" id="products"> |
513 | + <div class="portlet"> |
514 | + <h2>Projects</h2> |
515 | + <p tal:condition="not: context/products"> |
516 | + There are no projects registered for |
517 | + <span tal:replace="context/displayname">project displayname</span>. |
518 | + </p> |
519 | + <div |
520 | + tal:condition="context/products" |
521 | + tal:repeat="product context/products"> |
522 | + <tal:link replace="structure product/fmt:link" /> |
523 | + <div tal:condition="product/releases/count"> |
524 | + Releases: |
525 | + <tal:release repeat="release product/releases"> |
526 | + <a |
527 | + tal:attributes="href release/fmt:url" |
528 | + tal:content="release/version" |
529 | + >version</a><tal:comma |
530 | + condition="not:repeat/release/end">,</tal:comma> |
531 | + </tal:release> |
532 | + </div> |
533 | + <div tal:condition="product/milestones"> |
534 | + Milestones: |
535 | + <tal:milestone repeat="milestone product/milestones"> |
536 | + <a |
537 | + tal:attributes="href milestone/fmt:url" |
538 | + tal:content="milestone/name" |
539 | + >name</a><tal:comma |
540 | + condition="not:repeat/milestone/end">,</tal:comma> |
541 | + </tal:milestone> |
542 | + </div> |
543 | + </div> |
544 | + <tal:block condition="context/required:launchpad.Edit"> |
545 | + <a href="+newproduct">» Register another project that is |
546 | + part of <tal:project replace="context/displayname" /></a> |
547 | + </tal:block> |
548 | + </div> |
549 | + </div> |
550 | + </div> |
551 | + <div class="yui-g"> |
552 | + <div class="yui-u first"> |
553 | + <tal:bugs content="structure context/@@+portlet-latestbugs" /> |
554 | + <tal:specs content="structure context/@@+portlet-latestspecs" /> |
555 | + <tal:sprints content="structure context/@@+portlet-coming-sprints" /> |
556 | + </div> |
557 | + <div class="yui-u"> |
558 | + <tal:questions content="structure context/@@+portlet-latestquestions" /> |
559 | + <tal:contributors content="structure context/@@+portlet-top-contributors" /> |
560 | + </div> |
561 | + </div> |
562 | + </tal:main> |
563 | + |
564 | + <tal:side metal:fill-slot="side"> |
565 | + <div id="object-actions" class="top-portlet"> |
566 | + <tal:menu replace="structure view/@@+global-actions" /> |
567 | + </div> |
568 | + <div id="involvement" class="portlet involvement" |
569 | + tal:condition="context/products"> |
570 | + <h2>Get Involved</h2> |
571 | + <ul> |
572 | + <li> |
573 | + <a class="bugs" |
574 | + tal:attributes="href context/menu:bugs/new/url">Report a Bug</a> |
575 | + </li> |
576 | + <li> |
577 | + <a class="question" |
578 | + tal:attributes="href context/menu:answers/new/url">Ask a question</a> |
579 | + </li> |
580 | + <li> |
581 | + <a class="translate" |
582 | + tal:attributes="href context/menu:translations/overview/url">Help translate</a> |
583 | + </li> |
584 | + </ul> |
585 | + </div> |
586 | + <tal:portlet tal:replace="structure context/@@+portlet-latestannouncements" /> |
587 | + </tal:side> |
588 | + |
589 | </body> |
590 | </html> |
591 | |
592 | |
593 | === modified file 'lib/lp/translations/browser/project.py' |
594 | --- lib/lp/translations/browser/project.py 2009-07-17 02:25:09 +0000 |
595 | +++ lib/lp/translations/browser/project.py 2009-08-05 19:26:37 +0000 |
596 | @@ -11,7 +11,7 @@ |
597 | ] |
598 | |
599 | from canonical.launchpad.webapp import ( |
600 | - ApplicationMenu, enabled_with_permission, Link, LaunchpadView) |
601 | + canonical_url, enabled_with_permission, Link, LaunchpadView) |
602 | from canonical.launchpad.webapp.menu import NavigationMenu |
603 | from lp.registry.interfaces.project import IProject |
604 | |
605 | @@ -20,7 +20,7 @@ |
606 | |
607 | usedfor = IProject |
608 | facet = 'translations' |
609 | - links = ['products', 'changetranslators'] |
610 | + links = ['products', 'changetranslators', 'overview'] |
611 | |
612 | @enabled_with_permission('launchpad.Edit') |
613 | def changetranslators(self): |
614 | @@ -31,6 +31,11 @@ |
615 | text = 'Products' |
616 | return Link('', text) |
617 | |
618 | + def overview(self): |
619 | + text = 'Overview' |
620 | + link = canonical_url(self.context, rootsite='translations') |
621 | + return Link(link, text, icon='translation') |
622 | + |
623 | |
624 | class ProjectView(LaunchpadView): |
625 | pass |
626 |
= Summary =
Convert the project group home page to 3.0 layout
== Proposed fix ==
Replicate what was done for the project page.
This branch includes lp:~sinzui/launchpad/project-layout-bug-405916
== Tests ==
I did not run any tests yet.
== Demo and Q/A ==
https:/ /launchpad. dev/mozilla /launchpad. dev/apache /launchpad. dev/gnome
https:/
https:/
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ browser/ configure. zcml translations/ browser/ project. py code/templates/ project- branches. pt registry/ templates/ project- edit.pt registry/ templates/ project- details. pt registry/ templates/ project- index.pt registry/ browser/ project. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Template notices ==
There are obsolete slots in these templates.
lib/lp/ code/templates/ project- branches. pt
<metal:block fill-slot="help">