You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2014/02/21 03:00:48 UTC
svn commit: r1570414 -
/bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/batch.py
Author: rjollos
Date: Fri Feb 21 02:00:48 2014
New Revision: 1570414
URL: http://svn.apache.org/r1570414
Log:
0.8dev: PEP-0008 whitespace changes.
Modified:
bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/batch.py
Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/batch.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/batch.py?rev=1570414&r1=1570413&r2=1570414&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/batch.py (original)
+++ bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/batch.py Fri Feb 21 02:00:48 2014
@@ -24,10 +24,11 @@ from multiproduct.util.translation impor
class ProductBatchModifyModule(BatchModifyModule):
+
def add_template_data(self, req, data, tickets):
if isinstance(self.env, ProductEnvironment):
- super(ProductBatchModifyModule, self).add_template_data(
- req, data, tickets)
+ super(ProductBatchModifyModule, self).add_template_data(req, data,
+ tickets)
return
data['batch_modify'] = True
@@ -40,12 +41,13 @@ class ProductBatchModifyModule(BatchModi
data['action_controls'] = []
global_env = ProductEnvironment.lookup_global_env(self.env)
cache = {}
- for k,v in tickets_by_product.iteritems():
- batchmdl = cache.get(k or '')
- if batchmdl is None:
+ for k, v in tickets_by_product.iteritems():
+ batch_module = cache.get(k or '')
+ if batch_module is None:
env = ProductEnvironment(global_env, k) if k else global_env
- cache[k] = batchmdl = ProductBatchModifyModule(env)
- data['action_controls'] += batchmdl._get_action_controls(req, v)
+ cache[k] = batch_module = ProductBatchModifyModule(env)
+ data['action_controls'] += batch_module._get_action_controls(req,
+ v)
batch_list_modes = [
{'name': _("add"), 'value': "+"},
{'name': _("remove"), 'value': "-"},
@@ -53,7 +55,7 @@ class ProductBatchModifyModule(BatchModi
{'name': _("set to"), 'value': "="},
]
add_script_data(req, batch_list_modes=batch_list_modes,
- batch_list_properties=self._get_list_fields())
+ batch_list_properties=self._get_list_fields())
import trac.ticket.batch
trac.ticket.batch.BatchModifyModule = ProductBatchModifyModule