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: mp+10669@code.launchpad.net |
Commit message
Description of the change
Gavin Panella (allenap) wrote : | # |
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.
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='...
Brad Crittenden (bac) : | # |
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 | 79 | highlights. | 79 | highlights. |
6 | 80 | </p> | 80 | </p> |
7 | 81 | 81 | ||
11 | 82 | <h2> | 82 | <h2>Location</h2> |
9 | 83 | Location | ||
10 | 84 | </h2> | ||
12 | 85 | <ul id="bugtracker-urls"> | 83 | <ul id="bugtracker-urls"> |
13 | 86 | <li> | 84 | <li> |
14 | 87 | <strong> | 85 | <strong> |
15 | @@ -95,23 +93,25 @@ | |||
16 | 95 | </li> | 93 | </li> |
17 | 96 | </ul> | 94 | </ul> |
18 | 97 | 95 | ||
27 | 98 | <h2 tal:condition="context/contactdetails"> | 96 | <tal:contact-details condition="context/contactdetails"> |
28 | 99 | Contact details | 97 | <h2>Contact details</h2> |
29 | 100 | </h2> | 98 | <div tal:condition="context/contactdetails" |
30 | 101 | <div tal:condition="context/contactdetails" | 99 | tal:content="context/contactdetails" > |
31 | 102 | tal:content="context/contactdetails" > | 100 | The contact details for the admins of this bug tracker go |
32 | 103 | The contact details for the admins of this bug tracker go here, | 101 | here, so we can get to them in an emergency. |
33 | 104 | so we can get to them in an emergency. | 102 | </div> |
34 | 105 | </div> | 103 | </tal:contact-details> |
35 | 106 | 104 | ||
44 | 107 | <h2 tal:condition="context/watches">Bug watches</h2> | 105 | <tal:watches condition="context/watches"> |
45 | 108 | <tal:navigation | 106 | <h2>Bug watches</h2> |
46 | 109 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 107 | <tal:navigation |
47 | 110 | <tal:block define="watches view/batchnav/batch" condition="watches"> | 108 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
48 | 111 | <metal:watches use-macro="template/macros/watchlisting" /> | 109 | <tal:block define="watches view/batchnav/batch" condition="watches"> |
49 | 112 | </tal:block> | 110 | <metal:watches use-macro="template/macros/watchlisting" /> |
50 | 113 | <tal:navigation | 111 | </tal:block> |
51 | 114 | replace="structure view/batchnav/@@+navigation-links-lower" /> | 112 | <tal:navigation |
52 | 113 | replace="structure view/batchnav/@@+navigation-links-lower" /> | ||
53 | 114 | </tal:watches> | ||
54 | 115 | </div> | 115 | </div> |
55 | 116 | </div> | 116 | </div> |
56 | 117 | 117 |
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.
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...
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...
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.
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.
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.
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 | 8 | __all__ = [ | 8 | __all__ = [ |
6 | 9 | 'BugTrackerAddView', | 9 | 'BugTrackerAddView', |
7 | 10 | 'BugTrackerBreadcrumbBuilder', | 10 | 'BugTrackerBreadcrumbBuilder', |
8 | 11 | 'BugTrackerContextMenu', | ||
9 | 12 | 'BugTrackerEditView', | 11 | 'BugTrackerEditView', |
10 | 13 | 'BugTrackerNavigation', | 12 | 'BugTrackerNavigation', |
11 | 13 | 'BugTrackerNavigationMenu', | ||
12 | 14 | 'BugTrackerSetContextMenu', | 14 | 'BugTrackerSetContextMenu', |
13 | 15 | 'BugTrackerSetNavigation', | 15 | 'BugTrackerSetNavigation', |
14 | 16 | 'BugTrackerSetView', | 16 | 'BugTrackerSetView', |
15 | @@ -42,6 +42,7 @@ | |||
16 | 42 | from canonical.launchpad.webapp.authorization import check_permission | 42 | from canonical.launchpad.webapp.authorization import check_permission |
17 | 43 | from canonical.launchpad.webapp.batching import BatchNavigator | 43 | from canonical.launchpad.webapp.batching import BatchNavigator |
18 | 44 | from canonical.launchpad.webapp.breadcrumb import BreadcrumbBuilder | 44 | from canonical.launchpad.webapp.breadcrumb import BreadcrumbBuilder |
19 | 45 | from canonical.launchpad.webapp.menu import NavigationMenu | ||
20 | 45 | from canonical.widgets import DelimitedListWidget, LaunchpadRadioWidget | 46 | from canonical.widgets import DelimitedListWidget, LaunchpadRadioWidget |
21 | 46 | 47 | ||
22 | 47 | 48 | ||
23 | @@ -63,17 +64,6 @@ | |||
24 | 63 | usedfor = IBugTrackerSet | 64 | usedfor = IBugTrackerSet |
25 | 64 | 65 | ||
26 | 65 | 66 | ||
27 | 66 | class BugTrackerContextMenu(ContextMenu): | ||
28 | 67 | |||
29 | 68 | usedfor = IBugTracker | ||
30 | 69 | |||
31 | 70 | links = ['edit'] | ||
32 | 71 | |||
33 | 72 | def edit(self): | ||
34 | 73 | text = 'Change details' | ||
35 | 74 | return Link('+edit', text, icon='edit') | ||
36 | 75 | |||
37 | 76 | |||
38 | 77 | class BugTrackerSetContextMenu(ContextMenu): | 67 | class BugTrackerSetContextMenu(ContextMenu): |
39 | 78 | 68 | ||
40 | 79 | usedfor = IBugTrackerSet | 69 | usedfor = IBugTrackerSet |
41 | @@ -125,6 +115,10 @@ | |||
42 | 125 | owner=getUtility(ILaunchBag).user) | 115 | owner=getUtility(ILaunchBag).user) |
43 | 126 | self.next_url = canonical_url(bugtracker) | 116 | self.next_url = canonical_url(bugtracker) |
44 | 127 | 117 | ||
45 | 118 | @property | ||
46 | 119 | def cancel_url(self): | ||
47 | 120 | return canonical_url(self.context) | ||
48 | 121 | |||
49 | 128 | 122 | ||
50 | 129 | class BugTrackerSetView(LaunchpadView): | 123 | class BugTrackerSetView(LaunchpadView): |
51 | 130 | """View for actions on the bugtracker index pages.""" | 124 | """View for actions on the bugtracker index pages.""" |
52 | @@ -194,9 +188,6 @@ | |||
53 | 194 | class BugTrackerEditView(LaunchpadEditFormView): | 188 | class BugTrackerEditView(LaunchpadEditFormView): |
54 | 195 | 189 | ||
55 | 196 | schema = IBugTracker | 190 | schema = IBugTracker |
56 | 197 | field_names = ['name', 'title', 'bugtrackertype', | ||
57 | 198 | 'summary', 'baseurl', 'aliases', 'contactdetails', | ||
58 | 199 | 'active'] | ||
59 | 200 | 191 | ||
60 | 201 | custom_widget('summary', TextAreaWidget, width=30, height=5) | 192 | custom_widget('summary', TextAreaWidget, width=30, height=5) |
61 | 202 | custom_widget('aliases', DelimitedListWidget, height=3) | 193 | custom_widget('aliases', DelimitedListWidget, height=3) |
62 | @@ -379,8 +370,21 @@ | |||
63 | 379 | return RemoteBug(self.context, remotebug, bugs) | 370 | return RemoteBug(self.context, remotebug, bugs) |
64 | 380 | 371 | ||
65 | 381 | 372 | ||
66 | 373 | class BugTrackerSetBreadcrumbBuilder(BreadcrumbBuilder): | ||
67 | 374 | """Builds a breadcrumb for the `IBugTrackerSet`.""" | ||
68 | 375 | |||
69 | 376 | rootsite = None | ||
70 | 377 | |||
71 | 378 | @property | ||
72 | 379 | def text(self): | ||
73 | 380 | return u"Bug trackers" | ||
74 | 381 | |||
75 | 382 | |||
76 | 382 | class BugTrackerBreadcrumbBuilder(BreadcrumbBuilder): | 383 | class BugTrackerBreadcrumbBuilder(BreadcrumbBuilder): |
77 | 383 | """Builds a breadcrumb for an `IBugTracker`.""" | 384 | """Builds a breadcrumb for an `IBugTracker`.""" |
78 | 385 | |||
79 | 386 | rootsite = None | ||
80 | 387 | |||
81 | 384 | @property | 388 | @property |
82 | 385 | def text(self): | 389 | def text(self): |
83 | 386 | return self.context.title | 390 | return self.context.title |
84 | @@ -401,3 +405,13 @@ | |||
85 | 401 | return 'Remote Bug #%s in %s' % (self.remotebug, | 405 | return 'Remote Bug #%s in %s' % (self.remotebug, |
86 | 402 | self.bugtracker.title) | 406 | self.bugtracker.title) |
87 | 403 | 407 | ||
88 | 408 | |||
89 | 409 | class BugTrackerNavigationMenu(NavigationMenu): | ||
90 | 410 | |||
91 | 411 | usedfor = BugTrackerView | ||
92 | 412 | facet = 'bugs' | ||
93 | 413 | links = ['edit'] | ||
94 | 414 | |||
95 | 415 | def edit(self): | ||
96 | 416 | text = 'Change details' | ||
97 | 417 | return Link('+edit', text, icon='edit') | ||
98 | 404 | 418 | ||
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 | 712 | <browser:menus | 712 | <browser:menus |
104 | 713 | module="lp.bugs.browser.bugtracker" | 713 | module="lp.bugs.browser.bugtracker" |
105 | 714 | classes=" | 714 | classes=" |
108 | 715 | BugTrackerContextMenu | 715 | BugTrackerSetContextMenu |
109 | 716 | BugTrackerSetContextMenu"/> | 716 | BugTrackerNavigationMenu"/> |
110 | 717 | <browser:navigation | 717 | <browser:navigation |
111 | 718 | module="lp.bugs.browser.bugtracker" | 718 | module="lp.bugs.browser.bugtracker" |
112 | 719 | classes=" | 719 | classes=" |
113 | @@ -725,7 +725,8 @@ | |||
114 | 725 | <browser:url | 725 | <browser:url |
115 | 726 | for="lp.bugs.interfaces.bugtracker.IBugTracker" | 726 | for="lp.bugs.interfaces.bugtracker.IBugTracker" |
116 | 727 | path_expression="string:${name}" | 727 | path_expression="string:${name}" |
118 | 728 | parent_utility="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/> | 728 | parent_utility="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
119 | 729 | rootsite="bugs"/> | ||
120 | 729 | <browser:pages | 730 | <browser:pages |
121 | 730 | for="lp.bugs.interfaces.bugtracker.IBugTracker" | 731 | for="lp.bugs.interfaces.bugtracker.IBugTracker" |
122 | 731 | class="lp.bugs.browser.bugtracker.BugTrackerView" | 732 | class="lp.bugs.browser.bugtracker.BugTrackerView" |
123 | @@ -752,7 +753,8 @@ | |||
124 | 752 | <browser:url | 753 | <browser:url |
125 | 753 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" | 754 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
126 | 754 | path_expression="string:bugtrackers" | 755 | path_expression="string:bugtrackers" |
128 | 755 | parent_utility="canonical.launchpad.interfaces.IMaloneApplication"/> | 756 | parent_utility="canonical.launchpad.interfaces.IMaloneApplication" |
129 | 757 | rootsite="bugs"/> | ||
130 | 756 | <browser:pages | 758 | <browser:pages |
131 | 757 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" | 759 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" |
132 | 758 | class="lp.bugs.browser.bugtracker.BugTrackerSetView" | 760 | class="lp.bugs.browser.bugtracker.BugTrackerSetView" |
133 | 759 | 761 | ||
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 | 5 | 5 | ||
139 | 6 | import unittest | 6 | import unittest |
140 | 7 | 7 | ||
141 | 8 | from zope.component import getUtility | ||
142 | 9 | |||
143 | 8 | from canonical.launchpad.webapp.publisher import canonical_url | 10 | from canonical.launchpad.webapp.publisher import canonical_url |
144 | 9 | from canonical.launchpad.webapp.tests.breadcrumbs import ( | 11 | from canonical.launchpad.webapp.tests.breadcrumbs import ( |
145 | 10 | BaseBreadcrumbTestCase) | 12 | BaseBreadcrumbTestCase) |
146 | 13 | from lp.bugs.interfaces.bugtracker import IBugTrackerSet | ||
147 | 11 | from lp.testing import ANONYMOUS, login | 14 | from lp.testing import ANONYMOUS, login |
148 | 12 | 15 | ||
149 | 13 | 16 | ||
150 | @@ -56,5 +59,42 @@ | |||
151 | 56 | self._getBreadcrumbsTexts(url, self.traversed_objects)) | 59 | self._getBreadcrumbsTexts(url, self.traversed_objects)) |
152 | 57 | 60 | ||
153 | 58 | 61 | ||
154 | 62 | class TestBugTrackerBreadcrumbBuilders(BaseBreadcrumbTestCase): | ||
155 | 63 | |||
156 | 64 | def setUp(self): | ||
157 | 65 | super(TestBugTrackerBreadcrumbBuilders, self).setUp() | ||
158 | 66 | self.bug_tracker_set = getUtility(IBugTrackerSet) | ||
159 | 67 | self.bug_tracker_set_url = canonical_url( | ||
160 | 68 | self.bug_tracker_set, rootsite='bugs') | ||
161 | 69 | self.bug_tracker = self.factory.makeBugTracker() | ||
162 | 70 | self.bug_tracker_url = canonical_url( | ||
163 | 71 | self.bug_tracker, rootsite='bugs') | ||
164 | 72 | |||
165 | 73 | def test_bug_tracker_set(self): | ||
166 | 74 | # Check TestBugTrackerSetBreadcrumbBuilder. | ||
167 | 75 | traversed_objects = [ | ||
168 | 76 | self.root, self.bug_tracker_set] | ||
169 | 77 | urls = self._getBreadcrumbsURLs( | ||
170 | 78 | self.bug_tracker_set_url, traversed_objects) | ||
171 | 79 | self.assertEquals(self.bug_tracker_set_url, urls[-1]) | ||
172 | 80 | texts = self._getBreadcrumbsTexts( | ||
173 | 81 | self.bug_tracker_set_url, traversed_objects) | ||
174 | 82 | self.assertEquals("Bug trackers", texts[-1]) | ||
175 | 83 | |||
176 | 84 | def test_bug_tracker(self): | ||
177 | 85 | # Check TestBugTrackerBreadcrumbBuilder (and | ||
178 | 86 | # TestBugTrackerSetBreadcrumbBuilder). | ||
179 | 87 | traversed_objects = [ | ||
180 | 88 | self.root, self.bug_tracker_set, self.bug_tracker] | ||
181 | 89 | urls = self._getBreadcrumbsURLs( | ||
182 | 90 | self.bug_tracker_url, traversed_objects) | ||
183 | 91 | self.assertEquals(self.bug_tracker_url, urls[-1]) | ||
184 | 92 | self.assertEquals(self.bug_tracker_set_url, urls[-2]) | ||
185 | 93 | texts = self._getBreadcrumbsTexts( | ||
186 | 94 | self.bug_tracker_url, traversed_objects) | ||
187 | 95 | self.assertEquals(self.bug_tracker.title, texts[-1]) | ||
188 | 96 | self.assertEquals("Bug trackers", texts[-2]) | ||
189 | 97 | |||
190 | 98 | |||
191 | 59 | def test_suite(): | 99 | def test_suite(): |
192 | 60 | return unittest.TestLoader().loadTestsFromName(__name__) | 100 | return unittest.TestLoader().loadTestsFromName(__name__) |
193 | 61 | 101 | ||
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 | 398 | <allow | 398 | <allow |
199 | 399 | interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/> | 399 | interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/> |
200 | 400 | </securedutility> | 400 | </securedutility> |
201 | 401 | <adapter | ||
202 | 402 | provides="canonical.launchpad.webapp.interfaces.IBreadcrumbBuilder" | ||
203 | 403 | for="lp.bugs.interfaces.bugtracker.IBugTrackerSet" | ||
204 | 404 | factory="lp.bugs.browser.bugtracker.BugTrackerSetBreadcrumbBuilder" | ||
205 | 405 | permission="zope.Public"/> | ||
206 | 401 | 406 | ||
207 | 402 | <!-- BugTrackerAlias --> | 407 | <!-- BugTrackerAlias --> |
208 | 403 | 408 | ||
209 | 404 | 409 | ||
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 | 1 | = Bug trackers in Launchpad = | 1 | = Bug trackers in Launchpad = |
215 | 2 | 2 | ||
217 | 3 | The bug trackers index page has the same navigation as the main Bugs page. | 3 | The bug trackers index page has the same navigation as the main Bugs |
218 | 4 | page, with the addition of a breadcrumb itself. | ||
219 | 4 | 5 | ||
220 | 5 | >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers') | 6 | >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers') |
221 | 6 | >>> print_location(user_browser.contents) | 7 | >>> print_location(user_browser.contents) |
223 | 7 | Hierarchy: Launchpad | 8 | Hierarchy: Launchpad > Bug trackers |
224 | 8 | Tabs: | 9 | Tabs: |
225 | 9 | * Launchpad Home - http://launchpad.dev/ | 10 | * Launchpad Home - http://launchpad.dev/ |
226 | 10 | * Code - http://code.launchpad.dev/ | 11 | * Code - http://code.launchpad.dev/ |
227 | @@ -145,7 +146,7 @@ | |||
228 | 145 | 146 | ||
229 | 146 | >>> user_browser.getLink("Register another bug tracker").click() | 147 | >>> user_browser.getLink("Register another bug tracker").click() |
230 | 147 | >>> user_browser.url | 148 | >>> user_browser.url |
232 | 148 | 'http://launchpad.dev/bugs/bugtrackers/+newbugtracker' | 149 | 'http://bugs.launchpad.dev/bugs/bugtrackers/+newbugtracker' |
233 | 149 | 150 | ||
234 | 150 | In fact, the link is there twice: once at the top of the page, once at | 151 | In fact, the link is there twice: once at the top of the page, once at |
235 | 151 | the bottom. | 152 | the bottom. |
236 | 152 | 153 | ||
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 | 17 | >>> user_browser.title | 17 | >>> user_browser.title |
242 | 18 | 'Register an external bug tracker' | 18 | 'Register an external bug tracker' |
243 | 19 | 19 | ||
244 | 20 | In case the user gets cold feet, there is always a cancel link that | ||
245 | 21 | takes them back to the bug tracker listing page. | ||
246 | 22 | |||
247 | 23 | >>> user_browser.getLink('Cancel').url | ||
248 | 24 | 'http://bugs.launchpad.dev/bugs/bugtrackers' | ||
249 | 25 | |||
250 | 20 | Supported external bug tracker types include Bugzilla, Debbugs, | 26 | Supported external bug tracker types include Bugzilla, Debbugs, |
251 | 21 | Roundup, SourceForge and Trac. We don't provide all of these as | 27 | Roundup, SourceForge and Trac. We don't provide all of these as |
252 | 22 | options to the user. We don't provide Debbugs because the status | 28 | options to the user. We don't provide Debbugs because the status |
253 | @@ -133,7 +139,7 @@ | |||
254 | 133 | >>> user_browser.getControl('Location').value = 'http://bugzilla.example.org/' | 139 | >>> user_browser.getControl('Location').value = 'http://bugzilla.example.org/' |
255 | 134 | >>> user_browser.getControl('Add').click() | 140 | >>> user_browser.getControl('Add').click() |
256 | 135 | >>> user_browser.url | 141 | >>> user_browser.url |
258 | 136 | 'http://launchpad.dev/bugs/bugtrackers/test-bugzilla' | 142 | 'http://bugs.launchpad.dev/bugs/bugtrackers/test-bugzilla' |
259 | 137 | 143 | ||
260 | 138 | >>> login('test@canonical.com') | 144 | >>> login('test@canonical.com') |
261 | 139 | >>> bugtrackerset = getUtility(IBugTrackerSet) | 145 | >>> bugtrackerset = getUtility(IBugTrackerSet) |
262 | @@ -167,7 +173,7 @@ | |||
263 | 167 | >>> user_browser.getLink('Change details').click() | 173 | >>> user_browser.getLink('Change details').click() |
264 | 168 | 174 | ||
265 | 169 | >>> user_browser.url | 175 | >>> user_browser.url |
267 | 170 | 'http://launchpad.dev/bugs/bugtrackers/testmantis/+edit' | 176 | 'http://bugs.launchpad.dev/bugs/bugtrackers/testmantis/+edit' |
268 | 171 | 177 | ||
269 | 172 | >>> user_browser.title | 178 | >>> user_browser.title |
270 | 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' |
271 | @@ -186,7 +192,7 @@ | |||
272 | 186 | >>> user_browser.getControl('Change').click() | 192 | >>> user_browser.getControl('Change').click() |
273 | 187 | 193 | ||
274 | 188 | >>> user_browser.url | 194 | >>> user_browser.url |
276 | 189 | 'http://launchpad.dev/bugs/bugtrackers/testmantis/+edit' | 195 | 'http://bugs.launchpad.dev/bugs/bugtrackers/testmantis/+edit' |
277 | 190 | >>> for message in get_feedback_messages(user_browser.contents): | 196 | >>> for message in get_feedback_messages(user_browser.contents): |
278 | 191 | ... print message | 197 | ... print message |
279 | 192 | There is 1 error. | 198 | There is 1 error. |
280 | @@ -221,7 +227,7 @@ | |||
281 | 221 | >>> user_browser.getControl('Change').click() | 227 | >>> user_browser.getControl('Change').click() |
282 | 222 | 228 | ||
283 | 223 | >>> user_browser.url | 229 | >>> user_browser.url |
285 | 224 | 'http://launchpad.dev/bugs/bugtrackers/testbugzilla' | 230 | 'http://bugs.launchpad.dev/bugs/bugtrackers/testbugzilla' |
286 | 225 | 231 | ||
287 | 226 | And now the test tracker should have been updated: | 232 | And now the test tracker should have been updated: |
288 | 227 | 233 | ||
289 | @@ -345,13 +351,13 @@ | |||
290 | 345 | deletion yet: | 351 | deletion yet: |
291 | 346 | 352 | ||
292 | 347 | >>> user_browser.url | 353 | >>> user_browser.url |
294 | 348 | 'http://launchpad.dev/bugs/bugtrackers/freddy' | 354 | 'http://bugs.launchpad.dev/bugs/bugtrackers/freddy' |
295 | 349 | 355 | ||
296 | 350 | >>> user_browser.getLink('Change details').click() | 356 | >>> user_browser.getLink('Change details').click() |
297 | 351 | >>> user_browser.getControl('Delete').click() | 357 | >>> user_browser.getControl('Delete').click() |
298 | 352 | 358 | ||
299 | 353 | >>> user_browser.url | 359 | >>> user_browser.url |
301 | 354 | 'http://launchpad.dev/bugs/bugtrackers' | 360 | 'http://bugs.launchpad.dev/bugs/bugtrackers' |
302 | 355 | 361 | ||
303 | 356 | >>> for message in get_feedback_messages(user_browser.contents): | 362 | >>> for message in get_feedback_messages(user_browser.contents): |
304 | 357 | ... print message | 363 | ... print message |
305 | 358 | 364 | ||
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 @@ | |||
337 | 1 | <html | 1 | <bug-tracker-index |
338 | 2 | xmlns="http://www.w3.org/1999/xhtml" | 2 | xmlns="http://www.w3.org/1999/xhtml" |
339 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
340 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
341 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
342 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_side" |
343 | 7 | lang="en" | 7 | i18n:domain="malone"> |
344 | 8 | dir="ltr" | 8 | |
345 | 9 | metal:use-macro="context/@@main_template/master" | 9 | <metal:heading fill-slot="heading"> |
346 | 10 | i18n:domain="malone" | 10 | <h1> |
347 | 11 | > | 11 | <tal:tracker replace="context/title">Gnome Bugzilla</tal:tracker> |
348 | 12 | <body> | 12 | overview |
349 | 13 | <metal:heading fill-slot="pageheading"> | 13 | </h1> |
350 | 14 | <h1> | 14 | <p tal:condition="not: context/active" id="inactive-message"> |
351 | 15 | <tal:tracker replace="context/title">Gnome Bugzilla</tal:tracker> | 15 | <strong> |
352 | 16 | overview | 16 | Bug watch updates for <tal:bugtracker content="context/title" /> |
353 | 17 | </h1> | 17 | are disabled. |
354 | 18 | 18 | </strong> | |
355 | 19 | <p tal:condition="not: context/active" id="inactive-message"> | 19 | </p> |
356 | 20 | <strong> | 20 | </metal:heading> |
357 | 21 | Bug watch updates for <tal:bugtracker content="context/title" /> | 21 | |
358 | 22 | are disabled. | 22 | <metal:side fill-slot="side"> |
359 | 23 | </strong> | 23 | <tal:menu replace="structure view/@@+global-actions" /> |
333 | 24 | </p> | ||
334 | 25 | </metal:heading> | ||
335 | 26 | |||
336 | 27 | <metal:leftportlets fill-slot="portlets_one"> | ||
360 | 28 | <div tal:replace="structure context/@@+portlet-details" /> | 24 | <div tal:replace="structure context/@@+portlet-details" /> |
361 | 29 | </metal:leftportlets> | ||
362 | 30 | |||
363 | 31 | <metal:rightportlets fill-slot="portlets_two"> | ||
364 | 32 | <div tal:replace="structure context/@@+portlet-projects" /> | 25 | <div tal:replace="structure context/@@+portlet-projects" /> |
394 | 33 | </metal:rightportlets> | 26 | </metal:side> |
395 | 34 | 27 | ||
396 | 35 | <metal:macros fill-slot="bogus"> | 28 | <metal:macros fill-slot="bogus"> |
397 | 36 | <metal:macro define-macro="watchlisting"> | 29 | <metal:macro define-macro="watchlisting"> |
398 | 37 | <table class="sortable listing" id="latestwatches"> | 30 | <table class="sortable listing" id="latestwatches"> |
399 | 38 | <thead> | 31 | <thead> |
400 | 39 | <tr> | 32 | <tr> |
401 | 40 | <th>Launchpad bug</th> | 33 | <th>Launchpad bug</th> |
402 | 41 | <th>Remote bug</th> | 34 | <th>Remote bug</th> |
403 | 42 | <th>Status</th> | 35 | <th>Status</th> |
404 | 43 | </tr> | 36 | </tr> |
405 | 44 | </thead> | 37 | </thead> |
406 | 45 | 38 | <tbody> | |
407 | 46 | <tbody> | 39 | <tal:watches repeat="watch watches"> |
408 | 47 | <tal:watches repeat="watch watches"> | 40 | <tr tal:define="show watch/bug/required:launchpad.View"> |
409 | 48 | <tr tal:define="hide not:watch/bug/required:launchpad.View"> | 41 | <tal:hide-watch-details condition="not:show"> |
410 | 49 | <tal:hide-watch-details condition="hide"> | 42 | <td> |
411 | 50 | <td> | 43 | <img alt="" src="/@@/bug" /> |
383 | 51 | <img alt="" src="/@@/bug" /> | ||
384 | 52 | #<span tal:replace="watch/bug/id">34</span>: | ||
385 | 53 | <em>(Private)</em> | ||
386 | 54 | </td> | ||
387 | 55 | <td><em>-</em></td> | ||
388 | 56 | <td></td> | ||
389 | 57 | </tal:hide-watch-details> | ||
390 | 58 | <tal:show-watch-details condition="not:hide"> | ||
391 | 59 | <td> | ||
392 | 60 | <img alt="" src="/@@/bug" /> | ||
393 | 61 | <a href="#" tal:attributes="href watch/bug/fmt:url"> | ||
412 | 62 | #<span tal:replace="watch/bug/id">34</span>: | 44 | #<span tal:replace="watch/bug/id">34</span>: |
465 | 63 | <span tal:replace="watch/bug/title"> | 45 | <em>(Private)</em> |
466 | 64 | Launchpad Bug Title | 46 | </td> |
467 | 65 | </span> | 47 | <td><em>-</em></td> |
468 | 66 | </a> | 48 | <td></td> |
469 | 67 | </td> | 49 | </tal:hide-watch-details> |
470 | 68 | <td> | 50 | <tal:show-watch-details condition="show"> |
471 | 69 | <a tal:replace="structure watch/fmt:external-link-short"> | 51 | <td> |
472 | 70 | 1234 | 52 | <img alt="" src="/@@/bug" /> |
473 | 71 | </a> | 53 | <a href="#" tal:attributes="href watch/bug/fmt:url"> |
474 | 72 | </td> | 54 | #<span tal:replace="watch/bug/id">34</span>: |
475 | 73 | <td><tal:status tal:replace="watch/remotestatus"/></td> | 55 | <span tal:replace="watch/bug/title"> |
476 | 74 | </tal:show-watch-details> | 56 | Launchpad Bug Title |
477 | 75 | </tr> | 57 | </span> |
478 | 76 | </tal:watches> | 58 | </a> |
479 | 77 | </tbody> | 59 | </td> |
480 | 78 | </table> | 60 | <td> |
481 | 79 | </metal:macro> | 61 | <a tal:replace="structure watch/fmt:external-link-short"> |
482 | 80 | </metal:macros> | 62 | 1234 |
483 | 81 | 63 | </a> | |
484 | 82 | <div metal:fill-slot="main"> | 64 | </td> |
485 | 83 | 65 | <td><tal:status tal:replace="watch/remotestatus"/></td> | |
486 | 84 | <p tal:content="context/summary"> | 66 | </tal:show-watch-details> |
487 | 85 | $BugTracker.summary goes here. This should be quite short, | 67 | </tr> |
488 | 86 | just a single paragraph of text really, giving the BugTracker | 68 | </tal:watches> |
489 | 87 | highlights. | 69 | </tbody> |
490 | 88 | </p> | 70 | </table> |
491 | 89 | 71 | </metal:macro> | |
492 | 90 | <h2> | 72 | </metal:macros> |
493 | 91 | Location | 73 | |
494 | 92 | </h2> | 74 | <div metal:fill-slot="main"> |
495 | 93 | 75 | <div class="top-portlet"> | |
496 | 94 | <ul id="bugtracker-urls"> | 76 | <p tal:content="context/summary"> |
497 | 95 | <li> | 77 | $BugTracker.summary goes here. This should be quite short, |
498 | 96 | <strong> | 78 | just a single paragraph of text really, giving the BugTracker |
499 | 97 | <a tal:replace="structure context/fmt:external-link"> | 79 | highlights. |
500 | 98 | http://bugs.example.com/ | 80 | </p> |
501 | 99 | </a> | 81 | |
502 | 100 | </strong> | 82 | <h2> |
503 | 101 | </li> | 83 | Location |
504 | 102 | <li tal:repeat="alias context/fmt:aliases"> | 84 | </h2> |
505 | 103 | <strong tal:content="alias" /> (Alias) | 85 | <ul id="bugtracker-urls"> |
506 | 104 | </li> | 86 | <li> |
507 | 105 | </ul> | 87 | <strong> |
508 | 106 | 88 | <a tal:replace="structure context/fmt:external-link"> | |
509 | 107 | <h2 tal:condition="context/contactdetails"> | 89 | http://bugs.example.com/ |
510 | 108 | Contact details | 90 | </a> |
511 | 109 | </h2> | 91 | </strong> |
512 | 110 | 92 | </li> | |
513 | 111 | <div tal:condition="context/contactdetails" | 93 | <li tal:repeat="alias context/fmt:aliases"> |
514 | 112 | tal:content="context/contactdetails" > | 94 | <strong tal:content="alias" /> (Alias) |
515 | 113 | The contact details for the admins of this bug tracker go here, so we | 95 | </li> |
516 | 114 | can get to them in an emergency. | 96 | </ul> |
517 | 97 | |||
518 | 98 | <h2 tal:condition="context/contactdetails"> | ||
519 | 99 | Contact details | ||
520 | 100 | </h2> | ||
521 | 101 | <div tal:condition="context/contactdetails" | ||
522 | 102 | tal:content="context/contactdetails" > | ||
523 | 103 | The contact details for the admins of this bug tracker go here, | ||
524 | 104 | so we can get to them in an emergency. | ||
525 | 105 | </div> | ||
526 | 106 | |||
527 | 107 | <h2 tal:condition="context/watches">Bug watches</h2> | ||
528 | 108 | <tal:navigation | ||
529 | 109 | replace="structure view/batchnav/@@+navigation-links-upper" /> | ||
530 | 110 | <tal:block define="watches view/batchnav/batch" condition="watches"> | ||
531 | 111 | <metal:watches use-macro="template/macros/watchlisting" /> | ||
532 | 112 | </tal:block> | ||
533 | 113 | <tal:navigation | ||
534 | 114 | replace="structure view/batchnav/@@+navigation-links-lower" /> | ||
535 | 115 | </div> | ||
536 | 115 | </div> | 116 | </div> |
537 | 116 | 117 | ||
556 | 117 | <h2 tal:condition="context/watches">Bug watches</h2> | 118 | </bug-tracker-index> |
539 | 118 | <tal:navigation | ||
540 | 119 | replace="structure view/batchnav/@@+navigation-links-upper" /> | ||
541 | 120 | |||
542 | 121 | <tal:block define="watches view/batchnav/batch" | ||
543 | 122 | condition="watches"> | ||
544 | 123 | |||
545 | 124 | <metal:watches use-macro="template/macros/watchlisting" /> | ||
546 | 125 | |||
547 | 126 | </tal:block> | ||
548 | 127 | |||
549 | 128 | <tal:navigation | ||
550 | 129 | replace="structure view/batchnav/@@+navigation-links-lower" /> | ||
551 | 130 | |||
552 | 131 | </div> | ||
553 | 132 | |||
554 | 133 | </body> | ||
555 | 134 | </html> | ||
557 | 135 | 119 | ||
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 @@ | |||
563 | 1 | <html | 1 | <bug-trackers-add |
564 | 2 | xmlns="http://www.w3.org/1999/xhtml" | 2 | xmlns="http://www.w3.org/1999/xhtml" |
565 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
566 | 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
576 | 4 | metal:use-macro="view/macro:page/onecolumn" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
577 | 5 | > | 6 | metal:use-macro="view/macro:page/main_only"> |
578 | 6 | <body> | 7 | <div metal:fill-slot="main"> |
579 | 7 | <h1 metal:fill-slot="heading">Register an external bug tracker</h1> | 8 | <div metal:use-macro="context/@@launchpad_form/form" /> |
580 | 8 | <div metal:fill-slot="main"> | 9 | </div> |
581 | 9 | <div metal:use-macro="context/@@launchpad_form/form" /> | 10 | </bug-trackers-add> |
573 | 10 | </div> | ||
574 | 11 | </body> | ||
575 | 12 | </html> | ||
582 | 13 | 11 | ||
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 @@ | |||
588 | 1 | <html | 1 | <bug-trackers-index |
589 | 2 | xmlns="http://www.w3.org/1999/xhtml" | 2 | xmlns="http://www.w3.org/1999/xhtml" |
590 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
591 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
592 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
637 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only"> |
638 | 7 | lang="en" | 7 | |
639 | 8 | dir="ltr" | 8 | <metal:macros fill-slot="bogus"> |
640 | 9 | metal:use-macro="view/macro:page/onecolumn" | 9 | <metal:macro define-macro="tracker-table"> |
641 | 10 | > | 10 | <table class="sortable listing" tal:attributes="id id"> |
642 | 11 | <body> | 11 | <thead> |
643 | 12 | <div metal:fill-slot="main"> | 12 | <tr> |
644 | 13 | <h1>Bug trackers registered in Launchpad</h1> | 13 | <th>Title</th> |
645 | 14 | <p> | 14 | <th>Location</th> |
646 | 15 | A bug report in Launchpad can be linked to a bug report in any of | 15 | <th>Linked Projects</th> |
647 | 16 | these bug trackers. | 16 | <th class="type">Type</th> |
648 | 17 | The status of the external bug report is shown in Launchpad, and | 17 | <th class="amount">Watches</th> |
649 | 18 | Launchpad subscribers are notified when the external status changes. | 18 | </tr> |
650 | 19 | </p> | 19 | </thead> |
651 | 20 | 20 | <tbody> | |
652 | 21 | <p | 21 | <tr tal:repeat="tracker trackers"> |
653 | 22 | tal:define="link context/menu:context/newbugtracker" | 22 | <td> |
654 | 23 | tal:content="structure link/render" | 23 | <a tal:replace="structure tracker/fmt:link" /> |
655 | 24 | tal:condition="link/enabled"> | 24 | </td> |
656 | 25 | Add a new bug tracker | 25 | <td> |
657 | 26 | </p> | 26 | <a tal:replace="structure tracker/fmt:external-link" /> |
658 | 27 | 27 | </td> | |
659 | 28 | <table class="sortable listing" id="trackers"> | 28 | <td tal:define="pillar_data python:view.getPillarData(tracker)"> |
660 | 29 | <thead> | 29 | <tal:pillars condition="pillar_data"> |
661 | 30 | <tr> | 30 | <tal:pillar-entry repeat="pillar pillar_data/pillars"> |
618 | 31 | <th>Title</th> | ||
619 | 32 | <th>Location</th> | ||
620 | 33 | <th>Linked Projects</th> | ||
621 | 34 | <th class="type">Type</th> | ||
622 | 35 | <th class="amount">Watches</th> | ||
623 | 36 | </tr> | ||
624 | 37 | </thead> | ||
625 | 38 | |||
626 | 39 | <tbody> | ||
627 | 40 | <tr tal:repeat="bugtracker view/active_bug_trackers"> | ||
628 | 41 | <td> | ||
629 | 42 | <a tal:replace="structure bugtracker/fmt:link" /> | ||
630 | 43 | </td> | ||
631 | 44 | <td> | ||
632 | 45 | <a tal:replace="structure bugtracker/fmt:external-link" /> | ||
633 | 46 | </td> | ||
634 | 47 | <td tal:define="pillar_data python:view.getPillarData(bugtracker)"> | ||
635 | 48 | <tal:pillars condition="pillar_data"> | ||
636 | 49 | <tal:pillar-entry repeat="pillar pillar_data/pillars"> | ||
662 | 50 | <a tal:attributes="href pillar/fmt:url" | 31 | <a tal:attributes="href pillar/fmt:url" |
663 | 51 | tal:content="pillar/displayname" | 32 | tal:content="pillar/displayname" |
664 | 52 | ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma> | 33 | ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma> |
665 | 53 | </tal:pillar-entry> | ||
666 | 54 | <tal:many-pillars | ||
667 | 55 | condition="pillar_data/has_more_pillars"> | ||
668 | 56 | … | ||
669 | 57 | </tal:many-pillars> | ||
670 | 58 | </tal:pillars> | ||
671 | 59 | <tal:no-pillars condition="not: pillar_data"> | ||
672 | 60 | — | ||
673 | 61 | </tal:no-pillars> | ||
674 | 62 | </td> | ||
675 | 63 | <td class="type" | ||
676 | 64 | tal:content="bugtracker/bugtrackertype/title">bugtrackertype</td> | ||
677 | 65 | <td class="amount" tal:content="bugtracker/watches/count">bugcount</td> | ||
678 | 66 | </tr> | ||
679 | 67 | </tbody> | ||
680 | 68 | </table> | ||
681 | 69 | |||
682 | 70 | <p | ||
683 | 71 | tal:define="link context/menu:context/newbugtracker" | ||
684 | 72 | tal:content="structure link/render" | ||
685 | 73 | tal:condition="link/enabled"> | ||
686 | 74 | Add a new bug tracker | ||
687 | 75 | </p> | ||
688 | 76 | |||
689 | 77 | <tal:inactive-bug-trackers condition="view/inactive_bug_trackers"> | ||
690 | 78 | <h1>Inactive bug trackers</h1> | ||
691 | 79 | |||
692 | 80 | <table class="sortable listing" id="inactive-trackers"> | ||
693 | 81 | <thead> | ||
694 | 82 | <tr> | ||
695 | 83 | <th>Title</th> | ||
696 | 84 | <th>Location</th> | ||
697 | 85 | <th>Linked Projects</th> | ||
698 | 86 | <th class="type">Type</th> | ||
699 | 87 | <th class="amount">Watches</th> | ||
700 | 88 | </tr> | ||
701 | 89 | </thead> | ||
702 | 90 | |||
703 | 91 | <tbody> | ||
704 | 92 | <tr tal:repeat="bugtracker view/inactive_bug_trackers"> | ||
705 | 93 | <td> | ||
706 | 94 | <a tal:replace="structure bugtracker/fmt:link" /> | ||
707 | 95 | </td> | ||
708 | 96 | <td> | ||
709 | 97 | <a tal:replace="structure bugtracker/fmt:external-link" /> | ||
710 | 98 | </td> | ||
711 | 99 | <td tal:define="pillar_data python:view.getPillarData(bugtracker)"> | ||
712 | 100 | <tal:pillars condition="pillar_data"> | ||
713 | 101 | <tal:pillar-entry repeat="pillar pillar_data/pillars"> | ||
714 | 102 | <a tal:attributes="href pillar/fmt:url" | ||
715 | 103 | tal:content="pillar/displayname" | ||
716 | 104 | ></a><tal:comma condition="not: repeat/pillar/end">, </tal:comma> | ||
717 | 105 | </tal:pillar-entry> | 34 | </tal:pillar-entry> |
718 | 106 | <tal:many-pillars | 35 | <tal:many-pillars |
721 | 107 | condition="pillar_data/has_more_pillars"> | 36 | condition="pillar_data/has_more_pillars"> |
722 | 108 | … | 37 | … |
723 | 109 | </tal:many-pillars> | 38 | </tal:many-pillars> |
724 | 110 | </tal:pillars> | 39 | </tal:pillars> |
725 | 111 | <tal:no-pillars condition="not: pillar_data"> | 40 | <tal:no-pillars condition="not: pillar_data"> |
727 | 112 | — | 41 | — |
728 | 113 | </tal:no-pillars> | 42 | </tal:no-pillars> |
729 | 114 | </td> | 43 | </td> |
730 | 115 | <td class="type" | 44 | <td class="type" |
742 | 116 | tal:content="bugtracker/bugtrackertype/title">bugtrackertype</td> | 45 | tal:content="tracker/bugtrackertype/title">bugtrackertype</td> |
743 | 117 | <td class="amount" tal:content="bugtracker/watches/count">bugcount</td> | 46 | <td class="amount" tal:content="tracker/watches/count">bugcount</td> |
744 | 118 | </tr> | 47 | </tr> |
745 | 119 | </tbody> | 48 | </tbody> |
746 | 120 | </table> | 49 | </table> |
747 | 121 | </tal:inactive-bug-trackers> | 50 | </metal:macro> |
748 | 122 | 51 | </metal:macros> | |
749 | 123 | </div> | 52 | |
750 | 124 | 53 | <div metal:fill-slot="heading"> | |
751 | 125 | </body> | 54 | <h1 tal:content="context/title" /> |
752 | 126 | </html> | 55 | </div> |
753 | 56 | |||
754 | 57 | <div metal:fill-slot="main"> | ||
755 | 58 | <div class="yui-u"> | ||
756 | 59 | <div class="top-portlet"> | ||
757 | 60 | <p> | ||
758 | 61 | A bug report in Launchpad can be linked to a bug report in any | ||
759 | 62 | of these bug trackers. The status of the external bug report is | ||
760 | 63 | shown in Launchpad, and Launchpad subscribers are notified when | ||
761 | 64 | the external status changes. | ||
762 | 65 | </p> | ||
763 | 66 | <p tal:define="link context/menu:context/newbugtracker" | ||
764 | 67 | tal:content="structure link/render" | ||
765 | 68 | tal:condition="link/enabled"> | ||
766 | 69 | Add a new bug tracker | ||
767 | 70 | </p> | ||
768 | 71 | <tal:table define="id string:trackers; | ||
769 | 72 | trackers view/active_bug_trackers"> | ||
770 | 73 | <metal:table use-macro="template/macros/tracker-table" /> | ||
771 | 74 | </tal:table> | ||
772 | 75 | <p style="margin-top: 1em" | ||
773 | 76 | tal:define="link context/menu:context/newbugtracker" | ||
774 | 77 | tal:content="structure link/render" | ||
775 | 78 | tal:condition="link/enabled"> | ||
776 | 79 | Add a new bug tracker | ||
777 | 80 | </p> | ||
778 | 81 | </div> | ||
779 | 82 | </div> | ||
780 | 83 | <div class="yui-u" condition="view/inactive_bug_trackers"> | ||
781 | 84 | <div class="portlet"> | ||
782 | 85 | <h2>Inactive bug trackers</h2> | ||
783 | 86 | <tal:table define="id string:inactive-trackers; | ||
784 | 87 | trackers view/inactive_bug_trackers"> | ||
785 | 88 | <metal:table use-macro="template/macros/tracker-table" /> | ||
786 | 89 | </tal:table> | ||
787 | 90 | </div> | ||
788 | 91 | </div> | ||
789 | 92 | </div> | ||
790 | 93 | |||
791 | 94 | </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.