Merge lp:~allenap/launchpad/ui-convert-bug-tracker-3.0-bug-418155 into lp:launchpad
- ui-convert-bug-tracker-3.0-bug-418155
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~allenap/launchpad/ui-convert-bug-tracker-3.0-bug-418155 |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~allenap/launchpad/ui-convert-bug-tracker-3.0-bug-418155 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Michael Nelson (community) | ui | Approve | |
Review via email:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gavin Panella (allenap) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gavin Panella (allenap) wrote : | # |
To have a play, try:
* Go to the bug trackers page (for IBugTrackerSet) at
<https:/
* Clicking on a bug tracker to see its overview page,
* Admire the "Change details" link on the right hand side; this is
the new navigation menu,
* Use the "Bug trackers" breadcrumb to go back,
* Click "Register a new bug tracker" to go to the +newbugtracker
form,
* Use the "Cancel" link to go back to the first page you were at.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Brad Crittenden (bac) wrote : | # |
Hi Gavin,
* Have you scheduled a UI review for this branch yet?
* Why to (+) Register links on https:/
* If there are no inactive bug trackers, I think a message would be
better than showing an empty table.
* Hey, that's cool. I didn't know our <H1> colors were tied to the
facet. Neat. Well, they are more or less. I wonder why we don't
peg them to the exact color in the Launchpad logo? (Yeah, I know
that has nothing to do with your branch.)
* I noticed that removing a bug watch and then reloading the page does
not remove the bug watch from the list at:
https:/
* At https:/
informational sprites for Related Projects are messed up. (Verfied
in Safari 4 and FF 3.0 in Jaunty.) If it is not your issue could
you file a bug?
In addition to those broad questions I've made some suggestions below. Overall a nice branch. Thanks for knocking out another...
I'm marking the code review 'Needs Fixing' just b/c I want to see the diff but the changes should be pretty straightforward.
--Brad
> === modified file 'lib/lp/
> --- lib/lp/
+++ lib/lp/
> @@ -379,8 +370,21 @@
> return RemoteBug(
>
>
> +class BugTrackerSetBr
> + """Builds a breadcrumb for the `IBugTrackerSet
This diff is different from the branch. Was BreadcrumbBuilder vs
Breadcrumb the reason for the conflict?
> + rootsite = None
> +
> + @property
> + def text(self):
> + return u"Bug trackers"
> +
> +
> class BugTrackerBread
> """Builds a breadcrumb for an `IBugTracker`."""
> +
> + rootsite = None
> +
> @property
> def text(self):
> return self.context.title
> @@ -401,3 +405,13 @@
> return 'Remote Bug #%s in %s' % (self.remotebug,
> self.bugtracker
>
> +
> +class BugTrackerNavig
> +
> + usedfor = BugTrackerView
> + facet = 'bugs'
> + links = ['edit']
> +
> + def edit(self):
> + text = 'Change details'
> + return Link('+edit', text, icon='edit')
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -56,5 +59,42 @@
> self._getBreadc
>
>
> +class TestBugTrackerB
> + def setUp(self):
> + super(TestBugTr
> + self.bug_
> + self.bug_
> + self.bug_
> + self.bug_tracker = self.factory.
> + self.bug_
> + self.bug_tracker, rootsite='...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Brad Crittenden (bac) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gavin Panella (allenap) wrote : | # |
Thanks for the review Brad! (Also, thank you for testfixing my branch
late last week after buildbot blamelisted me.)
Sorry for taking so long to reply; I had a double whammy of OCR then
CHR.
On Tue, 25 Aug 2009 18:25:22 -0000
Brad Crittenden <email address hidden> wrote:
> Review: Approve code
> Hi Gavin,
>
> * Have you scheduled a UI review for this branch yet?
No, not yet, I'm going to seek one out right after this.
> * Why to (+) Register links on https:/
That's just what was there before, so I left it alone because it'll
probably come up in the UI review. In production the table is very
long (and it isn't batch navigated) so it makes more sense there I
suppose.
> * If there are no inactive bug trackers, I think a message would be
> better than showing an empty table.
You're right! That shouldn't be there! Thanks for spotting that.
> * Hey, that's cool. I didn't know our <H1> colors were tied to the
> facet. Neat. Well, they are more or less. I wonder why we don't
> peg them to the exact color in the Launchpad logo? (Yeah, I know
> that has nothing to do with your branch.)
I would never have noticed the colour difference :) You either have
good eyes, or a strong eyedropper addiction ;)
> * I noticed that removing a bug watch and then reloading the page does
> not remove the bug watch from the list at:
> https:/
Did you both set "None, the status of the bug is updated manually." in
the task expander and then delete the bug watch via the "Remote bug
watches" portlet?
BTW, there seems to be a bug deleting the debbugs watch on bug #15
(foreign key violation), so try the debbugs watch on bug #3 instead.
> * At https:/
> informational sprites for Related Projects are messed up. (Verfied
> in Safari 4 and FF 3.0 in Jaunty.) If it is not your issue could
> you file a bug?
Ah yes, good point. I'll do these in a later branch for the same bug,
and land them all together.
>
> In addition to those broad questions I've made some suggestions
> below. Overall a nice branch. Thanks for knocking out another...
>
> I'm marking the code review 'Needs Fixing' just b/c I want to see
> the diff but the changes should be pretty straightforward.
>
> --Brad
>
>
> > === modified file 'lib/lp/
> > --- lib/lp/
> +++ lib/lp/
> > @@ -379,8 +370,21 @@
> > return RemoteBug(
> >
> >
> > +class BugTrackerSetBr
> > + """Builds a breadcrumb for the `IBugTrackerSet
>
> This diff is different from the branch. Was BreadcrumbBuilder vs
> Breadcrumb the reason for the conflict?
Yes :/
>
> > + rootsite = None
> > +
> > + @property
> > + def text(self):
> > + return u"Bug trackers"
> > +
> > +
> > class BugTrackerBread
> > """Builds a breadcrumb for an `IBugTracker`."""
> > +
> > + rootsite = None
> > +
> > @property
> > def t...
1 | === modified file 'lib/lp/bugs/templates/bugtracker-index.pt' |
2 | --- lib/lp/bugs/templates/bugtracker-index.pt 2009-08-25 14:47:50 +0000 |
3 | +++ lib/lp/bugs/templates/bugtracker-index.pt 2009-08-28 08:53:00 +0000 |
4 | @@ -79,9 +79,7 @@ |
5 | highlights. |
6 | </p> |
7 | |
8 | - <h2> |
9 | - Location |
10 | - </h2> |
11 | + <h2>Location</h2> |
12 | <ul id="bugtracker-urls"> |
13 | <li> |
14 | <strong> |
15 | @@ -95,23 +93,25 @@ |
16 | </li> |
17 | </ul> |
18 | |
19 | - <h2 tal:condition="context/contactdetails"> |
20 | - Contact details |
21 | - </h2> |
22 | - <div tal:condition="context/contactdetails" |
23 | - tal:content="context/contactdetails" > |
24 | - The contact details for the admins of this bug tracker go here, |
25 | - so we can get to them in an emergency. |
26 | - </div> |
27 | + <tal:contact-details condition="context/contactdetails"> |
28 | + <h2>Contact details</h2> |
29 | + <div tal:condition="context/contactdetails" |
30 | + tal:content="context/contactdetails" > |
31 | + The contact details for the admins of this bug tracker go |
32 | + here, so we can get to them in an emergency. |
33 | + </div> |
34 | + </tal:contact-details> |
35 | |
36 | - <h2 tal:condition="context/watches">Bug watches</h2> |
37 | - <tal:navigation |
38 | - replace="structure view/batchnav/@@+navigation-links-upper" /> |
39 | - <tal:block define="watches view/batchnav/batch" condition="watches"> |
40 | - <metal:watches use-macro="template/macros/watchlisting" /> |
41 | - </tal:block> |
42 | - <tal:navigation |
43 | - replace="structure view/batchnav/@@+navigation-links-lower" /> |
44 | + <tal:watches condition="context/watches"> |
45 | + <h2>Bug watches</h2> |
46 | + <tal:navigation |
47 | + replace="structure view/batchnav/@@+navigation-links-upper" /> |
48 | + <tal:block define="watches view/batchnav/batch" condition="watches"> |
49 | + <metal:watches use-macro="template/macros/watchlisting" /> |
50 | + </tal:block> |
51 | + <tal:navigation |
52 | + replace="structure view/batchnav/@@+navigation-links-lower" /> |
53 | + </tal:watches> |
54 | </div> |
55 | </div> |
56 |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michael Nelson (michael.nelson) wrote : | # |
> To have a play, try:
>
> * Go to the bug trackers page (for IBugTrackerSet) at
> <https:/
Looks great! The only thing is (as bac pointed out) you've got two "+ Register another bug tracker" links? I'd get rid of the one at the top (assuming that people need to read through the list *before* they can be sure that the one they're about to register isn't already registered).
>
> * Clicking on a bug tracker to see its overview page,
It looks great, but as far as I'm aware, we have been explicitly asked *not* to put the context details in the side bar. We had this issue with many soyuz pages that hadn't been updated since 1.0 and so had side portlets all over the place.
So there are actually two separate-
1. The main_side layout is meant to be used only if you have notifications, a subscribers list, activity (new download releases), involvement or actions that create objects etc. See
https:/
2. The context details should always be displayed in the main content in portlets as you see fit (see the product page as an example: https:/
https:/
and click on an active builder (ie. one that is not idle).
>
> * Admire the "Change details" link on the right hand side; this is
> the new navigation menu,
Note: if you do remove that extra content from the side-bar (context details and related projects), you'll then be left with the same issue that I had with the builder-index.pt above - the only content you'll have for the side bar is an actions menu with a single change details link that is only displayed to a very limited number of people - otherwise it will be empty. For the builder-index.pt I checked with Martin and, since the menu was only displayed to admins (in my case), I decided to always use a main_only template and manually put the action menu on the right-hand side where it normally would be.
>
> * Use the "Bug trackers" breadcrumb to go back,
Great!
>
> * Click "Register a new bug tracker" to go to the +newbugtracker
> form,
Excellent.
>
> * Use the "Cancel" link to go back to the first page you were at.
Excellent.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gavin Panella (allenap) wrote : | # |
On Tue, 01 Sep 2009 11:26:08 -0000
Michael Nelson <email address hidden> wrote:
> Review: Needs Fixing ui
> > To have a play, try:
> >
> > * Go to the bug trackers page (for IBugTrackerSet) at
> > <https:/
>
> Looks great! The only thing is (as bac pointed out) you've got two
> "+ Register another bug tracker" links? I'd get rid of the one at
> the top (assuming that people need to read through the list *before*
> they can be sure that the one they're about to register isn't
> already registered).
Done.
There are a lot of bug trackers registered in production, so this
table gets very long. I haven't added a batch navigator yet, because
one of the purposes of this table is for people to find if their bug
tracker is already registered. Until we have a search function I will
leave it as a very long table.
>
> >
> > * Clicking on a bug tracker to see its overview page,
>
> It looks great, but as far as I'm aware, we have been explicitly
> asked *not* to put the context details in the side bar. We had this
> issue with many soyuz pages that hadn't been updated since 1.0 and
> so had side portlets all over the place.
>
> So there are actually two separate-
>
> 1. The main_side layout is meant to be used only if you have
> notifications, a subscribers list, activity (new download releases),
> involvement or actions that create objects etc. See
>
> https:/
>
> 2. The context details should always be displayed in the main
> content in portlets as you see fit (see the product page as an
> example: https:/
> exception to this rule approved so far, and that was the builder
> (singular) index page (builder-index.pt), because the builder status
> and log is extremely important. To see this page, go to:
>
> https:/
>
> and click on an active builder (ie. one that is not idle).
I'm starting to take in all of these rules and motivations :)
As we've already discussed, I've moved the summary to across the top,
then a row with two portlets - details and related projects - and then
a row with the watches.
>
> >
> > * Admire the "Change details" link on the right hand side; this is
> > the new navigation menu,
>
> Note: if you do remove that extra content from the side-bar (context
> details and related projects), you'll then be left with the same
> issue that I had with the builder-index.pt above - the only content
> you'll have for the side bar is an actions menu with a single change
> details link that is only displayed to a very limited number of
> people - otherwise it will be empty. For the builder-index.pt I
> checked with Martin and, since the menu was only displayed to admins
> (in my case), I decided to always use a main_only template and
> manually put the action menu on the right-hand side where it
> normally would be.
As discussed, the side bar is always shown because the Change Details
link can be clicked by anyone; if they're not logged-in they'll be
asked to do so.
>
> >
> > * Use the "Bug trackers" breadcrumb to go back...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michael Nelson (michael.nelson) wrote : | # |
> On Tue, 01 Sep 2009 11:26:08 -0000
> Michael Nelson <email address hidden> wrote:
>
> > Review: Needs Fixing ui
> > > To have a play, try:
> > >
> > > * Go to the bug trackers page (for IBugTrackerSet) at
> > > <https:/
> >
> > Looks great! The only thing is (as bac pointed out) you've got two
> > "+ Register another bug tracker" links? I'd get rid of the one at
> > the top (assuming that people need to read through the list *before*
> > they can be sure that the one they're about to register isn't
> > already registered).
>
> Done.
>
> There are a lot of bug trackers registered in production, so this
> table gets very long. I haven't added a batch navigator yet, because
> one of the purposes of this table is for people to find if their bug
> tracker is already registered. Until we have a search function I will
> leave it as a very long table.
Great, looks good.
>
> >
> > >
> > > * Clicking on a bug tracker to see its overview page,
> >
> > It looks great, but as far as I'm aware, we have been explicitly
> > asked *not* to put the context details in the side bar. We had this
> > issue with many soyuz pages that hadn't been updated since 1.0 and
> > so had side portlets all over the place.
> >
> > So there are actually two separate-
> >
> > 1. The main_side layout is meant to be used only if you have
> > notifications, a subscribers list, activity (new download releases),
> > involvement or actions that create objects etc. See
> >
> > https:/
> >
> > 2. The context details should always be displayed in the main
> > content in portlets as you see fit (see the product page as an
> > example: https:/
> > exception to this rule approved so far, and that was the builder
> > (singular) index page (builder-index.pt), because the builder status
> > and log is extremely important. To see this page, go to:
> >
> > https:/
> >
> > and click on an active builder (ie. one that is not idle).
>
> I'm starting to take in all of these rules and motivations :)
>
> As we've already discussed, I've moved the summary to across the top,
> then a row with two portlets - details and related projects - and then
> a row with the watches.
Looks good.
One thing that I don't get (but could just be my lack of context), is that in the Related projects portlet, it mentions that I can link a registered bug tracker with a registered project in LP. But I was looking for an "add project link" or something similar - and checked the edit page too. I'm guessing that it's actually only possible from the project? If that's the case, how about "You can link a registered bug tracker when you edit a registered project in Launchpad:"? See what you think.
>
> >
> > >
> > > * Admire the "Change details" link on the right hand side; this is
> > > the new navigation menu,
> >
> > Note: if you do remove that extra content from the side-bar (context
> > details and related projects), you'll then be left with the same
> > issue that I had with the builder-index...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gavin Panella (allenap) wrote : | # |
On Wed, 02 Sep 2009 07:18:45 -0000
Michael Nelson <email address hidden> wrote:
...
> > As we've already discussed, I've moved the summary to across the top,
> > then a row with two portlets - details and related projects - and then
> > a row with the watches.
>
> Looks good.
>
> One thing that I don't get (but could just be my lack of context),
> is that in the Related projects portlet, it mentions that I can link
> a registered bug tracker with a registered project in LP. But I was
> looking for an "add project link" or something similar - and checked
> the edit page too. I'm guessing that it's actually only possible
> from the project? If that's the case, how about "You can link a
> registered bug tracker when you edit a registered project in
> Launchpad:"? See what you think.
How about:
You can link a <a href="/
registered bug tracker in the project's “Change details”
page.
People do sometimes have issues with this, and a wording change here
might help.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michael Nelson (michael.nelson) wrote : | # |
> On Wed, 02 Sep 2009 07:18:45 -0000
> Michael Nelson <email address hidden> wrote:
>
> ...
> > > As we've already discussed, I've moved the summary to across the top,
> > > then a row with two portlets - details and related projects - and then
> > > a row with the watches.
> >
> > Looks good.
> >
> > One thing that I don't get (but could just be my lack of context),
> > is that in the Related projects portlet, it mentions that I can link
> > a registered bug tracker with a registered project in LP. But I was
> > looking for an "add project link" or something similar - and checked
> > the edit page too. I'm guessing that it's actually only possible
> > from the project? If that's the case, how about "You can link a
> > registered bug tracker when you edit a registered project in
> > Launchpad:"? See what you think.
>
> How about:
>
> You can link a <a href="/
> registered bug tracker in the project's “Change details”
> page.
>
> People do sometimes have issues with this, and a wording change here
> might help.
Perfect.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Brad Crittenden (bac) wrote : | # |
Gavin your changes look good. I note the informational sprites are still messed up -- not sure if they were meant to be fixed in this revision or not.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gavin Panella (allenap) wrote : | # |
On Wed, 02 Sep 2009 16:03:31 -0000
Brad Crittenden <email address hidden> wrote:
> Review: Approve code
> Gavin your changes look good. I note the informational sprites are
> still messed up -- not sure if they were meant to be fixed in this
> revision or not.
Thanks Brad. I've fixed the sprites in a later branch (I just used
fmt:link iirc).
Preview Diff
1 | === modified file 'lib/lp/bugs/browser/bugtracker.py' |
2 | --- lib/lp/bugs/browser/bugtracker.py 2009-06-25 00:40:31 +0000 |
3 | +++ lib/lp/bugs/browser/bugtracker.py 2009-08-25 15:36:35 +0000 |
4 | @@ -8,9 +8,9 @@ |
5 | __all__ = [ |
6 | 'BugTrackerAddView', |
7 | 'BugTrackerBreadcrumbBuilder', |
8 | - 'BugTrackerContextMenu', |
9 | 'BugTrackerEditView', |
10 | 'BugTrackerNavigation', |
11 | + 'BugTrackerNavigationMenu', |
12 | 'BugTrackerSetContextMenu', |
13 | 'BugTrackerSetNavigation', |
14 | 'BugTrackerSetView', |
15 | @@ -42,6 +42,7 @@ |
16 | from canonical.launchpad.webapp.authorization import check_permission |
17 | from canonical.launchpad.webapp.batching import BatchNavigator |
18 | from canonical.launchpad.webapp.breadcrumb import BreadcrumbBuilder |
19 | +from canonical.launchpad.webapp.menu import NavigationMenu |
20 | from canonical.widgets import DelimitedListWidget, LaunchpadRadioWidget |
21 | |
22 | |
23 | @@ -63,17 +64,6 @@ |
24 | usedfor = IBugTrackerSet |
25 | |
26 | |
27 | -class BugTrackerContextMenu(ContextMenu): |
28 | - |
29 | - usedfor = IBugTracker |
30 | - |
31 | - links = ['edit'] |
32 | - |
33 | - def edit(self): |
34 | - text = 'Change details' |
35 | - return Link('+edit', text, icon='edit') |
36 | - |
37 | - |
38 | class BugTrackerSetContextMenu(ContextMenu): |
39 | |
40 | usedfor = IBugTrackerSet |
41 | @@ -125,6 +115,10 @@ |
42 | owner=getUtility(ILaunchBag).user) |
43 | self.next_url = canonical_url(bugtracker) |
44 | |
45 | + @property |
46 | + def cancel_url(self): |
47 | + return canonical_url(self.context) |
48 | + |
49 | |
50 | class BugTrackerSetView(LaunchpadView): |
51 | """View for actions on the bugtracker index pages.""" |
52 | @@ -194,9 +188,6 @@ |
53 | class BugTrackerEditView(LaunchpadEditFormView): |
54 | |
55 | schema = IBugTracker |
56 | - field_names = ['name', 'title', 'bugtrackertype', |
57 | - 'summary', 'baseurl', 'aliases', 'contactdetails', |
58 | - 'active'] |
59 | |
60 | custom_widget('summary', TextAreaWidget, width=30, height=5) |
61 | custom_widget('aliases', DelimitedListWidget, height=3) |
62 | @@ -379,8 +370,21 @@ |
63 | return RemoteBug(self.context, remotebug, bugs) |
64 | |
65 | |
66 | +class BugTrackerSetBreadcrumbBuilder(BreadcrumbBuilder): |
67 | + """Builds a breadcrumb for the `IBugTrackerSet`.""" |
68 | + |
69 | + rootsite = None |
70 | + |
71 | + @property |
72 | + def text(self): |
73 | + return u"Bug trackers" |
74 | + |
75 | + |
76 | class BugTrackerBreadcrumbBuilder(BreadcrumbBuilder): |
77 | """Builds a breadcrumb for an `IBugTracker`.""" |
78 | + |
79 | + rootsite = None |
80 | + |
81 | @property |
82 | def text(self): |
83 | return self.context.title |
84 | @@ -401,3 +405,13 @@ |
85 | return 'Remote Bug #%s in %s' % (self.remotebug, |
86 | self.bugtracker.title) |
87 | |
88 | + |
89 | +class BugTrackerNavigationMenu(NavigationMenu): |
90 | + |
91 | + usedfor = BugTrackerView |
92 | + facet = 'bugs' |
93 | + links = ['edit'] |
94 | + |
95 | + def edit(self): |
96 | + text = 'Change details' |
97 | + return Link('+edit', text, icon='edit') |
98 | |
99 | === modified file 'lib/lp/bugs/browser/configure.zcml' |
100 | --- lib/lp/bugs/browser/configure.zcml 2009-08-21 15:33:18 +0000 |
101 | +++ lib/lp/bugs/browser/configure.zcml 2009-08-25 15:36:35 +0000 |
102 | @@ -712,8 +712,8 @@ |
103 | <browser:menus |
104 | module="lp.bugs.browser.bugtracker" |
105 | classes=" |
106 | - BugTrackerContextMenu |
107 | - BugTrackerSetContextMenu"/> |
108 | + BugTrackerSetContextMenu |
109 | + BugTrackerNavigationMenu"/> |
110 | <browser:navigation |
111 | module="lp.bugs.browser.bugtracker" |
112 | classes=" |
113 | @@ -725,7 +725,8 @@ |
114 | <browser:url |
115 | for="lp.bugs.interfaces.bugtracker.IBugTracker" |
116 | path_expression="string:${name}" |
117 | - parent_utility="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/> |
118 | + parent_utility="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
119 | + rootsite="bugs"/> |
120 | <browser:pages |
121 | for="lp.bugs.interfaces.bugtracker.IBugTracker" |
122 | class="lp.bugs.browser.bugtracker.BugTrackerView" |
123 | @@ -752,7 +753,8 @@ |
124 | <browser:url |
125 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
126 | path_expression="string:bugtrackers" |
127 | - parent_utility="canonical.launchpad.interfaces.IMaloneApplication"/> |
128 | + parent_utility="canonical.launchpad.interfaces.IMaloneApplication" |
129 | + rootsite="bugs"/> |
130 | <browser:pages |
131 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
132 | class="lp.bugs.browser.bugtracker.BugTrackerSetView" |
133 | |
134 | === modified file 'lib/lp/bugs/browser/tests/test_breadcrumbs.py' |
135 | --- lib/lp/bugs/browser/tests/test_breadcrumbs.py 2009-08-20 20:18:44 +0000 |
136 | +++ lib/lp/bugs/browser/tests/test_breadcrumbs.py 2009-08-25 15:29:48 +0000 |
137 | @@ -5,9 +5,12 @@ |
138 | |
139 | import unittest |
140 | |
141 | +from zope.component import getUtility |
142 | + |
143 | from canonical.launchpad.webapp.publisher import canonical_url |
144 | from canonical.launchpad.webapp.tests.breadcrumbs import ( |
145 | BaseBreadcrumbTestCase) |
146 | +from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
147 | from lp.testing import ANONYMOUS, login |
148 | |
149 | |
150 | @@ -56,5 +59,42 @@ |
151 | self._getBreadcrumbsTexts(url, self.traversed_objects)) |
152 | |
153 | |
154 | +class TestBugTrackerBreadcrumbBuilders(BaseBreadcrumbTestCase): |
155 | + |
156 | + def setUp(self): |
157 | + super(TestBugTrackerBreadcrumbBuilders, self).setUp() |
158 | + self.bug_tracker_set = getUtility(IBugTrackerSet) |
159 | + self.bug_tracker_set_url = canonical_url( |
160 | + self.bug_tracker_set, rootsite='bugs') |
161 | + self.bug_tracker = self.factory.makeBugTracker() |
162 | + self.bug_tracker_url = canonical_url( |
163 | + self.bug_tracker, rootsite='bugs') |
164 | + |
165 | + def test_bug_tracker_set(self): |
166 | + # Check TestBugTrackerSetBreadcrumbBuilder. |
167 | + traversed_objects = [ |
168 | + self.root, self.bug_tracker_set] |
169 | + urls = self._getBreadcrumbsURLs( |
170 | + self.bug_tracker_set_url, traversed_objects) |
171 | + self.assertEquals(self.bug_tracker_set_url, urls[-1]) |
172 | + texts = self._getBreadcrumbsTexts( |
173 | + self.bug_tracker_set_url, traversed_objects) |
174 | + self.assertEquals("Bug trackers", texts[-1]) |
175 | + |
176 | + def test_bug_tracker(self): |
177 | + # Check TestBugTrackerBreadcrumbBuilder (and |
178 | + # TestBugTrackerSetBreadcrumbBuilder). |
179 | + traversed_objects = [ |
180 | + self.root, self.bug_tracker_set, self.bug_tracker] |
181 | + urls = self._getBreadcrumbsURLs( |
182 | + self.bug_tracker_url, traversed_objects) |
183 | + self.assertEquals(self.bug_tracker_url, urls[-1]) |
184 | + self.assertEquals(self.bug_tracker_set_url, urls[-2]) |
185 | + texts = self._getBreadcrumbsTexts( |
186 | + self.bug_tracker_url, traversed_objects) |
187 | + self.assertEquals(self.bug_tracker.title, texts[-1]) |
188 | + self.assertEquals("Bug trackers", texts[-2]) |
189 | + |
190 | + |
191 | def test_suite(): |
192 | return unittest.TestLoader().loadTestsFromName(__name__) |
193 | |
194 | === modified file 'lib/lp/bugs/configure.zcml' |
195 | --- lib/lp/bugs/configure.zcml 2009-08-22 16:01:03 +0000 |
196 | +++ lib/lp/bugs/configure.zcml 2009-08-25 15:29:48 +0000 |
197 | @@ -398,6 +398,11 @@ |
198 | <allow |
199 | interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/> |
200 | </securedutility> |
201 | + <adapter |
202 | + provides="canonical.launchpad.webapp.interfaces.IBreadcrumbBuilder" |
203 | + for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
204 | + factory="lp.bugs.browser.bugtracker.BugTrackerSetBreadcrumbBuilder" |
205 | + permission="zope.Public"/> |
206 | |
207 | <!-- BugTrackerAlias --> |
208 | |
209 | |
210 | === modified file 'lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt' |
211 | --- lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-06-12 16:36:02 +0000 |
212 | +++ lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-08-25 15:59:44 +0000 |
213 | @@ -1,10 +1,11 @@ |
214 | = Bug trackers in Launchpad = |
215 | |
216 | -The bug trackers index page has the same navigation as the main Bugs page. |
217 | +The bug trackers index page has the same navigation as the main Bugs |
218 | +page, with the addition of a breadcrumb itself. |
219 | |
220 | >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers') |
221 | >>> print_location(user_browser.contents) |
222 | - Hierarchy: Launchpad |
223 | + Hierarchy: Launchpad > Bug trackers |
224 | Tabs: |
225 | * Launchpad Home - http://launchpad.dev/ |
226 | * Code - http://code.launchpad.dev/ |
227 | @@ -145,7 +146,7 @@ |
228 | |
229 | >>> user_browser.getLink("Register another bug tracker").click() |
230 | >>> user_browser.url |
231 | - 'http://launchpad.dev/bugs/bugtrackers/+newbugtracker' |
232 | + 'http://bugs.launchpad.dev/bugs/bugtrackers/+newbugtracker' |
233 | |
234 | In fact, the link is there twice: once at the top of the page, once at |
235 | the bottom. |
236 | |
237 | === modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt' |
238 | --- lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2009-07-01 13:16:44 +0000 |
239 | +++ lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2009-08-25 15:59:44 +0000 |
240 | @@ -17,6 +17,12 @@ |
241 | >>> user_browser.title |
242 | 'Register an external bug tracker' |
243 | |
244 | +In case the user gets cold feet, there is always a cancel link that |
245 | +takes them back to the bug tracker listing page. |
246 | + |
247 | + >>> user_browser.getLink('Cancel').url |
248 | + 'http://bugs.launchpad.dev/bugs/bugtrackers' |
249 | + |
250 | Supported external bug tracker types include Bugzilla, Debbugs, |
251 | Roundup, SourceForge and Trac. We don't provide all of these as |
252 | options to the user. We don't provide Debbugs because the status |
253 | @@ -133,7 +139,7 @@ |
254 | >>> user_browser.getControl('Location').value = 'http://bugzilla.example.org/' |
255 | >>> user_browser.getControl('Add').click() |
256 | >>> user_browser.url |
257 | - 'http://launchpad.dev/bugs/bugtrackers/test-bugzilla' |
258 | + 'http://bugs.launchpad.dev/bugs/bugtrackers/test-bugzilla' |
259 | |
260 | >>> login('test@canonical.com') |
261 | >>> bugtrackerset = getUtility(IBugTrackerSet) |
262 | @@ -167,7 +173,7 @@ |
263 | >>> user_browser.getLink('Change details').click() |
264 | |
265 | >>> user_browser.url |
266 | - 'http://launchpad.dev/bugs/bugtrackers/testmantis/+edit' |
267 | + 'http://bugs.launchpad.dev/bugs/bugtrackers/testmantis/+edit' |
268 | |
269 | >>> user_browser.title |
270 | 'Change details for \xe2\x80\x9cTest Mantis Tracker\xe2\x80\x9d bug tracker' |
271 | @@ -186,7 +192,7 @@ |
272 | >>> user_browser.getControl('Change').click() |
273 | |
274 | >>> user_browser.url |
275 | - 'http://launchpad.dev/bugs/bugtrackers/testmantis/+edit' |
276 | + 'http://bugs.launchpad.dev/bugs/bugtrackers/testmantis/+edit' |
277 | >>> for message in get_feedback_messages(user_browser.contents): |
278 | ... print message |
279 | There is 1 error. |
280 | @@ -221,7 +227,7 @@ |
281 | >>> user_browser.getControl('Change').click() |
282 | |
283 | >>> user_browser.url |
284 | - 'http://launchpad.dev/bugs/bugtrackers/testbugzilla' |
285 | + 'http://bugs.launchpad.dev/bugs/bugtrackers/testbugzilla' |
286 | |
287 | And now the test tracker should have been updated: |
288 | |
289 | @@ -345,13 +351,13 @@ |
290 | deletion yet: |
291 | |
292 | >>> user_browser.url |
293 | - 'http://launchpad.dev/bugs/bugtrackers/freddy' |
294 | + 'http://bugs.launchpad.dev/bugs/bugtrackers/freddy' |
295 | |
296 | >>> user_browser.getLink('Change details').click() |
297 | >>> user_browser.getControl('Delete').click() |
298 | |
299 | >>> user_browser.url |
300 | - 'http://launchpad.dev/bugs/bugtrackers' |
301 | + 'http://bugs.launchpad.dev/bugs/bugtrackers' |
302 | |
303 | >>> for message in get_feedback_messages(user_browser.contents): |
304 | ... print message |
305 | |
306 | === modified file 'lib/lp/bugs/templates/bugtracker-index.pt' |
307 | --- lib/lp/bugs/templates/bugtracker-index.pt 2009-07-17 17:59:07 +0000 |
308 | +++ lib/lp/bugs/templates/bugtracker-index.pt 2009-08-25 14:47:50 +0000 |
309 | @@ -1,134 +1,118 @@ |
310 | -<html |
311 | - xmlns="http://www.w3.org/1999/xhtml" |
312 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
313 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
314 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
315 | - xml:lang="en" |
316 | - lang="en" |
317 | - dir="ltr" |
318 | - metal:use-macro="context/@@main_template/master" |
319 | - i18n:domain="malone" |
320 | -> |
321 | - <body> |
322 | - <metal:heading fill-slot="pageheading"> |
323 | - <h1> |
324 | - <tal:tracker replace="context/title">Gnome Bugzilla</tal:tracker> |
325 | - overview |
326 | - </h1> |
327 | - |
328 | - <p tal:condition="not: context/active" id="inactive-message"> |
329 | - <strong> |
330 | - Bug watch updates for <tal:bugtracker content="context/title" /> |
331 | - are disabled. |
332 | - </strong> |
333 | - </p> |
334 | - </metal:heading> |
335 | - |
336 | -<metal:leftportlets fill-slot="portlets_one"> |
337 | +<bug-tracker-index |
338 | + xmlns="http://www.w3.org/1999/xhtml" |
339 | + xmlns:tal="http://xml.zope.org/namespaces/tal" |
340 | + xmlns:metal="http://xml.zope.org/namespaces/metal" |
341 | + xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
342 | + metal:use-macro="view/macro:page/main_side" |
343 | + i18n:domain="malone"> |
344 | + |
345 | + <metal:heading fill-slot="heading"> |
346 | + <h1> |
347 | + <tal:tracker replace="context/title">Gnome Bugzilla</tal:tracker> |
348 | + overview |
349 | + </h1> |
350 | + <p tal:condition="not: context/active" id="inactive-message"> |
351 | + <strong> |
352 | + Bug watch updates for <tal:bugtracker content="context/title" /> |
353 | + are disabled. |
354 | + </strong> |
355 | + </p> |
356 | + </metal:heading> |
357 | + |
358 | + <metal:side fill-slot="side"> |
359 | + <tal:menu replace="structure view/@@+global-actions" /> |
360 | <div tal:replace="structure context/@@+portlet-details" /> |
361 | -</metal:leftportlets> |
362 | - |
363 | -<metal:rightportlets fill-slot="portlets_two"> |
364 | <div tal:replace="structure context/@@+portlet-projects" /> |
365 | -</metal:rightportlets> |
366 | - |
367 | -<metal:macros fill-slot="bogus"> |
368 | - <metal:macro define-macro="watchlisting"> |
369 | - <table class="sortable listing" id="latestwatches"> |
370 | - <thead> |
371 | - <tr> |
372 | - <th>Launchpad bug</th> |
373 | - <th>Remote bug</th> |
374 | - <th>Status</th> |
375 | - </tr> |
376 | - </thead> |
377 | - |
378 | - <tbody> |
379 | - <tal:watches repeat="watch watches"> |
380 | - <tr tal:define="hide not:watch/bug/required:launchpad.View"> |
381 | - <tal:hide-watch-details condition="hide"> |
382 | - <td> |
383 | - <img alt="" src="/@@/bug" /> |
384 | - #<span tal:replace="watch/bug/id">34</span>: |
385 | - <em>(Private)</em> |
386 | - </td> |
387 | - <td><em>-</em></td> |
388 | - <td></td> |
389 | - </tal:hide-watch-details> |
390 | - <tal:show-watch-details condition="not:hide"> |
391 | - <td> |
392 | - <img alt="" src="/@@/bug" /> |
393 | - <a href="#" tal:attributes="href watch/bug/fmt:url"> |
394 | + </metal:side> |
395 | + |
396 | + <metal:macros fill-slot="bogus"> |
397 | + <metal:macro define-macro="watchlisting"> |
398 | + <table class="sortable listing" id="latestwatches"> |
399 | + <thead> |
400 | + <tr> |
401 | + <th>Launchpad bug</th> |
402 | + <th>Remote bug</th> |
403 | + <th>Status</th> |
404 | + </tr> |
405 | + </thead> |
406 | + <tbody> |
407 | + <tal:watches repeat="watch watches"> |
408 | + <tr tal:define="show watch/bug/required:launchpad.View"> |
409 | + <tal:hide-watch-details condition="not:show"> |
410 | + <td> |
411 | + <img alt="" src="/@@/bug" /> |
412 | #<span tal:replace="watch/bug/id">34</span>: |
413 | - <span tal:replace="watch/bug/title"> |
414 | - Launchpad Bug Title |
415 | - </span> |
416 | - </a> |
417 | - </td> |
418 | - <td> |
419 | - <a tal:replace="structure watch/fmt:external-link-short"> |
420 | - 1234 |
421 | - </a> |
422 | - </td> |
423 | - <td><tal:status tal:replace="watch/remotestatus"/></td> |
424 | - </tal:show-watch-details> |
425 | - </tr> |
426 | - </tal:watches> |
427 | - </tbody> |
428 | - </table> |
429 | - </metal:macro> |
430 | -</metal:macros> |
431 | - |
432 | -<div metal:fill-slot="main"> |
433 | - |
434 | - <p tal:content="context/summary"> |
435 | - $BugTracker.summary goes here. This should be quite short, |
436 | - just a single paragraph of text really, giving the BugTracker |
437 | - highlights. |
438 | - </p> |
439 | - |
440 | - <h2> |
441 | - Location |
442 | - </h2> |
443 | - |
444 | - <ul id="bugtracker-urls"> |
445 | - <li> |
446 | - <strong> |
447 | - <a tal:replace="structure context/fmt:external-link"> |
448 | - http://bugs.example.com/ |
449 | - </a> |
450 | - </strong> |
451 | - </li> |
452 | - <li tal:repeat="alias context/fmt:aliases"> |
453 | - <strong tal:content="alias" /> (Alias) |
454 | - </li> |
455 | - </ul> |
456 | - |
457 | - <h2 tal:condition="context/contactdetails"> |
458 | - Contact details |
459 | - </h2> |
460 | - |
461 | - <div tal:condition="context/contactdetails" |
462 | - tal:content="context/contactdetails" > |
463 | - The contact details for the admins of this bug tracker go here, so we |
464 | - can get to them in an emergency. |
465 | + <em>(Private)</em> |
466 | + </td> |
467 | + <td><em>-</em></td> |
468 | + <td></td> |
469 | + </tal:hide-watch-details> |
470 | + <tal:show-watch-details condition="show"> |
471 | + <td> |
472 | + <img alt="" src="/@@/bug" /> |
473 | + <a href="#" tal:attributes="href watch/bug/fmt:url"> |
474 | + #<span tal:replace="watch/bug/id">34</span>: |
475 | + <span tal:replace="watch/bug/title"> |
476 | + Launchpad Bug Title |
477 | + </span> |
478 | + </a> |
479 | + </td> |
480 | + <td> |
481 | + <a tal:replace="structure watch/fmt:external-link-short"> |
482 | + 1234 |
483 | + </a> |
484 | + </td> |
485 | + <td><tal:status tal:replace="watch/remotestatus"/></td> |
486 | + </tal:show-watch-details> |
487 | + </tr> |
488 | + </tal:watches> |
489 | + </tbody> |
490 | + </table> |
491 | + </metal:macro> |
492 | + </metal:macros> |
493 | + |
494 | + <div metal:fill-slot="main"> |
495 | + <div class="top-portlet"> |
496 | + <p tal:content="context/summary"> |
497 | + $BugTracker.summary goes here. This should be quite short, |
498 | + just a single paragraph of text really, giving the BugTracker |
499 | + highlights. |
500 | + </p> |
501 | + |
502 | + <h2> |
503 | + Location |
504 | + </h2> |
505 | + <ul id="bugtracker-urls"> |
506 | + <li> |
507 | + <strong> |
508 | + <a tal:replace="structure context/fmt:external-link"> |
509 | + http://bugs.example.com/ |
510 | + </a> |
511 | + </strong> |
512 | + </li> |
513 | + <li tal:repeat="alias context/fmt:aliases"> |
514 | + <strong tal:content="alias" /> (Alias) |
515 | + </li> |
516 | + </ul> |
517 | + |
518 | + <h2 tal:condition="context/contactdetails"> |
519 | + Contact details |
520 | + </h2> |
521 | + <div tal:condition="context/contactdetails" |
522 | + tal:content="context/contactdetails" > |
523 | + The contact details for the admins of this bug tracker go here, |
524 | + so we can get to them in an emergency. |
525 | + </div> |
526 | + |
527 | + <h2 tal:condition="context/watches">Bug watches</h2> |
528 | + <tal:navigation |
529 | + replace="structure view/batchnav/@@+navigation-links-upper" /> |
530 | + <tal:block define="watches view/batchnav/batch" condition="watches"> |
531 | + <metal:watches use-macro="template/macros/watchlisting" /> |
532 | + </tal:block> |
533 | + <tal:navigation |
534 | + replace="structure view/batchnav/@@+navigation-links-lower" /> |
535 | + </div> |
536 | </div> |
537 | |
538 | - <h2 tal:condition="context/watches">Bug watches</h2> |
539 | - <tal:navigation |
540 | - replace="structure view/batchnav/@@+navigation-links-upper" /> |
541 | - |
542 | - <tal:block define="watches view/batchnav/batch" |
543 | - condition="watches"> |
544 | - |
545 | - <metal:watches use-macro="template/macros/watchlisting" /> |
546 | - |
547 | - </tal:block> |
548 | - |
549 | - <tal:navigation |
550 | - replace="structure view/batchnav/@@+navigation-links-lower" /> |
551 | - |
552 | -</div> |
553 | - |
554 | -</body> |
555 | -</html> |
556 | +</bug-tracker-index> |
557 | |
558 | === modified file 'lib/lp/bugs/templates/bugtrackers-add.pt' |
559 | --- lib/lp/bugs/templates/bugtrackers-add.pt 2009-07-17 17:59:07 +0000 |
560 | +++ lib/lp/bugs/templates/bugtrackers-add.pt 2009-08-25 11:20:11 +0000 |
561 | @@ -1,12 +1,10 @@ |
562 | -<html |
563 | +<bug-trackers-add |
564 | xmlns="http://www.w3.org/1999/xhtml" |
565 | + xmlns:tal="http://xml.zope.org/namespaces/tal" |
566 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
567 | - metal:use-macro="view/macro:page/onecolumn" |
568 | -> |
569 | - <body> |
570 | - <h1 metal:fill-slot="heading">Register an external bug tracker</h1> |
571 | - <div metal:fill-slot="main"> |
572 | - <div metal:use-macro="context/@@launchpad_form/form" /> |
573 | - </div> |
574 | - </body> |
575 | -</html> |
576 | + xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
577 | + metal:use-macro="view/macro:page/main_only"> |
578 | + <div metal:fill-slot="main"> |
579 | + <div metal:use-macro="context/@@launchpad_form/form" /> |
580 | + </div> |
581 | +</bug-trackers-add> |
582 | |
583 | === modified file 'lib/lp/bugs/templates/bugtrackers-index.pt' |
584 | --- lib/lp/bugs/templates/bugtrackers-index.pt 2009-07-17 17:59:07 +0000 |
585 | +++ lib/lp/bugs/templates/bugtrackers-index.pt 2009-08-25 15:59:15 +0000 |
586 | @@ -1,126 +1,94 @@ |
587 | -<html |
588 | +<bug-trackers-index |
589 | xmlns="http://www.w3.org/1999/xhtml" |
590 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
591 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
592 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
593 | - xml:lang="en" |
594 | - lang="en" |
595 | - dir="ltr" |
596 | - metal:use-macro="view/macro:page/onecolumn" |
597 | -> |
598 | - <body> |
599 | - <div metal:fill-slot="main"> |
600 | - <h1>Bug trackers registered in Launchpad</h1> |
601 | - <p> |
602 | - A bug report in Launchpad can be linked to a bug report in any of |
603 | - these bug trackers. |
604 | - The status of the external bug report is shown in Launchpad, and |
605 | - Launchpad subscribers are notified when the external status changes. |
606 | - </p> |
607 | - |
608 | - <p |
609 | - tal:define="link context/menu:context/newbugtracker" |
610 | - tal:content="structure link/render" |
611 | - tal:condition="link/enabled"> |
612 | - Add a new bug tracker |
613 | - </p> |
614 | - |
615 | - <table class="sortable listing" id="trackers"> |
616 | - <thead> |
617 | - <tr> |
618 | - <th>Title</th> |
619 | - <th>Location</th> |
620 | - <th>Linked Projects</th> |
621 | - <th class="type">Type</th> |
622 | - <th class="amount">Watches</th> |
623 | - </tr> |
624 | - </thead> |
625 | - |
626 | - <tbody> |
627 | - <tr tal:repeat="bugtracker view/active_bug_trackers"> |
628 | - <td> |
629 | - <a tal:replace="structure bugtracker/fmt:link" /> |
630 | - </td> |
631 | - <td> |
632 | - <a tal:replace="structure bugtracker/fmt:external-link" /> |
633 | - </td> |
634 | - <td tal:define="pillar_data python:view.getPillarData(bugtracker)"> |
635 | - <tal:pillars condition="pillar_data"> |
636 | - <tal:pillar-entry repeat="pillar pillar_data/pillars"> |
637 | + metal:use-macro="view/macro:page/main_only"> |
638 | + |
639 | + <metal:macros fill-slot="bogus"> |
640 | + <metal:macro define-macro="tracker-table"> |
641 | + <table class="sortable listing" tal:attributes="id id"> |
642 | + <thead> |
643 | + <tr> |
644 | + <th>Title</th> |
645 | + <th>Location</th> |
646 | + <th>Linked Projects</th> |
647 | + <th class="type">Type</th> |
648 | + <th class="amount">Watches</th> |
649 | + </tr> |
650 | + </thead> |
651 | + <tbody> |
652 | + <tr tal:repeat="tracker trackers"> |
653 | + <td> |
654 | + <a tal:replace="structure tracker/fmt:link" /> |
655 | + </td> |
656 | + <td> |
657 | + <a tal:replace="structure tracker/fmt:external-link" /> |
658 | + </td> |
659 | + <td tal:define="pillar_data python:view.getPillarData(tracker)"> |
660 | + <tal:pillars condition="pillar_data"> |
661 | + <tal:pillar-entry repeat="pillar pillar_data/pillars"> |
662 | <a tal:attributes="href pillar/fmt:url" |
663 | tal:content="pillar/displayname" |
664 | ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma> |
665 | - </tal:pillar-entry> |
666 | - <tal:many-pillars |
667 | - condition="pillar_data/has_more_pillars"> |
668 | - … |
669 | - </tal:many-pillars> |
670 | - </tal:pillars> |
671 | - <tal:no-pillars condition="not: pillar_data"> |
672 | - — |
673 | - </tal:no-pillars> |
674 | - </td> |
675 | - <td class="type" |
676 | - tal:content="bugtracker/bugtrackertype/title">bugtrackertype</td> |
677 | - <td class="amount" tal:content="bugtracker/watches/count">bugcount</td> |
678 | - </tr> |
679 | - </tbody> |
680 | - </table> |
681 | - |
682 | - <p |
683 | - tal:define="link context/menu:context/newbugtracker" |
684 | - tal:content="structure link/render" |
685 | - tal:condition="link/enabled"> |
686 | - Add a new bug tracker |
687 | - </p> |
688 | - |
689 | - <tal:inactive-bug-trackers condition="view/inactive_bug_trackers"> |
690 | - <h1>Inactive bug trackers</h1> |
691 | - |
692 | - <table class="sortable listing" id="inactive-trackers"> |
693 | - <thead> |
694 | - <tr> |
695 | - <th>Title</th> |
696 | - <th>Location</th> |
697 | - <th>Linked Projects</th> |
698 | - <th class="type">Type</th> |
699 | - <th class="amount">Watches</th> |
700 | - </tr> |
701 | - </thead> |
702 | - |
703 | - <tbody> |
704 | - <tr tal:repeat="bugtracker view/inactive_bug_trackers"> |
705 | - <td> |
706 | - <a tal:replace="structure bugtracker/fmt:link" /> |
707 | - </td> |
708 | - <td> |
709 | - <a tal:replace="structure bugtracker/fmt:external-link" /> |
710 | - </td> |
711 | - <td tal:define="pillar_data python:view.getPillarData(bugtracker)"> |
712 | - <tal:pillars condition="pillar_data"> |
713 | - <tal:pillar-entry repeat="pillar pillar_data/pillars"> |
714 | - <a tal:attributes="href pillar/fmt:url" |
715 | - tal:content="pillar/displayname" |
716 | - ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma> |
717 | </tal:pillar-entry> |
718 | <tal:many-pillars |
719 | - condition="pillar_data/has_more_pillars"> |
720 | - … |
721 | + condition="pillar_data/has_more_pillars"> |
722 | + … |
723 | </tal:many-pillars> |
724 | </tal:pillars> |
725 | <tal:no-pillars condition="not: pillar_data"> |
726 | - — |
727 | + — |
728 | </tal:no-pillars> |
729 | </td> |
730 | <td class="type" |
731 | - tal:content="bugtracker/bugtrackertype/title">bugtrackertype</td> |
732 | - <td class="amount" tal:content="bugtracker/watches/count">bugcount</td> |
733 | - </tr> |
734 | - </tbody> |
735 | - </table> |
736 | - </tal:inactive-bug-trackers> |
737 | - |
738 | -</div> |
739 | - |
740 | -</body> |
741 | -</html> |
742 | + tal:content="tracker/bugtrackertype/title">bugtrackertype</td> |
743 | + <td class="amount" tal:content="tracker/watches/count">bugcount</td> |
744 | + </tr> |
745 | + </tbody> |
746 | + </table> |
747 | + </metal:macro> |
748 | + </metal:macros> |
749 | + |
750 | + <div metal:fill-slot="heading"> |
751 | + <h1 tal:content="context/title" /> |
752 | + </div> |
753 | + |
754 | + <div metal:fill-slot="main"> |
755 | + <div class="yui-u"> |
756 | + <div class="top-portlet"> |
757 | + <p> |
758 | + A bug report in Launchpad can be linked to a bug report in any |
759 | + of these bug trackers. The status of the external bug report is |
760 | + shown in Launchpad, and Launchpad subscribers are notified when |
761 | + the external status changes. |
762 | + </p> |
763 | + <p tal:define="link context/menu:context/newbugtracker" |
764 | + tal:content="structure link/render" |
765 | + tal:condition="link/enabled"> |
766 | + Add a new bug tracker |
767 | + </p> |
768 | + <tal:table define="id string:trackers; |
769 | + trackers view/active_bug_trackers"> |
770 | + <metal:table use-macro="template/macros/tracker-table" /> |
771 | + </tal:table> |
772 | + <p style="margin-top: 1em" |
773 | + tal:define="link context/menu:context/newbugtracker" |
774 | + tal:content="structure link/render" |
775 | + tal:condition="link/enabled"> |
776 | + Add a new bug tracker |
777 | + </p> |
778 | + </div> |
779 | + </div> |
780 | + <div class="yui-u" condition="view/inactive_bug_trackers"> |
781 | + <div class="portlet"> |
782 | + <h2>Inactive bug trackers</h2> |
783 | + <tal:table define="id string:inactive-trackers; |
784 | + trackers view/inactive_bug_trackers"> |
785 | + <metal:table use-macro="template/macros/tracker-table" /> |
786 | + </tal:table> |
787 | + </div> |
788 | + </div> |
789 | + </div> |
790 | + |
791 | +</bug-trackers-index> |
This branch begins the conversion of all the templates relating to
external bug trackers.
Test: ./bin/test -vvt bug-?tracker
Lint free.
lib/lp/ bugs/browser/ bugtracker. py
Removed BugTrackerConte xtMenu; unused.
Added a cancel link to the +newbugtracker form view.
New breadcrumb for the bug trackers index page (the one that shows a
list of bug trackers). Previously this has only ever been available
by URL manipulation or going back to the bugs front page.
New navigation menu for bug tracker overview pages. Only contains an
edit link for now (and is basically a copy of the old context menu).
lib/lp/ bugs/browser/ configure. zcml
Set up menus and force the rootsite of bug trackers and the bug
tracker set to "bugs".
lib/lp/ bugs/browser/ tests/test_ breadcrumbs. py
Tests for the new IBugTrackerSet breadcrumb and the existing
IBugTracker breadcrumb.
lib/lp/ bugs/configure. zcml
Register the new breadcrumb.
lib/lp/ bugs/stories/ bugtracker/ bugtrackers- index.txt bugs/stories/ bugtracker/ xx-bugtracker. txt
lib/lp/
Fix up for the new breadcrumb and rootsite settings.
lib/lp/ bugs/templates/ bugtracker- index.pt
Pretty simple conversion to the 3.0 layout. Put the portlets into
the new "side" slot and render the new navigation menu. The diff is
big because I reindented and tidied things up.
Learnt about the "bogus" slot hack to make macros work. Ugly, but
better than copy and pasting.
lib/lp/ bugs/templates/ bugtrackers- add.pt
Trivial template conversion.
lib/lp/ bugs/templates/ bugtrackers- index.pt
Pretty simple conversion. Used the "bogus" slot macro hack because
the tables were nearly identical.