/[pac]/pac/PACDefault/ActionRecipientList.py
ViewVC logotype

Diff of /pac/PACDefault/ActionRecipientList.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by tvon, Wed Oct 1 00:08:09 2003 UTC revision 1.9 by tvon, Fri Oct 3 17:18:29 2003 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  from Products.Archetypes.public import *  from Products.Archetypes.public import *
4  from Products.Archetypes.TemplateMixin import TemplateMixin  from Products.Archetypes.TemplateMixin import TemplateMixin
5  from Products.Archetypes.SQLStorage import PostgreSQLStorage  from Products.Archetypes.SQLStorage import PostgreSQLStorage
# Line 9  schema = BaseSchema + Schema(( Line 10  schema = BaseSchema + Schema((
10    
11      ###################################      ###################################
12      # default      # default
13        ObjectField('id',
14            widget=IdWidget(),
15            default='ActionRecipientsList',
16            ),
17        ObjectField('title',
18            default='Action Recipients List',
19            widget=StringWidget(visible=-1,),
20            ),
21      LinesField('country',      LinesField('country',
22          widget=MultiSelectionWidget(label='Participating Countries',          widget=MultiSelectionWidget(label='Participating Countries',
23              description="If the Uninted States is one of the countries, select the states that will be involved in this action"),              description="If the Uninted States is one of the countries, select the states that will be involved in this action"),
24          vocabulary='getCountries',          vocabulary='getCountries',
25          storage=PostgreSQLStorage(),          storage=PostgreSQLStorage(),
26          ),          ),
27        LinesField('usState',
     LinesField('us_state',  
28          widget=MultiSelectionWidget(label='Participating US States',          widget=MultiSelectionWidget(label='Participating US States',
29              description="If the Uninted States is one of the countries, select the states that will be involved in this action"),              description="If the Uninted States is one of the countries, select the states that will be involved in this action"),
30          vocabulary='getUSStates',          vocabulary='getUSStates',
31          storage=PostgreSQLStorage(),          storage=PostgreSQLStorage(),
32          ),          ),
33      LinesField('political_party',      LinesField('politicalParty',
34          widget=MultiSelectionWidget(label='Political party',          widget=MultiSelectionWidget(label='Political party',
35              description="To restrict this action to a perticular political party, select it here."),              description="To restrict this action to a perticular political party, select it here."),
36          vocabulary='getPoliticalParties',          vocabulary='getPoliticalParties',
37          storage=PostgreSQLStorage(),          storage=PostgreSQLStorage(),
38          ),          ),
39      # CurrentOffice for politicians      StringField('currentOffice',
40  #    StringField('current_position',          widget=StringWidget(label='Current Office',
41  #        widget=StringWidget(label='Current Position'),              description="To restrict this action to a perticular office or position."),
42  #        storage=PostgreSQLStorage(),          storage=PostgreSQLStorage(),
43  #        ),          ),
     # Empty for non-government  
 #    StringField('current_district',  
 #        widget=StringWidget(label='Current District'),  
 #        storage=PostgreSQLStorage(),  
 #        ),  
     # US Government or company name  
 #    StringField('organization',  
 #        widget=StringWidget(label='Organization'),  
 #        storage=PostgreSQLStorage(),  
 #        default='US Government',  
 #        ),  
 #    StringField('first_elected',  
 #        widget=StringWidget(label='First Elected'),  
 #        storage=PostgreSQLStorage(),  
 #        ),  
 #    StringField('last_elected',  
 #        widget=StringWidget(label='Last Elected'),  
 #        storage=PostgreSQLStorage(),  
 #        ),  
 #    StringField('next_election',  
 #        widget=StringWidget(label='Next Election'),  
 #        storage=PostgreSQLStorage(),  
 #        ),  
     # mmm, True == Male (of course, since I'm a guy)  
 #    BooleanField('gender',  
 #        widget=BooleanWidget(label='Gender'),  
 #        storage=PostgreSQLStorage(),  
 #        ),  
     # Some sort of selection widget? Perhaps something stored in pac_tool or  
     # pac_properties?  
 #    StringField('religion',  
 #            widget=StringWidget(label='Religion'),  
 #            storage=PostgreSQLStorage(),  
 #            ),  
44      ###################################      ###################################
45    
46      ###################################      ###################################
47      # recipients      # recipients
48      LinesField('action_recipients',      LinesField('actionRecipients',
49              widget=ReferenceWidget(label='Action Recipients'),              widget=LinesWidget(label='Action Recipients',
50                    macro_edit='pac_widgets/actionrecipients_chooser',),
51              storage=PostgreSQLStorage(),              storage=PostgreSQLStorage(),
52              schemata='recipients',              schemata='recipients',
53              ),              ),
# Line 81  schema = BaseSchema + Schema(( Line 56  schema = BaseSchema + Schema((
56      )) + TemplateMixin.schema      )) + TemplateMixin.schema
57    
58  class ActionRecipientList(TemplateMixin, BaseContent):  class ActionRecipientList(TemplateMixin, BaseContent):
59      """Action recipient filter parameters and references"""      """Action Recipient filter parameters and references"""
60      schema = schema      schema = schema
61      archetype_name = "Action Recipient List"      archetype_name = "Action Recipient List"
62      actions = TemplateMixin.actions      actions = TemplateMixin.actions
# Line 137  class ActionRecipientList(TemplateMixin, Line 112  class ActionRecipientList(TemplateMixin,
112    
113          return result          return result
114    
115    
116  registerType(ActionRecipientList)  registerType(ActionRecipientList)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26