Merge lp:~allenap/launchpad/ui-convert-bug-tracker-3.0-bug-418155 into lp:launchpad

Proposed by Gavin Panella
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
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Michael Nelson (community) ui Approve
Review via email: mp+10669@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

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 BugTrackerContextMenu; 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
lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt

  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.

Revision history for this message
Gavin Panella (allenap) wrote :

To have a play, try:

 * Go to the bug trackers page (for IBugTrackerSet) at
   <https://bugs.launchpad.dev/bugs/bugtrackers>,

 * 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.

Revision history for this message
Brad Crittenden (bac) wrote :
Download full text (24.9 KiB)

Hi Gavin,

* Have you scheduled a UI review for this branch yet?
* Why to (+) Register links on https://bugs.launchpad.dev/bugs/bugtrackers ?
* 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://bugs.launchpad.dev/bugs/bugtrackers/debbugs
* At https://bugs.launchpad.dev/bugs/bugtrackers/gnome-bugzilla the
  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/bugs/browser/bugtracker.py'
> --- lib/lp/bugs/browser/bugtracker.py 2009-06-25 00:40:31 +0000
+++ lib/lp/bugs/browser/bugtracker.py 2009-08-25 15:36:35 +0000
> @@ -379,8 +370,21 @@
> return RemoteBug(self.context, remotebug, bugs)
>
>
> +class BugTrackerSetBreadcrumbBuilder(BreadcrumbBuilder):
> + """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 BugTrackerBreadcrumbBuilder(BreadcrumbBuilder):
> """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.title)
>
> +
> +class BugTrackerNavigationMenu(NavigationMenu):
> +
> + usedfor = BugTrackerView
> + facet = 'bugs'
> + links = ['edit']
> +
> + def edit(self):
> + text = 'Change details'
> + return Link('+edit', text, icon='edit')

