You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bloodhound.apache.org by Gary Martin <ga...@wandisco.com> on 2012/05/30 17:48:24 UTC

Re: [Apache Bloodhound] #20: Show 'Source' tab to Admins even when no source is defined

Hi,

I forgot to mention the way I was considering adapting Antony's patch 
for https://issues.apache.org/bloodhound/ticket/20 on this list. I 
suspect that the biggest concern is likely to be whether we should be 
using a specific wiki page (particularly one that is subject to change 
in https://issues.apache.org/bloodhound/ticket/85) to link to as Antony 
pointed out.

I would be happy to raise a new ticket to consider how to improve that 
if we are otherwise prepared to commit these changes.

Cheers,
     Gary

On 05/29/2012 03:30 PM, Apache Bloodhound wrote:
> #20: Show 'Source' tab to Admins even when no source is defined
> --------------------------+----------------------
>    Reporter:  jdreimann    |      Owner:  antony
>        Type:  enhancement  |     Status:  assigned
>    Priority:  major        |  Milestone:
>   Component:  dashboard    |    Version:
> Resolution:               |   Keywords:
> --------------------------+----------------------
>
> Comment (by gjm):
>
>   Nice work, and thanks for the warning. I think we can assume that we will
>   be able to live with the missing active class for now though we could look
>   at more complex solutions in the long run.
>
>   If adapting Antony's patch to go into the theme code, I would consider
>   working it like this:
>
>   {{{
>   #!diff
>   Index: trunk/bloodhound_theme/bhtheme/theme.py
>   ===================================================================
>   --- trunk/bloodhound_theme/bhtheme/theme.py     (revision 1343282)
>   +++ trunk/bloodhound_theme/bhtheme/theme.py     (working copy)
>   @@ -181,6 +186,19 @@
>            """
>            add_stylesheet(req, 'dashboard/roadmap.css')
>
>   +    # INavigationContributor methods
>   +
>   +    def get_active_navigation_item(self, req):
>   +        return
>   +
>   +    def get_navigation_items(self, req):
>   +        if 'BROWSER_VIEW' in req.perm and 'VERSIONCONTROL_ADMIN' in
>   req.perm:
>   +            bm = self.env[BrowserModule]
>   +            if bm and not list(bm.get_navigation_items(req)):
>   +                yield ('mainnav', 'browser',
>   +                       tag.a(_('Browse Source'),
>   +                             href=req.href.wiki('TracRepositoryAdmin')))
>   +
>    class QuickCreateTicketDialog(Component):
>        implements(IRequestFilter, IRequestHandler)
>
>   }}}
>
>   (partial diff - also need to add imports for {{{INavigationContributor}}},
>   {{{BrowserModule}}} and {{{tag}}} and add {{{INavigationContributor}}} to
>   the component's {{{implements}}} statement)
>


Re: [Apache Bloodhound] #20: Show 'Source' tab to Admins even when no source is defined

Posted by Joachim Dreimann <jo...@wandisco.com>.
As long as it does link to the renamed page ( #85 ) I'm happy for this to
be improved again later.

- Joe

On 30 May 2012 16:48, Gary Martin <ga...@wandisco.com> wrote:

> Hi,
>
> I forgot to mention the way I was considering adapting Antony's patch for
> https://issues.apache.org/**bloodhound/ticket/20<https://issues.apache.org/bloodhound/ticket/20>on this list. I suspect that the biggest concern is likely to be whether we
> should be using a specific wiki page (particularly one that is subject to
> change in https://issues.apache.org/**bloodhound/ticket/85<https://issues.apache.org/bloodhound/ticket/85>)
> to link to as Antony pointed out.
>
> I would be happy to raise a new ticket to consider how to improve that if
> we are otherwise prepared to commit these changes.
>
> Cheers,
>    Gary
>
>
> On 05/29/2012 03:30 PM, Apache Bloodhound wrote:
>
>> #20: Show 'Source' tab to Admins even when no source is defined
>> --------------------------+---**-------------------
>>   Reporter:  jdreimann    |      Owner:  antony
>>       Type:  enhancement  |     Status:  assigned
>>   Priority:  major        |  Milestone:
>>  Component:  dashboard    |    Version:
>> Resolution:               |   Keywords:
>> --------------------------+---**-------------------
>>
>> Comment (by gjm):
>>
>>  Nice work, and thanks for the warning. I think we can assume that we will
>>  be able to live with the missing active class for now though we could
>> look
>>  at more complex solutions in the long run.
>>
>>  If adapting Antony's patch to go into the theme code, I would consider
>>  working it like this:
>>
>>  {{{
>>  #!diff
>>  Index: trunk/bloodhound_theme/**bhtheme/theme.py
>>  ==============================**==============================**=======
>>  --- trunk/bloodhound_theme/**bhtheme/theme.py     (revision 1343282)
>>  +++ trunk/bloodhound_theme/**bhtheme/theme.py     (working copy)
>>  @@ -181,6 +186,19 @@
>>           """
>>           add_stylesheet(req, 'dashboard/roadmap.css')
>>
>>  +    # INavigationContributor methods
>>  +
>>  +    def get_active_navigation_item(**self, req):
>>  +        return
>>  +
>>  +    def get_navigation_items(self, req):
>>  +        if 'BROWSER_VIEW' in req.perm and 'VERSIONCONTROL_ADMIN' in
>>  req.perm:
>>  +            bm = self.env[BrowserModule]
>>  +            if bm and not list(bm.get_navigation_items(**req)):
>>  +                yield ('mainnav', 'browser',
>>  +                       tag.a(_('Browse Source'),
>>  +                             href=req.href.wiki('**
>> TracRepositoryAdmin')))
>>  +
>>   class QuickCreateTicketDialog(**Component):
>>       implements(IRequestFilter, IRequestHandler)
>>
>>  }}}
>>
>>  (partial diff - also need to add imports for
>> {{{INavigationContributor}}},
>>  {{{BrowserModule}}} and {{{tag}}} and add {{{INavigationContributor}}} to
>>  the component's {{{implements}}} statement)
>>
>>
>