Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACD0C618 for ; Thu, 21 Jun 2012 11:57:30 +0000 (UTC) Received: (qmail 62109 invoked by uid 500); 21 Jun 2012 11:57:30 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 62088 invoked by uid 500); 21 Jun 2012 11:57:30 -0000 Mailing-List: contact bloodhound-commits-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-commits@incubator.apache.org Received: (qmail 62071 invoked by uid 99); 21 Jun 2012 11:57:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2012 11:57:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2012 11:57:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 38F21238890B; Thu, 21 Jun 2012 11:57:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1352507 - in /incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct: api.py ticket/api.py Date: Thu, 21 Jun 2012 11:57:07 -0000 To: bloodhound-commits@incubator.apache.org From: gjm@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120621115707.38F21238890B@eris.apache.org> Author: gjm Date: Thu Jun 21 11:57:06 2012 New Revision: 1352507 URL: http://svn.apache.org/viewvc?rev=1352507&view=rev Log: multiproduct: move ITicketFieldProvider implementation to MultiProductSystem - towards #105 (from olemis) Removed: incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/api.py Modified: incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py Modified: incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py?rev=1352507&r1=1352506&r2=1352507&view=diff ============================================================================== --- incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py (original) +++ incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py Thu Jun 21 11:57:06 2012 @@ -24,13 +24,17 @@ from trac.core import Component, TracErr from trac.db import Table, Column, DatabaseManager from trac.env import IEnvironmentSetupParticipant from trac.perm import IPermissionRequestor +from trac.ticket.api import ITicketFieldProvider +from trac.util.translation import N_ from trac.web.chrome import ITemplateProvider +from multiproduct.model import Product + class MultiProductSystem(Component): """Creates the database tables and template directories""" implements(IEnvironmentSetupParticipant, ITemplateProvider, - IPermissionRequestor) + IPermissionRequestor, ITicketFieldProvider) SCHEMA = [ Table('bloodhound_product', key = ['prefix', 'name']) [ @@ -107,3 +111,13 @@ class MultiProductSystem(Component): 'PRODUCT_VIEW'] return acts + [('PRODUCT_ADMIN', acts)] + [('ROADMAP_ADMIN', acts)] + # ITicketFieldProvider methods + def get_select_fields(self): + """Product select fields""" + return [(35, {'name': 'product', 'label': N_('Product'), + 'cls': Product, 'optional': True})] + + def get_radio_fields(self): + """Product radio fields""" + return [] +