incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1352507 - in /incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct: api.py ticket/api.py
Date Thu, 21 Jun 2012 11:57:07 GMT
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 []
+



Mime
View raw message