Changeset 1380
- Timestamp:
- 01/20/11 14:23:50 (16 months ago)
- Location:
- HelpIM3/branches/chatgroups/HelpIM/questionair
- Files:
-
- 2 removed
- 2 modified
-
pages/EditQuestionair.py (modified) (1 diff)
-
pages/ShowQuestionairs.py (modified) (1 diff)
-
pages/ShowQuestions.py (deleted)
-
templates/ShowQuestionsPanel.py (deleted)
Legend:
- Unmodified
- Added
- Removed
-
HelpIM3/branches/chatgroups/HelpIM/questionair/pages/EditQuestionair.py
r1378 r1380 32 32 def getShowQuestionsPanel(self, *pargs, **kwargs): 33 33 self.log.debug('.getShowQuestionsPanel()') 34 addAction = { 'action': [ {'name':'AddQuestion', 'text':'Voeg een vraag toe'}, 35 [ {'actionParm': [ {'name': 'questionair_id', 'valueRecord':'Questionair', 'valueAttr':'questionair_id' } ] }, 36 ] 37 ] } 38 table = { 'table_panel': [ {'dataTable':'Questionair', 39 'dataRecord':'Question'}, 40 [ { 'table_column': [ { 'heading':'Vraag', 41 'dataTable':'questions', 42 'dataRecord':'Question', 43 'attrName':'question_text', 44 } 45 ] 46 }, 47 { 'table_column': [ { 'type':'action' }, 48 [ { 'action': [ {'name':'EditQuestion', 'text':'wijzigen'}, 49 [ {'actionParm': [ {'name': 'questionair_id', 'valueAttr':'questionair_id' } ] }, 50 {'actionParm': [ {'name': 'question_id', 'valueAttr':'question_id' } ] }, 51 ] 52 ] 53 }] 54 ] 55 }, 56 addAction 57 ] 58 ] } 59 panel_def = { 'panel_def': [ [ table ] ] } 60 return table 34 table = {'table_panel': [ 35 {'panelName': 'Toon vragen', 36 'dataTable':'Questionair', 37 'dataRecord':'Question'}, 38 [{'table_column': [ 39 {'heading':'Vraag', 40 'dataTable':'questions', 41 'dataRecord':'Question', 42 'attrName':'question_text'} 43 ]}, 44 {'table_column': [ 45 {'type':'action'}, 46 [{'action': [ 47 {'name':'EditQuestion', 'text':'wijzigen'}, 48 [{'actionParm': [{'name': 'question_id', 49 'valueAttr':'question_id' }]} 50 ] 51 ]}] 52 ]}, 53 {'table_column': [ 54 {'type':'action'}, 55 [{'action': [ 56 {'name':'DeleteQuestion', 57 'text':'verwijder'}, 58 [{'actionParm': [{'name': 'question_id', 59 'valueAttr':'question_id'}]}] 60 ]}] 61 ]}, 62 {'action': [ 63 {'name':'AddQuestion', 64 'text':'Voeg een vraag toe'}, 65 [{'actionParm': [ 66 {'name': 'questionair_id', 67 'valueRecord':'Questionair', 68 'valueAttr':'questionair_id' } 69 ]}] 70 ]} 71 ] 72 ]} 73 return {'panel_def': [[table]]} 61 74 -
HelpIM3/branches/chatgroups/HelpIM/questionair/pages/ShowQuestionairs.py
r694 r1380 4 4 class Handler(ShowQuestionairsPanel): 5 5 6 """Show login panel - (does what it says)7 Offers the user a panel to login to the system8 """9 6 def __init__(self, *args, **kwargs): 10 7 super(ShowQuestionairsPanel, self).__init__( *args, **kwargs) 11 8 import logging 12 9 self.log = logging.getLogger('HelpIM.questionair.pages.ShowQuestionairs.Handler') 13 #self.panelId = 'ShowUsers'14 #self.function = 'ShowUsers'15 10 self.panelName = 'Toon enquetes' 16 #self.panelType = 'table_panel'17 11 self.editAction = 'EditQuestionair' 18 19 12 20 13 def getPanelData(self, *pargs, **kwargs): 21 """ Method that returns a 'panel_data'-element.22 This method overrides the one from the superclass to provide the actual 'panel_data'23 """24 14 self.log.debug('.getPanelData()') 25 26 27 questionairDataElements = ['questionair_id', 'questionair_name', 'questionair_start_date', 'questionair_end_date'] 28 questionairData = self.site.getTableData('Table_Data', 'Table_Record', self.site.getQuestionairsList(self.site), questionairDataElements, fieldsAsAttributes) 15 16 questionairDataElements = ['questionair_id', 17 'questionair_name', 18 'questionair_start_date', 19 'questionair_end_date'] 20 21 questionairData = self.site.getTableData( 22 'Table_Data', 23 'Table_Record', 24 self.site.getQuestionairsList(self.site), 25 questionairDataElements, 26 fieldsAsAttributes 27 ) 29 28 30 29 fieldErrors = { 'fieldErrors': [ self.errors ] } 31 30 panelMessage = { 'panelMessage': self.panelMessage} 32 33 panel_data = { 'panel_data': [ 34 [ questionairData 35 ] 36 ] 37 } 31 panel_data = {'panel_data': [[questionairData]]} 32 38 33 return [panel_data, fieldErrors, panelMessage]