> === modified file 'lib/lp/bugs/browser/tests/test_breadcrumbs.py'
> --- lib/lp/bugs/browser/tests/test_breadcrumbs.py 2009-08-20 20:18:44 +0000
> +++ lib/lp/bugs/browser/tests/test_breadcrumbs.py 2009-08-25 15:29:48 +0000
> @@ -56,5 +59,42 @@
> self._getBreadcrumbsTexts(url, self.traversed_objects))
>
>
> +class TestBugTrackerBreadcrumbBuilders(BaseBreadcrumbTestCase):
> + def setUp(self):
> + super(TestBugTrackerBreadcrumbBuilders, self).setUp()
> + self.bug_tracker_set = getUtility(IBugTrackerSet)
> + self.bug_tracker_set_url = canonical_url(
> + self.bug_tracker_set, rootsite='bugs')
> + self.bug_tracker = self.factory.makeBugTracker()
> + self.bug_tracker_url = canonical_url(
> + self.bug_tracker, rootsite='...

review: Approve (code)
Revision history for this message
Brad Crittenden (bac) :
review: Needs Fixing (code)
Revision history for this message
Gavin Panella (allenap) wrote :
Download full text (28.7 KiB)

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://bugs.launchpad.dev/bugs/bugtrackers ?

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://bugs.launchpad.dev/bugs/bugtrackers/debbugs

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://bugs.launchpad.dev/bugs/bugtrackers/gnome-bugzilla the
> 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/bugs/browser/bugtracker.py'
> > --- lib/lp/bugs/browser/bugtracker.py 2009-06-25 00:40:31 +0000
> +++ lib/lp/bugs/browser/bugtracker.py 2009-08-25 15:36:35 +0000
> > @@ -379,8 +370,21 @@
> > return RemoteBug(self.context, remotebug, bugs)
> >
> >
> > +class BugTrackerSetBreadcrumbBuilder(BreadcrumbBuilder):
> > + """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 BugTrackerBreadcrumbBuilder(BreadcrumbBuilder):
> > """Builds a breadcrumb for an `IBugTracker`."""
> > +
> > + rootsite = None
> > +
> > @property
> > def t...

=== modified file 'lib/lp/bugs/templates/bugtracker-index.pt'
--- lib/lp/bugs/templates/bugtracker-index.pt 2009-08-25 14:47:50 +0000
+++ lib/lp/bugs/templates/bugtracker-index.pt 2009-08-28 08:53:00 +0000
@@ -79,9 +79,7 @@
79 highlights.79 highlights.
80 </p>80 </p>
8181
82 <h2>82 <h2>Location</h2>
83 Location
84 </h2>
85 <ul id="bugtracker-urls">83 <ul id="bugtracker-urls">
86 <li>84 <li>
87 <strong>85 <strong>
@@ -95,23 +93,25 @@
95 </li>93 </li>
96 </ul>94 </ul>
9795
98 <h2 tal:condition="context/contactdetails">96 <tal:contact-details condition="context/contactdetails">
99 Contact details97 <h2>Contact details</h2>
100 </h2>98 <div tal:condition="context/contactdetails"
101 <div tal:condition="context/contactdetails"99 tal:content="context/contactdetails" >
102 tal:content="context/contactdetails" >100 The contact details for the admins of this bug tracker go
103 The contact details for the admins of this bug tracker go here,101 here, so we can get to them in an emergency.
104 so we can get to them in an emergency.102 </div>
105 </div>103 </tal:contact-details>
106104
107 <h2 tal:condition="context/watches">Bug watches</h2>105 <tal:watches condition="context/watches">
108 <tal:navigation106 <h2>Bug watches</h2>
109 replace="structure view/batchnav/@@+navigation-links-upper" />107 <tal:navigation
110 <tal:block define="watches view/batchnav/batch" condition="watches">108 replace="structure view/batchnav/@@+navigation-links-upper" />
111 <metal:watches use-macro="template/macros/watchlisting" />109 <tal:block define="watches view/batchnav/batch" condition="watches">
112 </tal:block>110 <metal:watches use-macro="template/macros/watchlisting" />
113 <tal:navigation111 </tal:block>
114 replace="structure view/batchnav/@@+navigation-links-lower" />112 <tal:navigation
113 replace="structure view/batchnav/@@+navigation-links-lower" />
114 </tal:watches>
115 </div>115 </div>
116 </div>116 </div>
117117
Revision history for this message
Michael Nelson (michael.nelson) wrote :

> To have a play, try:
>
> * Go to the bug trackers page (for IBugTrackerSet) at
> <https://bugs.launchpad.dev/bugs/bugtrackers>,

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-but-related issues here:

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://dev.launchpad.net/VersionThreeDotO/UI/Conversion#Choose the layout

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://edge.launchpad.net/firefox). I've only seen one 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://edge.launchpad.net/builders

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.

review: Needs Fixing (ui)
Revision history for this message
Gavin Panella (allenap) wrote :
Download full text (3.5 KiB)

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://bugs.launchpad.dev/bugs/bugtrackers>,
>
> 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-but-related issues here:
>
> 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://dev.launchpad.net/VersionThreeDotO/UI/Conversion#Choose the layout
>
> 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://edge.launchpad.net/firefox). I've only seen one
> 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://edge.launchpad.net/builders
>
> 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...

Read more...

Revision history for this message
Michael Nelson (michael.nelson) wrote :
Download full text (4.5 KiB)

> 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://bugs.launchpad.dev/bugs/bugtrackers>,
> >
> > 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-but-related issues here:
> >
> > 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://dev.launchpad.net/VersionThreeDotO/UI/Conversion#Choose the layout
> >
> > 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://edge.launchpad.net/firefox). I've only seen one
> > 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://edge.launchpad.net/builders
> >
> > 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...

Read more...

review: Approve (ui)
Revision history for this message
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="/projects/">registered project</a> to a
  registered bug tracker in the project's &ldquo;Change details&rdquo;
  page.

People do sometimes have issues with this, and a wording change here
might help.

Revision history for this message
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="/projects/">registered project</a> to a
> registered bug tracker in the project's &ldquo;Change details&rdquo;
> page.
>
> People do sometimes have issues with this, and a wording change here
> might help.

Perfect.

Revision history for this message
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.

review: Approve (code)
Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/browser/bugtracker.py'
--- lib/lp/bugs/browser/bugtracker.py 2009-06-25 00:40:31 +0000
+++ lib/lp/bugs/browser/bugtracker.py 2009-08-25 15:36:35 +0000
@@ -8,9 +8,9 @@
8__all__ = [8__all__ = [
9 'BugTrackerAddView',9 'BugTrackerAddView',
10 'BugTrackerBreadcrumbBuilder',10 'BugTrackerBreadcrumbBuilder',
11 'BugTrackerContextMenu',
12 'BugTrackerEditView',11 'BugTrackerEditView',
13 'BugTrackerNavigation',12 'BugTrackerNavigation',
13 'BugTrackerNavigationMenu',
14 'BugTrackerSetContextMenu',14 'BugTrackerSetContextMenu',
15 'BugTrackerSetNavigation',15 'BugTrackerSetNavigation',
16 'BugTrackerSetView',16 'BugTrackerSetView',
@@ -42,6 +42,7 @@
42from canonical.launchpad.webapp.authorization import check_permission42from canonical.launchpad.webapp.authorization import check_permission
43from canonical.launchpad.webapp.batching import BatchNavigator43from canonical.launchpad.webapp.batching import BatchNavigator
44from canonical.launchpad.webapp.breadcrumb import BreadcrumbBuilder44from canonical.launchpad.webapp.breadcrumb import BreadcrumbBuilder
45from canonical.launchpad.webapp.menu import NavigationMenu
45from canonical.widgets import DelimitedListWidget, LaunchpadRadioWidget46from canonical.widgets import DelimitedListWidget, LaunchpadRadioWidget
4647
4748
@@ -63,17 +64,6 @@
63 usedfor = IBugTrackerSet64 usedfor = IBugTrackerSet
6465
6566
66class BugTrackerContextMenu(ContextMenu):
67
68 usedfor = IBugTracker
69
70 links = ['edit']
71
72 def edit(self):
73 text = 'Change details'
74 return Link('+edit', text, icon='edit')
75
76
77class BugTrackerSetContextMenu(ContextMenu):67class BugTrackerSetContextMenu(ContextMenu):
7868
79 usedfor = IBugTrackerSet69 usedfor = IBugTrackerSet
@@ -125,6 +115,10 @@
125 owner=getUtility(ILaunchBag).user)115 owner=getUtility(ILaunchBag).user)
126 self.next_url = canonical_url(bugtracker)116 self.next_url = canonical_url(bugtracker)
127117
118 @property
119 def cancel_url(self):
120 return canonical_url(self.context)
121
128122
129class BugTrackerSetView(LaunchpadView):123class BugTrackerSetView(LaunchpadView):
130 """View for actions on the bugtracker index pages."""124 """View for actions on the bugtracker index pages."""
@@ -194,9 +188,6 @@
194class BugTrackerEditView(LaunchpadEditFormView):188class BugTrackerEditView(LaunchpadEditFormView):
195189
196 schema = IBugTracker190 schema = IBugTracker
197 field_names = ['name', 'title', 'bugtrackertype',
198 'summary', 'baseurl', 'aliases', 'contactdetails',
199 'active']
200191
201 custom_widget('summary', TextAreaWidget, width=30, height=5)192 custom_widget('summary', TextAreaWidget, width=30, height=5)
202 custom_widget('aliases', DelimitedListWidget, height=3)193 custom_widget('aliases', DelimitedListWidget, height=3)
@@ -379,8 +370,21 @@
379 return RemoteBug(self.context, remotebug, bugs)370 return RemoteBug(self.context, remotebug, bugs)
380371
381372
373class BugTrackerSetBreadcrumbBuilder(BreadcrumbBuilder):
374 """Builds a breadcrumb for the `IBugTrackerSet`."""
375
376 rootsite = None
377
378 @property
379 def text(self):
380 return u"Bug trackers"
381
382
382class BugTrackerBreadcrumbBuilder(BreadcrumbBuilder):383class BugTrackerBreadcrumbBuilder(BreadcrumbBuilder):
383 """Builds a breadcrumb for an `IBugTracker`."""384 """Builds a breadcrumb for an `IBugTracker`."""
385
386 rootsite = None
387
384 @property388 @property
385 def text(self):389 def text(self):
386 return self.context.title390 return self.context.title
@@ -401,3 +405,13 @@
401 return 'Remote Bug #%s in %s' % (self.remotebug,405 return 'Remote Bug #%s in %s' % (self.remotebug,
402 self.bugtracker.title)406 self.bugtracker.title)
403407
408
409class BugTrackerNavigationMenu(NavigationMenu):
410
411 usedfor = BugTrackerView
412 facet = 'bugs'
413 links = ['edit']
414
415 def edit(self):
416 text = 'Change details'
417 return Link('+edit', text, icon='edit')
404418
=== modified file 'lib/lp/bugs/browser/configure.zcml'
--- lib/lp/bugs/browser/configure.zcml 2009-08-21 15:33:18 +0000
+++ lib/lp/bugs/browser/configure.zcml 2009-08-25 15:36:35 +0000
@@ -712,8 +712,8 @@
712 <browser:menus712 <browser:menus
713 module="lp.bugs.browser.bugtracker"713 module="lp.bugs.browser.bugtracker"
714 classes="714 classes="
715 BugTrackerContextMenu715 BugTrackerSetContextMenu
716 BugTrackerSetContextMenu"/>716 BugTrackerNavigationMenu"/>
717 <browser:navigation717 <browser:navigation
718 module="lp.bugs.browser.bugtracker"718 module="lp.bugs.browser.bugtracker"
719 classes="719 classes="
@@ -725,7 +725,8 @@
725 <browser:url725 <browser:url
726 for="lp.bugs.interfaces.bugtracker.IBugTracker"726 for="lp.bugs.interfaces.bugtracker.IBugTracker"
727 path_expression="string:${name}"727 path_expression="string:${name}"
728 parent_utility="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/>728 parent_utility="lp.bugs.interfaces.bugtracker.IBugTrackerSet"
729 rootsite="bugs"/>
729 <browser:pages730 <browser:pages
730 for="lp.bugs.interfaces.bugtracker.IBugTracker"731 for="lp.bugs.interfaces.bugtracker.IBugTracker"
731 class="lp.bugs.browser.bugtracker.BugTrackerView"732 class="lp.bugs.browser.bugtracker.BugTrackerView"
@@ -752,7 +753,8 @@
752 <browser:url753 <browser:url
753 for="lp.bugs.interfaces.bugtracker.IBugTrackerSet"754 for="lp.bugs.interfaces.bugtracker.IBugTrackerSet"
754 path_expression="string:bugtrackers"755 path_expression="string:bugtrackers"
755 parent_utility="canonical.launchpad.interfaces.IMaloneApplication"/>756 parent_utility="canonical.launchpad.interfaces.IMaloneApplication"
757 rootsite="bugs"/>
756 <browser:pages758 <browser:pages
757 for="lp.bugs.interfaces.bugtracker.IBugTrackerSet"759 for="lp.bugs.interfaces.bugtracker.IBugTrackerSet"
758 class="lp.bugs.browser.bugtracker.BugTrackerSetView"760 class="lp.bugs.browser.bugtracker.BugTrackerSetView"
759761
=== modified file 'lib/lp/bugs/browser/tests/test_breadcrumbs.py'
--- lib/lp/bugs/browser/tests/test_breadcrumbs.py 2009-08-20 20:18:44 +0000
+++ lib/lp/bugs/browser/tests/test_breadcrumbs.py 2009-08-25 15:29:48 +0000
@@ -5,9 +5,12 @@
55
6import unittest6import unittest
77
8from zope.component import getUtility
9
8from canonical.launchpad.webapp.publisher import canonical_url10from canonical.launchpad.webapp.publisher import canonical_url
9from canonical.launchpad.webapp.tests.breadcrumbs import (11from canonical.launchpad.webapp.tests.breadcrumbs import (
10 BaseBreadcrumbTestCase)12 BaseBreadcrumbTestCase)
13from lp.bugs.interfaces.bugtracker import IBugTrackerSet
11from lp.testing import ANONYMOUS, login14from lp.testing import ANONYMOUS, login
1215
1316
@@ -56,5 +59,42 @@
56 self._getBreadcrumbsTexts(url, self.traversed_objects))59 self._getBreadcrumbsTexts(url, self.traversed_objects))
5760
5861
62class TestBugTrackerBreadcrumbBuilders(BaseBreadcrumbTestCase):
63
64 def setUp(self):
65 super(TestBugTrackerBreadcrumbBuilders, self).setUp()
66 self.bug_tracker_set = getUtility(IBugTrackerSet)
67 self.bug_tracker_set_url = canonical_url(
68 self.bug_tracker_set, rootsite='bugs')
69 self.bug_tracker = self.factory.makeBugTracker()
70 self.bug_tracker_url = canonical_url(
71 self.bug_tracker, rootsite='bugs')
72
73 def test_bug_tracker_set(self):
74 # Check TestBugTrackerSetBreadcrumbBuilder.
75 traversed_objects = [
76 self.root, self.bug_tracker_set]
77 urls = self._getBreadcrumbsURLs(
78 self.bug_tracker_set_url, traversed_objects)
79 self.assertEquals(self.bug_tracker_set_url, urls[-1])
80 texts = self._getBreadcrumbsTexts(
81 self.bug_tracker_set_url, traversed_objects)
82 self.assertEquals("Bug trackers", texts[-1])
83
84 def test_bug_tracker(self):
85 # Check TestBugTrackerBreadcrumbBuilder (and
86 # TestBugTrackerSetBreadcrumbBuilder).
87 traversed_objects = [
88 self.root, self.bug_tracker_set, self.bug_tracker]
89 urls = self._getBreadcrumbsURLs(
90 self.bug_tracker_url, traversed_objects)
91 self.assertEquals(self.bug_tracker_url, urls[-1])
92 self.assertEquals(self.bug_tracker_set_url, urls[-2])
93 texts = self._getBreadcrumbsTexts(
94 self.bug_tracker_url, traversed_objects)
95 self.assertEquals(self.bug_tracker.title, texts[-1])
96 self.assertEquals("Bug trackers", texts[-2])
97
98
59def test_suite():99def test_suite():
60 return unittest.TestLoader().loadTestsFromName(__name__)100 return unittest.TestLoader().loadTestsFromName(__name__)
61101
=== modified file 'lib/lp/bugs/configure.zcml'
--- lib/lp/bugs/configure.zcml 2009-08-22 16:01:03 +0000
+++ lib/lp/bugs/configure.zcml 2009-08-25 15:29:48 +0000
@@ -398,6 +398,11 @@
398 <allow398 <allow
399 interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/>399 interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/>
400 </securedutility>400 </securedutility>
401 <adapter
402 provides="canonical.launchpad.webapp.interfaces.IBreadcrumbBuilder"
403 for="lp.bugs.interfaces.bugtracker.IBugTrackerSet"
404 factory="lp.bugs.browser.bugtracker.BugTrackerSetBreadcrumbBuilder"
405 permission="zope.Public"/>
401 406
402 <!-- BugTrackerAlias -->407 <!-- BugTrackerAlias -->
403 408
404409
=== modified file 'lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt'
--- lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-06-12 16:36:02 +0000
+++ lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-08-25 15:59:44 +0000
@@ -1,10 +1,11 @@
1= Bug trackers in Launchpad =1= Bug trackers in Launchpad =
22
3The bug trackers index page has the same navigation as the main Bugs page.3The bug trackers index page has the same navigation as the main Bugs
4page, with the addition of a breadcrumb itself.
45
5 >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers')6 >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers')
6 >>> print_location(user_browser.contents)7 >>> print_location(user_browser.contents)
7 Hierarchy: Launchpad8 Hierarchy: Launchpad > Bug trackers
8 Tabs:9 Tabs:
9 * Launchpad Home - http://launchpad.dev/10 * Launchpad Home - http://launchpad.dev/
10 * Code - http://code.launchpad.dev/11 * Code - http://code.launchpad.dev/
@@ -145,7 +146,7 @@
145146
146 >>> user_browser.getLink("Register another bug tracker").click()147 >>> user_browser.getLink("Register another bug tracker").click()
147 >>> user_browser.url148 >>> user_browser.url
148 'http://launchpad.dev/bugs/bugtrackers/+newbugtracker'149 'http://bugs.launchpad.dev/bugs/bugtrackers/+newbugtracker'
149150
150In fact, the link is there twice: once at the top of the page, once at151In fact, the link is there twice: once at the top of the page, once at
151the bottom.152the bottom.
152153
=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt'
--- lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2009-07-01 13:16:44 +0000
+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2009-08-25 15:59:44 +0000
@@ -17,6 +17,12 @@
17 >>> user_browser.title17 >>> user_browser.title
18 'Register an external bug tracker'18 'Register an external bug tracker'
1919
20In case the user gets cold feet, there is always a cancel link that
21takes them back to the bug tracker listing page.
22
23 >>> user_browser.getLink('Cancel').url
24 'http://bugs.launchpad.dev/bugs/bugtrackers'
25
20Supported external bug tracker types include Bugzilla, Debbugs,26Supported external bug tracker types include Bugzilla, Debbugs,
21Roundup, SourceForge and Trac. We don't provide all of these as27Roundup, SourceForge and Trac. We don't provide all of these as
22options to the user. We don't provide Debbugs because the status28options to the user. We don't provide Debbugs because the status
@@ -133,7 +139,7 @@
133 >>> user_browser.getControl('Location').value = 'http://bugzilla.example.org/'139 >>> user_browser.getControl('Location').value = 'http://bugzilla.example.org/'
134 >>> user_browser.getControl('Add').click()140 >>> user_browser.getControl('Add').click()
135 >>> user_browser.url141 >>> user_browser.url
136 'http://launchpad.dev/bugs/bugtrackers/test-bugzilla'142 'http://bugs.launchpad.dev/bugs/bugtrackers/test-bugzilla'
137143
138 >>> login('test@canonical.com')144 >>> login('test@canonical.com')
139 >>> bugtrackerset = getUtility(IBugTrackerSet)145 >>> bugtrackerset = getUtility(IBugTrackerSet)
@@ -167,7 +173,7 @@
167 >>> user_browser.getLink('Change details').click()173 >>> user_browser.getLink('Change details').click()
168174
169 >>> user_browser.url175 >>> user_browser.url
170 'http://launchpad.dev/bugs/bugtrackers/testmantis/+edit'176 'http://bugs.launchpad.dev/bugs/bugtrackers/testmantis/+edit'
171177
172 >>> user_browser.title178 >>> user_browser.title
173 'Change details for \xe2\x80\x9cTest Mantis Tracker\xe2\x80\x9d bug tracker'179 'Change details for \xe2\x80\x9cTest Mantis Tracker\xe2\x80\x9d bug tracker'
@@ -186,7 +192,7 @@
186 >>> user_browser.getControl('Change').click()192 >>> user_browser.getControl('Change').click()
187193
188 >>> user_browser.url194 >>> user_browser.url
189 'http://launchpad.dev/bugs/bugtrackers/testmantis/+edit'195 'http://bugs.launchpad.dev/bugs/bugtrackers/testmantis/+edit'
190 >>> for message in get_feedback_messages(user_browser.contents):196 >>> for message in get_feedback_messages(user_browser.contents):
191 ... print message197 ... print message
192 There is 1 error.198 There is 1 error.
@@ -221,7 +227,7 @@
221 >>> user_browser.getControl('Change').click()227 >>> user_browser.getControl('Change').click()
222228
223 >>> user_browser.url229 >>> user_browser.url
224 'http://launchpad.dev/bugs/bugtrackers/testbugzilla'230 'http://bugs.launchpad.dev/bugs/bugtrackers/testbugzilla'
225231
226And now the test tracker should have been updated:232And now the test tracker should have been updated:
227233
@@ -345,13 +351,13 @@
345deletion yet:351deletion yet:
346352
347 >>> user_browser.url353 >>> user_browser.url
348 'http://launchpad.dev/bugs/bugtrackers/freddy'354 'http://bugs.launchpad.dev/bugs/bugtrackers/freddy'
349355
350 >>> user_browser.getLink('Change details').click()356 >>> user_browser.getLink('Change details').click()
351 >>> user_browser.getControl('Delete').click()357 >>> user_browser.getControl('Delete').click()
352358
353 >>> user_browser.url359 >>> user_browser.url
354 'http://launchpad.dev/bugs/bugtrackers'360 'http://bugs.launchpad.dev/bugs/bugtrackers'
355361
356 >>> for message in get_feedback_messages(user_browser.contents):362 >>> for message in get_feedback_messages(user_browser.contents):
357 ... print message363 ... print message
358364
=== modified file 'lib/lp/bugs/templates/bugtracker-index.pt'
--- lib/lp/bugs/templates/bugtracker-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/bugtracker-index.pt 2009-08-25 14:47:50 +0000
@@ -1,134 +1,118 @@
1<html1<bug-tracker-index
2 xmlns="http://www.w3.org/1999/xhtml"2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_side"
7 lang="en"7 i18n:domain="malone">
8 dir="ltr"8
9 metal:use-macro="context/@@main_template/master"9 <metal:heading fill-slot="heading">
10 i18n:domain="malone"10 <h1>
11>11 <tal:tracker replace="context/title">Gnome Bugzilla</tal:tracker>
12 <body>12 overview
13 <metal:heading fill-slot="pageheading">13 </h1>
14 <h1>14 <p tal:condition="not: context/active" id="inactive-message">
15 <tal:tracker replace="context/title">Gnome Bugzilla</tal:tracker>15 <strong>
16 overview16 Bug watch updates for <tal:bugtracker content="context/title" />
17 </h1>17 are disabled.
1818 </strong>
19 <p tal:condition="not: context/active" id="inactive-message">19 </p>
20 <strong>20 </metal:heading>
21 Bug watch updates for <tal:bugtracker content="context/title" />21
22 are disabled.22 <metal:side fill-slot="side">
23 </strong>23 <tal:menu replace="structure view/@@+global-actions" />
24 </p>
25 </metal:heading>
26
27<metal:leftportlets fill-slot="portlets_one">
28 <div tal:replace="structure context/@@+portlet-details" />24 <div tal:replace="structure context/@@+portlet-details" />
29</metal:leftportlets>
30
31<metal:rightportlets fill-slot="portlets_two">
32 <div tal:replace="structure context/@@+portlet-projects" />25 <div tal:replace="structure context/@@+portlet-projects" />
33</metal:rightportlets>26 </metal:side>
3427
35<metal:macros fill-slot="bogus">28 <metal:macros fill-slot="bogus">
36 <metal:macro define-macro="watchlisting">29 <metal:macro define-macro="watchlisting">
37 <table class="sortable listing" id="latestwatches">30 <table class="sortable listing" id="latestwatches">
38 <thead>31 <thead>
39 <tr>32 <tr>
40 <th>Launchpad bug</th>33 <th>Launchpad bug</th>
41 <th>Remote bug</th>34 <th>Remote bug</th>
42 <th>Status</th>35 <th>Status</th>
43 </tr>36 </tr>
44 </thead>37 </thead>
4538 <tbody>
46 <tbody>39 <tal:watches repeat="watch watches">
47 <tal:watches repeat="watch watches">40 <tr tal:define="show watch/bug/required:launchpad.View">
48 <tr tal:define="hide not:watch/bug/required:launchpad.View">41 <tal:hide-watch-details condition="not:show">
49 <tal:hide-watch-details condition="hide">42 <td>
50 <td>43 <img alt="" src="/@@/bug" />
51 <img alt="" src="/@@/bug" />
52 #<span tal:replace="watch/bug/id">34</span>:
53 <em>(Private)</em>
54 </td>
55 <td><em>-</em></td>
56 <td></td>
57 </tal:hide-watch-details>
58 <tal:show-watch-details condition="not:hide">
59 <td>
60 <img alt="" src="/@@/bug" />
61 <a href="#" tal:attributes="href watch/bug/fmt:url">
62 #<span tal:replace="watch/bug/id">34</span>:44 #<span tal:replace="watch/bug/id">34</span>:
63 <span tal:replace="watch/bug/title">45 <em>(Private)</em>
64 Launchpad Bug Title46 </td>
65 </span>47 <td><em>-</em></td>
66 </a>48 <td></td>
67 </td>49 </tal:hide-watch-details>
68 <td>50 <tal:show-watch-details condition="show">
69 <a tal:replace="structure watch/fmt:external-link-short">51 <td>
70 123452 <img alt="" src="/@@/bug" />
71 </a>53 <a href="#" tal:attributes="href watch/bug/fmt:url">
72 </td>54 #<span tal:replace="watch/bug/id">34</span>:
73 <td><tal:status tal:replace="watch/remotestatus"/></td>55 <span tal:replace="watch/bug/title">
74 </tal:show-watch-details>56 Launchpad Bug Title
75 </tr>57 </span>
76 </tal:watches>58 </a>
77 </tbody>59 </td>
78 </table>60 <td>
79 </metal:macro>61 <a tal:replace="structure watch/fmt:external-link-short">
80</metal:macros>62 1234
8163 </a>
82<div metal:fill-slot="main">64 </td>
8365 <td><tal:status tal:replace="watch/remotestatus"/></td>
84 <p tal:content="context/summary">66 </tal:show-watch-details>
85 $BugTracker.summary goes here. This should be quite short,67 </tr>
86 just a single paragraph of text really, giving the BugTracker68 </tal:watches>
87 highlights.69 </tbody>
88 </p>70 </table>
8971 </metal:macro>
90 <h2>72 </metal:macros>
91 Location73
92 </h2>74 <div metal:fill-slot="main">
9375 <div class="top-portlet">
94 <ul id="bugtracker-urls">76 <p tal:content="context/summary">
95 <li>77 $BugTracker.summary goes here. This should be quite short,
96 <strong>78 just a single paragraph of text really, giving the BugTracker
97 <a tal:replace="structure context/fmt:external-link">79 highlights.
98 http://bugs.example.com/80 </p>
99 </a>81
100 </strong>82 <h2>
101 </li>83 Location
102 <li tal:repeat="alias context/fmt:aliases">84 </h2>
103 <strong tal:content="alias" /> (Alias)85 <ul id="bugtracker-urls">
104 </li>86 <li>
105 </ul>87 <strong>
10688 <a tal:replace="structure context/fmt:external-link">
107 <h2 tal:condition="context/contactdetails">89 http://bugs.example.com/
108 Contact details90 </a>
109 </h2>91 </strong>
11092 </li>
111 <div tal:condition="context/contactdetails"93 <li tal:repeat="alias context/fmt:aliases">
112 tal:content="context/contactdetails" >94 <strong tal:content="alias" /> (Alias)
113 The contact details for the admins of this bug tracker go here, so we95 </li>
114 can get to them in an emergency.96 </ul>
97
98 <h2 tal:condition="context/contactdetails">
99 Contact details
100 </h2>
101 <div tal:condition="context/contactdetails"
102 tal:content="context/contactdetails" >
103 The contact details for the admins of this bug tracker go here,
104 so we can get to them in an emergency.
105 </div>
106
107 <h2 tal:condition="context/watches">Bug watches</h2>
108 <tal:navigation
109 replace="structure view/batchnav/@@+navigation-links-upper" />
110 <tal:block define="watches view/batchnav/batch" condition="watches">
111 <metal:watches use-macro="template/macros/watchlisting" />
112 </tal:block>
113 <tal:navigation
114 replace="structure view/batchnav/@@+navigation-links-lower" />
115 </div>
115 </div>116 </div>
116117
117 <h2 tal:condition="context/watches">Bug watches</h2>118</bug-tracker-index>
118 <tal:navigation
119 replace="structure view/batchnav/@@+navigation-links-upper" />
120
121 <tal:block define="watches view/batchnav/batch"
122 condition="watches">
123
124 <metal:watches use-macro="template/macros/watchlisting" />
125
126 </tal:block>
127
128 <tal:navigation
129 replace="structure view/batchnav/@@+navigation-links-lower" />
130
131</div>
132
133</body>
134</html>
135119
=== modified file 'lib/lp/bugs/templates/bugtrackers-add.pt'
--- lib/lp/bugs/templates/bugtrackers-add.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/bugtrackers-add.pt 2009-08-25 11:20:11 +0000
@@ -1,12 +1,10 @@
1<html1<bug-trackers-add
2 xmlns="http://www.w3.org/1999/xhtml"2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 metal:use-macro="view/macro:page/onecolumn"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5>6 metal:use-macro="view/macro:page/main_only">
6 <body>7 <div metal:fill-slot="main">
7 <h1 metal:fill-slot="heading">Register an external bug tracker</h1>8 <div metal:use-macro="context/@@launchpad_form/form" />
8 <div metal:fill-slot="main">9 </div>
9 <div metal:use-macro="context/@@launchpad_form/form" />10</bug-trackers-add>
10 </div>
11 </body>
12</html>
1311
=== modified file 'lib/lp/bugs/templates/bugtrackers-index.pt'
--- lib/lp/bugs/templates/bugtrackers-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/bugtrackers-index.pt 2009-08-25 15:59:15 +0000
@@ -1,126 +1,94 @@
1<html1<bug-trackers-index
2 xmlns="http://www.w3.org/1999/xhtml"2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only">
7 lang="en"7
8 dir="ltr"8 <metal:macros fill-slot="bogus">
9 metal:use-macro="view/macro:page/onecolumn"9 <metal:macro define-macro="tracker-table">
10>10 <table class="sortable listing" tal:attributes="id id">
11 <body>11 <thead>
12 <div metal:fill-slot="main">12 <tr>
13 <h1>Bug trackers registered in Launchpad</h1>13 <th>Title</th>
14 <p>14 <th>Location</th>
15 A bug report in Launchpad can be linked to a bug report in any of15 <th>Linked Projects</th>
16 these bug trackers.16 <th class="type">Type</th>
17 The status of the external bug report is shown in Launchpad, and17 <th class="amount">Watches</th>
18 Launchpad subscribers are notified when the external status changes.18 </tr>
19 </p>19 </thead>
2020 <tbody>
21 <p21 <tr tal:repeat="tracker trackers">
22 tal:define="link context/menu:context/newbugtracker"22 <td>
23 tal:content="structure link/render"23 <a tal:replace="structure tracker/fmt:link" />
24 tal:condition="link/enabled">24 </td>
25 Add a new bug tracker25 <td>
26 </p>26 <a tal:replace="structure tracker/fmt:external-link" />
2727 </td>
28 <table class="sortable listing" id="trackers">28 <td tal:define="pillar_data python:view.getPillarData(tracker)">
29 <thead>29 <tal:pillars condition="pillar_data">
30 <tr>30 <tal:pillar-entry repeat="pillar pillar_data/pillars">
31 <th>Title</th>
32 <th>Location</th>
33 <th>Linked Projects</th>
34 <th class="type">Type</th>
35 <th class="amount">Watches</th>
36 </tr>
37 </thead>
38
39 <tbody>
40 <tr tal:repeat="bugtracker view/active_bug_trackers">
41 <td>
42 <a tal:replace="structure bugtracker/fmt:link" />
43 </td>
44 <td>
45 <a tal:replace="structure bugtracker/fmt:external-link" />
46 </td>
47 <td tal:define="pillar_data python:view.getPillarData(bugtracker)">
48 <tal:pillars condition="pillar_data">
49 <tal:pillar-entry repeat="pillar pillar_data/pillars">
50 <a tal:attributes="href pillar/fmt:url"31 <a tal:attributes="href pillar/fmt:url"
51 tal:content="pillar/displayname"32 tal:content="pillar/displayname"
52 ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma>33 ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma>
53 </tal:pillar-entry>
54 <tal:many-pillars
55 condition="pillar_data/has_more_pillars">
56 &hellip;
57 </tal:many-pillars>
58 </tal:pillars>
59 <tal:no-pillars condition="not: pillar_data">
60 &mdash;
61 </tal:no-pillars>
62 </td>
63 <td class="type"
64 tal:content="bugtracker/bugtrackertype/title">bugtrackertype</td>
65 <td class="amount" tal:content="bugtracker/watches/count">bugcount</td>
66 </tr>
67 </tbody>
68 </table>
69
70 <p
71 tal:define="link context/menu:context/newbugtracker"
72 tal:content="structure link/render"
73 tal:condition="link/enabled">
74 Add a new bug tracker
75 </p>
76
77 <tal:inactive-bug-trackers condition="view/inactive_bug_trackers">
78 <h1>Inactive bug trackers</h1>
79
80 <table class="sortable listing" id="inactive-trackers">
81 <thead>
82 <tr>
83 <th>Title</th>
84 <th>Location</th>
85 <th>Linked Projects</th>
86 <th class="type">Type</th>
87 <th class="amount">Watches</th>
88 </tr>
89 </thead>
90
91 <tbody>
92 <tr tal:repeat="bugtracker view/inactive_bug_trackers">
93 <td>
94 <a tal:replace="structure bugtracker/fmt:link" />
95 </td>
96 <td>
97 <a tal:replace="structure bugtracker/fmt:external-link" />
98 </td>
99 <td tal:define="pillar_data python:view.getPillarData(bugtracker)">
100 <tal:pillars condition="pillar_data">
101 <tal:pillar-entry repeat="pillar pillar_data/pillars">
102 <a tal:attributes="href pillar/fmt:url"
103 tal:content="pillar/displayname"
104 ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma>
105 </tal:pillar-entry>34 </tal:pillar-entry>
106 <tal:many-pillars35 <tal:many-pillars
107 condition="pillar_data/has_more_pillars">36 condition="pillar_data/has_more_pillars">
108 &hellip;37 &hellip;
109 </tal:many-pillars>38 </tal:many-pillars>
110 </tal:pillars>39 </tal:pillars>
111 <tal:no-pillars condition="not: pillar_data">40 <tal:no-pillars condition="not: pillar_data">
112 &mdash;41 &mdash;
113 </tal:no-pillars>42 </tal:no-pillars>
114 </td>43 </td>
115 <td class="type"44 <td class="type"
116 tal:content="bugtracker/bugtrackertype/title">bugtrackertype</td>45 tal:content="tracker/bugtrackertype/title">bugtrackertype</td>
117 <td class="amount" tal:content="bugtracker/watches/count">bugcount</td>46 <td class="amount" tal:content="tracker/watches/count">bugcount</td>
118 </tr>47 </tr>
119 </tbody>48 </tbody>
120 </table>49 </table>
121 </tal:inactive-bug-trackers>50 </metal:macro>
12251 </metal:macros>
123</div>52
12453 <div metal:fill-slot="heading">
125</body>54 <h1 tal:content="context/title" />
126</html>55 </div>
56
57 <div metal:fill-slot="main">
58 <div class="yui-u">
59 <div class="top-portlet">
60 <p>
61 A bug report in Launchpad can be linked to a bug report in any
62 of these bug trackers. The status of the external bug report is
63 shown in Launchpad, and Launchpad subscribers are notified when
64 the external status changes.
65 </p>
66 <p tal:define="link context/menu:context/newbugtracker"
67 tal:content="structure link/render"
68 tal:condition="link/enabled">
69 Add a new bug tracker
70 </p>
71 <tal:table define="id string:trackers;
72 trackers view/active_bug_trackers">
73 <metal:table use-macro="template/macros/tracker-table" />
74 </tal:table>
75 <p style="margin-top: 1em"
76 tal:define="link context/menu:context/newbugtracker"
77 tal:content="structure link/render"
78 tal:condition="link/enabled">
79 Add a new bug tracker
80 </p>
81 </div>
82 </div>
83 <div class="yui-u" condition="view/inactive_bug_trackers">
84 <div class="portlet">
85 <h2>Inactive bug trackers</h2>
86 <tal:table define="id string:inactive-trackers;
87 trackers view/inactive_bug_trackers">
88 <metal:table use-macro="template/macros/tracker-table" />
89 </tal:table>
90 </div>
91 </div>
92 </div>
93
94</bug-trackers-index>