Return-Path: X-Original-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2E9CC984 for ; Thu, 31 May 2012 09:48:33 +0000 (UTC) Received: (qmail 73807 invoked by uid 500); 31 May 2012 09:48:33 -0000 Delivered-To: apmail-incubator-bloodhound-dev-archive@incubator.apache.org Received: (qmail 73720 invoked by uid 500); 31 May 2012 09:48:31 -0000 Mailing-List: contact bloodhound-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-dev@incubator.apache.org Received: (qmail 73306 invoked by uid 99); 31 May 2012 09:48:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 09:48:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of joachim.dreimann@wandisco.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 09:48:25 +0000 Received: by bkcjm2 with SMTP id jm2so654901bkc.6 for ; Thu, 31 May 2012 02:48:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=Vf9dJidgPi35veQE1mJttHqPJHUZThkEUG8QwOjXq5c=; b=iSW2fwbNf8TqmCpUZjWV6tGPWzwoeT/eWo9lKoIGVH02I3UTi0oijsE31D3eBqeOon YEzFgWlj8sebuoFPGLsQ4N3zalfD0mvqtabpu3GWwgm6pnohtjGy3lVJ1p3Apnjz/b8W az7SgZImj0GyR2Jhnaw4lWe5ovVy+bZYB33y6MudNwa2p3m3YlZqVwugkf8Thkv0nnrF sh6FBEy8p/C7GQltlTCunbVmZCzwY+kseYOq3YTXEZA+/4585wC/SArzRj7W6N2AecGU WeSY3YjY+ZolVR2NK7fBC19496WXupKB20PlDMxtfsqBbKlk8B2592Ns7FL8opXJP4La RkBw== MIME-Version: 1.0 Received: by 10.204.150.72 with SMTP id x8mr11653811bkv.33.1338457683771; Thu, 31 May 2012 02:48:03 -0700 (PDT) Received: by 10.204.186.71 with HTTP; Thu, 31 May 2012 02:48:03 -0700 (PDT) In-Reply-To: <4FC64148.9060607@wandisco.com> References: <058.ea7f4dd2822251968f537abc9376b52d@incubator.apache.org> <073.86406b6f346cd25b8036d19284c88d8e@incubator.apache.org> <4FC64148.9060607@wandisco.com> Date: Thu, 31 May 2012 10:48:03 +0100 Message-ID: Subject: Re: [Apache Bloodhound] #20: Show 'Source' tab to Admins even when no source is defined From: Joachim Dreimann To: bloodhound-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=00151747afb8c9c35d04c151f6bf X-Gm-Message-State: ALoCoQm3y9JKe3svoHX8PpxW5nVPQ2s/zZjWZ+6OPk3S6yl4H2Rr0/S0n1zKaeoqUSBjIZ/y6fxB X-Virus-Checked: Checked by ClamAV on apache.org --00151747afb8c9c35d04c151f6bf Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > Hi, > > I forgot to mention the way I was considering adapting Antony's patch for > https://issues.apache.org/**bloodhound/ticket/20on 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) >> >> > --00151747afb8c9c35d04c151f6bf--