- Timestamp:
- 23 Apr 2013, 11:49:18 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r10095 r10097 100 100 return html 101 101 102 @property 103 def containers(self): 104 return [value for value in self.context.values() if not value.hidden] 105 102 106 class ApplicantsSearchPage(KofaPage): 103 107 grok.context(IApplicantsRoot) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootpage.pt
r9088 r10097 14 14 </thead> 15 15 <tbody> 16 <tr tal:repeat="entry context/values" class="gradeC">16 <tr tal:repeat="entry view/containers" class="gradeC"> 17 17 <td tal:content="entry/year">Year 18 18 </td> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r9531 r10097 260 260 ) 261 261 262 hidden= schema.Bool( 263 title = _(u'Hide container'), 264 required = False, 265 default = True, 266 ) 267 262 268 def archive(id=None): 263 269 """Create on-dist archive of applicants stored in this term. -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r10095 r10097 218 218 self.assertEqual(self.browser.headers['Status'], '200 Ok') 219 219 self.assertEqual(self.browser.url, self.manage_root_path) 220 return 221 222 def test_hide_container(self): 223 self.browser.open(self.root_path) 224 self.assertFalse( 225 '<a href="http://localhost/app/applicants/app2011">' 226 'This is the app2011 container</a>' in self.browser.contents) 227 self.app['applicants']['app2011'].hidden = False 228 self.browser.open(self.root_path) 229 self.assertTrue( 230 '<a href="http://localhost/app/applicants/app2011">' 231 'This is the app2011 container</a>' in self.browser.contents) 220 232 return 221 233 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
r9117 r10097 72 72 result, 73 73 'application_category,application_fee,code,description,' 74 'enddate, mode,prefix,startdate,strict_deadline,title,year\r\n'74 'enddate,hidden,mode,prefix,startdate,strict_deadline,title,year\r\n' 75 75 76 76 'basic,0.0,dp2012,' 77 77 '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",' 78 '2012-01-31 23:00:00+00:00, ,app,2012-01-01 12:00:00+00:00,1,'78 '2012-01-31 23:00:00+00:00,1,,app,2012-01-01 12:00:00+00:00,1,' 79 79 'General Studies 2012/13,2012\r\n' 80 80 )
Note: See TracChangeset for help on using the changeset viewer.