- Timestamp:
- 22 Feb 2014, 15:46:03 (11 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 69 deleted
- 115 edited
- 97 copied
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk
- Property svn:mergeinfo changed
-
main/waeup.kofa/trunk/CHANGES.txt
r11253 r11254 2 2 ******* 3 3 4 0.2.2dev (unreleased)5 =================== ==4 1.0dev (unreleased) 5 =================== 6 6 7 7 * No changes yet. -
main/waeup.kofa/trunk/buildout-zeo.cfg
r9217 r11254 13 13 site_zcml 14 14 zdaemon_conf 15 deploy_ini 16 debug_ini 15 raw_deploy_ini 16 raw_debug_ini 17 themed_deploy_ini 18 themed_debug_ini 17 19 profile_ini 18 20 zeo1_ini … … 23 25 # kofactl creation must be _after_ app! 24 26 kofactl 27 lxml 28 diazo 25 29 # For backward compatibility, telling buildout not to throw away 26 30 # the data and log subdirectories from the parts directory. … … 115 119 # See http://pypi.python.org/pypi/zc.recipe.egg for details... 116 120 recipe = zc.recipe.egg 117 eggs = waeup.kofa [beaker ]121 eggs = waeup.kofa [beaker, diazo] 118 122 arguments = "${buildout:parts-directory}/etc/zeo1.conf" 119 123 scripts = kofactl=zeo_client1 … … 122 126 # See http://pypi.python.org/pypi/zc.recipe.egg for details... 123 127 recipe = zc.recipe.egg 124 eggs = waeup.kofa [beaker ]128 eggs = waeup.kofa [beaker, diazo] 125 129 arguments = "${buildout:parts-directory}/etc/zeo2.conf" 126 130 scripts = kofactl=zeo_client2 -
main/waeup.kofa/trunk/buildout.cfg
r10110 r11254 11 11 site_zcml 12 12 zdaemon_conf 13 deploy_ini 14 debug_ini 13 raw_deploy_ini 14 raw_debug_ini 15 themed_deploy_ini 16 themed_debug_ini 15 17 profile_ini 16 18 waeupdocs … … 19 21 # kofactl creation must be _after_ app! 20 22 kofactl 23 lxml 24 diazo 21 25 # For backward compatibility, telling buildout not to throw away 22 26 # the data and log subdirectories from the parts directory. … … 28 32 show-picked-versions = true 29 33 update-versions-file = versions.cfg 34 30 35 31 36 # eggs will be installed in the default buildout location … … 57 62 # This creates all scripts in bin/. The kofactl created here is 'faulty'. 58 63 recipe = zc.recipe.egg 59 eggs = waeup.kofa [beaker ]64 eggs = waeup.kofa [beaker, diazo] 60 65 z3c.evalexception>=2.0 61 66 Paste … … 71 76 # fixed path to zdaemon.conf as argument. 72 77 recipe = zc.recipe.egg 73 eggs = waeup.kofa [beaker ]78 eggs = waeup.kofa [beaker, diazo] 74 79 arguments = "${buildout:parts-directory}/etc/zdaemon.conf" 75 80 scripts = kofactl=kofactl … … 143 148 output = ${buildout:parts-directory}/etc/zdaemon.conf 144 149 145 [deploy_ini] 146 recipe = collective.recipe.template 147 input = etc/deploy.ini.in 148 output = ${buildout:parts-directory}/etc/deploy.ini 149 150 [debug_ini] 151 recipe = collective.recipe.template 152 input = etc/debug.ini.in 153 output = ${buildout:parts-directory}/etc/debug.ini 150 [raw_debug_ini] 151 recipe = collective.recipe.template 152 input = etc/raw/debug.ini.in 153 output = ${buildout:parts-directory}/etc/raw-debug.ini 154 155 [raw_deploy_ini] 156 recipe = collective.recipe.template 157 input = etc/raw/deploy.ini.in 158 output = ${buildout:parts-directory}/etc/raw-deploy.ini 159 160 [themed_debug_ini] 161 recipe = collective.recipe.template 162 input = etc/themed/debug.ini.in 163 output = ${buildout:parts-directory}/etc/themed-debug.ini 164 165 [themed_deploy_ini] 166 recipe = collective.recipe.template 167 input = etc/themed/deploy.ini.in 168 output = ${buildout:parts-directory}/etc/themed-deploy.ini 154 169 155 170 [profile_ini] … … 183 198 scripts = coveragereport 184 199 arguments = ('${buildout:parts-directory}/coverage-detect/working-directory/coverage', '${buildout:directory}/coverage-report') 200 201 [lxml] 202 recipe = z3c.recipe.staticlxml 203 egg = lxml 204 205 [diazo] 206 recipe = zc.recipe.egg 207 eggs = 208 diazo [wsgi] 209 PasteScript 210 waeup.kofa [beaker,diazo] -
main/waeup.kofa/trunk/etc/zdaemon.conf.in
r11106 r11254 1 1 <runner> 2 program ${buildout:directory}/bin/paster serve ${buildout:directory}/parts/etc/ deploy.ini2 program ${buildout:directory}/bin/paster serve ${buildout:directory}/parts/etc/themed-deploy.ini 3 3 daemon on 4 4 transcript ${zope_conf:logfiles}/zdaemon.log -
main/waeup.kofa/trunk/etc/zeo1.ini.in
r11157 r11254 80 80 logger_name = wsgi 81 81 82 [app: main]82 [app:zope] 83 83 use = egg:${kofa_params:devel_pkg} 84 84 filter-with = translogger 85 86 [app:static] 87 use = egg:Paste#static 88 document_root = %(LAYOUT_DIR)s/static/ 89 90 [pipeline:default] 91 pipeline = theme 92 zope 93 94 [composite:main] 95 use = egg:Paste#urlmap 96 /static = static 97 / = default 98 99 [filter:theme] 100 use = egg:diazo 101 rules = %(LAYOUT_DIR)s/rules.xml 102 prefix = / 103 doctype = <!DOCTYPE html> 104 # set to true, if you want rules.xml being rebuild on each request 105 debug = false 85 106 86 107 [server:main] … … 95 116 zope_conf = %(here)s/zope_zeo1.conf 96 117 env_vars = ZC_ASYNC_UUID ${buildout:directory}/var/uuid1.txt 118 LAYOUT_DIR = ${buildout:directory}/layout 119 STATIC_DIR = %(LAYOUT_DIR)s/static -
main/waeup.kofa/trunk/etc/zeo2.ini.in
r11157 r11254 80 80 logger_name = wsgi 81 81 82 [app: main]82 [app:zope] 83 83 use = egg:${kofa_params:devel_pkg} 84 84 filter-with = translogger 85 86 [app:static] 87 use = egg:Paste#static 88 document_root = %(LAYOUT_DIR)s/static 89 90 [pipeline:default] 91 pipeline = theme 92 zope 93 94 [composite:main] 95 use = egg:Paste#urlmap 96 /static = static 97 / = default 98 99 [filter:theme] 100 use = egg:diazo 101 rules = %(LAYOUT_DIR)s/rules.xml 102 prefix = / 103 doctype = <!DOCTYPE html> 104 # set to true, if you want rules.xml being rebuild on each request 105 debug = false 85 106 86 107 [server:main] … … 95 116 zope_conf = %(here)s/zope_zeo2.conf 96 117 env_vars = ZC_ASYNC_UUID ${buildout:directory}/var/uuid2.txt 118 LAYOUT_DIR = ${buildout:directory}/layout 119 STATIC_DIR = %(LAYOUT_DIR)s/static -
main/waeup.kofa/trunk/setup.py
r11253 r11254 2 2 from setuptools import setup, find_packages 3 3 4 version = ' 0.2.2dev'4 version = '1.0dev' 5 5 6 6 install_requires =[ … … 39 39 'ulif.loghandlers', 40 40 'zc.async[z3]', 41 'z3c.evalexception', 41 42 ], 43 44 diazo_require = [ 45 'diazo', 46 'webob', 47 ] 42 48 43 49 # Having beaker installed additionally is a feature very recommended … … 114 120 docs = docs_require, 115 121 beaker = beaker_require, 122 diazo = diazo_require, 116 123 ), 117 124 entry_points=""" 118 125 # Add entry points here 119 [hurry.resource.libraries]120 waeup_kofa = waeup.kofa.browser.resources:waeup_kofa126 #[hurry.resource.libraries] 127 #waeup_kofa = waeup.kofa.browser.resources:waeup_kofa 121 128 [console_scripts] 122 129 kofa-debug = grokcore.startup:interactive_debug_prompt -
main/waeup.kofa/trunk/src/waeup/kofa
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa merged eligible /main/waeup.kofa/branches/uli-autoinclude-less/src/waeup/kofa 8871-8888 /main/waeup.sirp/branches/uli-studentpw/src/waeup/kofa 6703-6755 /main/waeup.sirp/branches/ulif-extimgstore/src/waeup/kofa 7001-7062 /main/waeup.sirp/branches/ulif-schoolgrades/src/waeup/kofa 7761-7794
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.py
r9637 r11254 22 22 from zope.component import getUtility 23 23 from hurry.workflow.interfaces import InvalidTransitionError 24 from waeup.kofa.browser.resources import datatable25 24 from waeup.kofa.browser.layout import KofaPage, KofaAddFormPage, NullValidator 26 25 from waeup.kofa.browser.breadcrumbs import Breadcrumb … … 52 51 return 53 52 if not batches: 54 self.flash(_('No batch selected.') )53 self.flash(_('No batch selected.'), type='warning') 55 54 return 56 55 if isinstance(batches, basestring): … … 102 101 @action(_('Cancel'), validator=NullValidator) 103 102 def cancel(self, *args, **kw): 104 self.flash(_('Batch creation cancelled.') )103 self.flash(_('Batch creation cancelled.'), type='warning') 105 104 self.redirect(self.url(self.context)) 106 105 … … 120 119 def update(self, filenames=None, reimport=None, cancel=None): 121 120 if cancel is not None: 122 self.flash(_('Reimport cancelled.') )121 self.flash(_('Reimport cancelled.'), type='warning') 123 122 self.redirect(self.url(self.context)) 124 123 return … … 126 125 return 127 126 if not filenames: 128 self.flash(_('No file chosen. Action cancelled.') )127 self.flash(_('No file chosen. Action cancelled.'), type='warning') 129 128 self.redirect(self.url(self.context)) 130 129 return … … 137 136 except KeyError: 138 137 self.flash(_('This batch already exists: ${a}', 139 mapping = {'a':filename}) )138 mapping = {'a':filename}), type='warning') 140 139 continue 141 140 self.flash(_('Successfully reimported: ${a}', … … 156 155 disable_button = _('Disable ACs') 157 156 enable_button = _('Enable ACs') 157 cancel_button = _('Cancel Search') 158 158 159 159 def update(self, *args, **kw): 160 datatable.need()161 160 form = self.request.form 161 if 'cancel' in form: 162 self.redirect(self.url(self.context)) 163 return 162 164 self.hitlist = [] 163 165 if 'searchterm' in form and form['searchterm']: … … 187 189 except InvalidTransitionError: 188 190 self.flash(_('${a}: Disable transition not allowed.', 189 mapping = {'a':entry}) )191 mapping = {'a':entry}), type='danger') 190 192 elif 'enable' in form: 191 193 try: … … 196 198 self.context.logger_info(ob_class, message) 197 199 except InvalidTransitionError: 198 self.flash(_('${a}: Re-enable transition not allowed.', mapping = {'a':entry})) 200 self.flash(_('${a}: Re-enable transition not allowed.', 201 mapping = {'a':entry}), type='danger') 199 202 self.hitlist = search(query=self.searchterm, 200 203 searchtype=self.searchtype, view=self) -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.txt
r10207 r11254 273 273 >>> ctrl.getControl(value='code').selected = True 274 274 >>> browser.getControl(name='searchterm').value = app_1_codes.keys()[0] 275 >>> browser.getControl( 'Search').click()275 >>> browser.getControl(name='search').click() 276 276 277 277 The first access code in the ``APP-1`` batch is displayed: … … 295 295 >>> ctrl.getControl(value='batch_serial').selected = True 296 296 >>> browser.getControl(name='searchterm').value = '1' 297 >>> browser.getControl( 'Search').click()297 >>> browser.getControl(name='search').click() 298 298 >>> print browser.contents 299 299 <!DOCTYPE html ... … … 311 311 >>> ctrl.getControl(value='batch_serial').selected = True 312 312 >>> browser.getControl(name='searchterm').value = 'xyz' 313 >>> browser.getControl( 'Search').click()313 >>> browser.getControl(name='search').click() 314 314 >>> print browser.contents 315 315 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" … … 324 324 >>> ctrl.getControl(value='history').selected = True 325 325 >>> browser.getControl(name='searchterm').value = 'initialized' 326 >>> browser.getControl( 'Search').click()326 >>> browser.getControl(name='search').click() 327 327 >>> print browser.contents 328 328 <!DOCTYPE html ... … … 345 345 >>> ctrl.getControl(value='history').selected = True 346 346 >>> browser.getControl(name='searchterm').value = 'initialized' 347 >>> browser.getControl( 'Search').click()347 >>> browser.getControl(name='search').click() 348 348 349 349 This lists all access codes. We now tick one to disable it and click -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/batchcontainer.pt
r9267 r11254 3 3 The following batches are available: 4 4 </p> 5 <table >5 <table class="table"> 6 6 <thead> 7 7 <tr> … … 48 48 </tbody> 49 49 </table> 50 <input type="submit" class="btn " name="archive"50 <input type="submit" class="btn btn-default" name="archive" 51 51 tal:attributes="value view/archive_button" /> 52 <input type="submit" class="btn " name="delete"52 <input type="submit" class="btn btn-default" name="delete" 53 53 tal:attributes="value view/delete_button" /> 54 54 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/reimportbatchpage.pt
r7811 r11254 4 4 </p> 5 5 <form method="POST" i18n:domain="waeup.kofa"> 6 <table >6 <table class="table"> 7 7 <thead> 8 8 <tr> … … 25 25 </tbody> 26 26 </table> 27 <input type="submit" class="btn primary" name="reimport"27 <input type="submit" class="btn btn-primary" name="reimport" 28 28 tal:attributes="value view/reimport_button" /> 29 <input type="submit" class="btn " name="cancel"29 <input type="submit" class="btn btn-default" name="cancel" 30 30 tal:attributes="value view/cancel_button" /> 31 31 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/searchpage.pt
r7811 r11254 1 <form method="POST" i18n:domain="waeup.kofa" >1 <form method="POST" i18n:domain="waeup.kofa" class="form-inline"> 2 2 <br /> 3 <input type="submit" class="btn primary" name="search" 4 tal:attributes="value view/search_button" /> 3 <div class="form-group"> 4 <input type="submit" class="btn btn-primary" name="search" 5 tal:attributes="value view/search_button" /> 5 6 <span i18n:translate="">for access codes</span> 6 <select name="searchtype"> 7 <option i18n:translate="" value="code">with PIN</option> 8 <option i18n:translate="" value="batch_serial">with serial</option> 9 <option i18n:translate="" value="history">with message term</option> 10 </select> 11 <input type="text" name="searchterm" /> 7 </div> 8 <div class="form-group"> 9 <select name="searchtype" class="form-control"> 10 <option i18n:translate="" value="code">with PIN</option> 11 <option i18n:translate="" value="batch_serial">with serial</option> 12 <option i18n:translate="" value="history">with message term</option> 13 </select> 14 </div> 15 <div class="form-group"> 16 <input type="text" class="form-control" name="searchterm" /> 17 </div> 12 18 <p> </p> 13 19 <div tal:condition="view/hitlist"> … … 17 23 <input type="hidden" name="old_searchtype" 18 24 tal:attributes="value view/searchtype" /> 19 <table class=" displaydataTableManage">25 <table class="kofa-data-table dataTableManage"> 20 26 <thead> 21 27 <tr> … … 43 49 </table> 44 50 <div> 45 <input type="submit" class="btn " name="disable"51 <input type="submit" class="btn btn-default" name="disable" 46 52 tal:attributes="value view/disable_button" /> 47 <input type="submit" class="btn " name="enable"53 <input type="submit" class="btn btn-default" name="enable" 48 54 tal:attributes="value view/enable_button" /> 55 <input type="submit" class="btn btn-default" name="cancel" 56 tal:attributes="value view/cancel_button" /> 49 57 </div> 50 58 </div> 59 <div tal:condition="not: view/hitlist"> 60 <input type="submit" class="btn btn-default" name="cancel" 61 tal:attributes="value view/cancel_button" /> 51 62 </div> 52 63 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r11253 r11254 46 46 from waeup.kofa.browser.interfaces import ICaptchaManager 47 47 from waeup.kofa.browser.breadcrumbs import Breadcrumb 48 from waeup.kofa.browser.resources import toggleall49 48 from waeup.kofa.browser.layout import ( 50 49 NullValidator, jsaction, action, UtilityView, JSAction) 51 50 from waeup.kofa.browser.pages import ( 52 51 add_local_role, del_local_roles, doll_up, ExportCSVView) 53 from waeup.kofa.browser.resources import datepicker, tabs, datatable, warning54 52 from waeup.kofa.interfaces import ( 55 53 IKofaObject, ILocalRolesAssignable, IExtFileStore, IPDF, … … 116 114 117 115 def update(self, *args, **kw): 118 datatable.need()119 116 form = self.request.form 120 117 self.results = [] … … 127 124 else: 128 125 if 'search' in form: 129 self.flash(_('Empty search string') )126 self.flash(_('Empty search string'), type='warning') 130 127 return 131 128 self.results = search(query=self.searchterm, 132 129 searchtype=self.searchtype, view=self) 133 130 if not self.results: 134 self.flash(_('No applicant found.') )131 self.flash(_('No applicant found.'), type='warning') 135 132 return 136 133 … … 149 146 subunits = _('Applicants Containers') 150 147 151 def update(self):152 tabs.need()153 datatable.need()154 warning.need()155 self.tab1 = self.tab2 = self.tab3 = ''156 qs = self.request.get('QUERY_STRING', '')157 if not qs:158 qs = 'tab1'159 setattr(self, qs, 'active')160 return super(ApplicantsRootManageFormPage, self).update()161 162 148 def getLocalRoles(self): 163 149 roles = ILocalRolesAssignable(self.context) … … 180 166 child_id = form['val_id'] 181 167 else: 182 self.flash(_('No container selected!') )183 self.redirect(self.url(self.context, '@@manage')+' ?tab2')168 self.flash(_('No container selected!'), type='warning') 169 self.redirect(self.url(self.context, '@@manage')+'#tab2') 184 170 return 185 171 if not isinstance(child_id, list): … … 192 178 except: 193 179 self.flash(_('Could not delete:') + ' %s: %s: %s' % ( 194 id, sys.exc_info()[0], sys.exc_info()[1]))180 id, sys.exc_info()[0], sys.exc_info()[1]), type='danger') 195 181 if len(deleted): 196 182 self.flash(_('Successfully removed: ${a}', 197 183 mapping = {'a':', '.join(deleted)})) 198 self.redirect(self.url(self.context, '@@manage')+' ?tab2')184 self.redirect(self.url(self.context, '@@manage')+'#tab2') 199 185 return 200 186 … … 235 221 form_fields = grok.AutoFields( 236 222 IApplicantsContainerAdd).omit('code').omit('title') 237 238 def update(self):239 datepicker.need() # Enable jQuery datepicker in date fields.240 return super(ApplicantsContainerAddFormPage, self).update()241 223 242 224 @action(_('Add applicants container')) … … 249 231 if code in self.context.keys(): 250 232 self.flash( 251 _('An applicants container for the same application type and entrance year exists already in the database.')) 233 _('An applicants container for the same application ' 234 'type and entrance year exists already in the database.'), 235 type='warning') 252 236 return 253 237 # Add new applicants container... … … 378 362 return False 379 363 380 def update(self):381 datepicker.need() # Enable jQuery datepicker in date fields.382 tabs.need()383 toggleall.need()384 self.tab1 = self.tab2 = self.tab3 = ''385 qs = self.request.get('QUERY_STRING', '')386 if not qs:387 qs = 'tab1'388 setattr(self, qs, 'active')389 warning.need()390 datatable.need() # Enable jQurey datatables for contents listing391 return super(ApplicantsContainerManageFormPage, self).update()392 393 364 def getLocalRoles(self): 394 365 roles = ILocalRolesAssignable(self.context) … … 436 407 child_id = form['val_id'] 437 408 else: 438 self.flash(_('No applicant selected!') )439 self.redirect(self.url(self.context, '@@manage')+' ?tab2')409 self.flash(_('No applicant selected!'), type='warning') 410 self.redirect(self.url(self.context, '@@manage')+'#tab2') 440 411 return 441 412 if not isinstance(child_id, list): … … 448 419 except: 449 420 self.flash(_('Could not delete:') + ' %s: %s: %s' % ( 450 id, sys.exc_info()[0], sys.exc_info()[1]))421 id, sys.exc_info()[0], sys.exc_info()[1]), type='danger') 451 422 if len(deleted): 452 423 self.flash(_('Successfully removed: ${a}', 453 424 mapping = {'a':', '.join(deleted)})) 454 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')425 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 455 426 return 456 427 … … 461 432 child_id = form['val_id'] 462 433 else: 463 self.flash(_('No applicant selected!') )464 self.redirect(self.url(self.context, '@@manage')+' ?tab2')434 self.flash(_('No applicant selected!'), type='warning') 435 self.redirect(self.url(self.context, '@@manage')+'#tab2') 465 436 return 466 437 if not isinstance(child_id, list): … … 475 446 mapping = {'a': len(created)})) 476 447 else: 477 self.flash(_('No student could be created.') )478 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')448 self.flash(_('No student could be created.'), type='warning') 449 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 479 450 return 480 451 … … 612 583 def update(self): 613 584 msg = self.context.createStudent(view=self)[1] 614 self.flash(msg )585 self.flash(msg, type='warning') 615 586 self.redirect(self.url(self.context)) 616 587 return … … 652 623 mapping = {'a': len(created)})) 653 624 else: 654 self.flash(_('No student could be created.') )625 self.flash(_('No student could be created.'), type='warning') 655 626 self.redirect(self.url(self.context)) 656 627 return … … 672 643 if ticket.p_state == 'paid': 673 644 self.flash( 674 _('This type of payment has already been made.')) 645 _('This type of payment has already been made.'), 646 type='warning') 675 647 self.redirect(self.url(self.context)) 676 648 return … … 678 650 container = self.context.__parent__ 679 651 payment = createObject(self.factory) 680 error= applicants_utils.setPaymentDetails(652 failure = applicants_utils.setPaymentDetails( 681 653 container, payment, self.context) 682 if erroris not None:683 self.flash( error)654 if failure is not None: 655 self.flash(failure[0], type='danger') 684 656 self.redirect(self.url(self.context)) 685 657 return … … 731 703 self.context.p_id, self.context.p_category, 732 704 self.context.amount_auth, self.context.r_code)) 733 self.flash(msg )705 self.flash(msg, type='warning') 734 706 return 735 707 … … 785 757 if self.context.state in ('initialized', 'started', 'paid'): 786 758 self.flash( 787 _('Please pay and submit before trying to download the application slip.')) 759 _('Please pay and submit before trying to download ' 760 'the application slip.'), type='warning') 788 761 return self.redirect(self.url(self.context)) 789 762 return … … 806 779 size = file_size(upload) 807 780 if size > MAX_UPLOAD_SIZE: 808 view.flash(_('Uploaded image is too big!') )781 view.flash(_('Uploaded image is too big!'), type='danger') 809 782 return False 810 783 dummy, ext = os.path.splitext(upload.filename) 811 784 ext.lower() 812 785 if ext != '.jpg': 813 view.flash(_('jpg file extension expected.') )786 view.flash(_('jpg file extension expected.'), type='danger') 814 787 return False 815 788 upload.seek(0) # file pointer moved when determining size … … 851 824 852 825 def update(self): 853 datepicker.need() # Enable jQuery datepicker in date fields.854 warning.need()855 826 super(ApplicantManageFormPage, self).update() 856 827 self.wf_info = IWorkflowInfo(self.context) … … 894 865 errors = validator.validate_password(password, password_ctl) 895 866 if errors: 896 self.flash( ' '.join(errors) )867 self.flash( ' '.join(errors), type='danger') 897 868 return 898 869 if self.upload_success is False: # False is not None! … … 927 898 child_id = form['val_id'] 928 899 else: 929 self.flash(_('No payment selected.') )900 self.flash(_('No payment selected.'), type='warning') 930 901 self.redirect(self.url(self.context)) 931 902 return … … 941 912 except: 942 913 self.flash(_('Could not delete:') + ' %s: %s: %s' % ( 943 id, sys.exc_info()[0], sys.exc_info()[1]))914 id, sys.exc_info()[0], sys.exc_info()[1]), type='danger') 944 915 if len(deleted): 945 916 self.flash(_('Successfully removed: ${a}', … … 1013 984 1014 985 def emit_lock_message(self): 1015 self.flash(_('The requested form is locked (read-only).')) 986 self.flash(_('The requested form is locked (read-only).'), 987 type='warning') 1016 988 self.redirect(self.url(self.context)) 1017 989 return … … 1054 1026 return 1055 1027 if data.get('course1', 1) == data.get('course2', 2): 1056 self.flash(_('1st and 2nd choice must be different.')) 1028 self.flash(_('1st and 2nd choice must be different.'), 1029 type='warning') 1057 1030 return 1058 1031 self.applyData(self.context, **data) … … 1065 1038 return # error during image upload. Ignore other values 1066 1039 if self.dataNotComplete(): 1067 self.flash(self.dataNotComplete() )1040 self.flash(self.dataNotComplete(), type='danger') 1068 1041 return 1069 1042 self.applyData(self.context, **data) … … 1072 1045 # might have forgotten to lock the form after changing the state 1073 1046 if state != self.submit_state: 1074 self.flash(_('The form cannot be submitted. Wrong state!')) 1047 self.flash(_('The form cannot be submitted. Wrong state!'), 1048 type='danger') 1075 1049 return 1076 1050 IWorkflowInfo(self.context).fireTransition('submit') … … 1126 1100 def update(self): 1127 1101 if self.context.expired: 1128 self.flash(_('Outside application period.') )1102 self.flash(_('Outside application period.'), type='warning') 1129 1103 self.redirect(self.url(self.context)) 1130 1104 return … … 1164 1138 applicant = results[0] 1165 1139 if getattr(applicant,'firstname',None) is None: 1166 self.flash(_('An error occurred.') )1140 self.flash(_('An error occurred.'), type='danger') 1167 1141 return 1168 1142 elif applicant.firstname.lower() != firstname.lower(): … … 1170 1144 # know that a record was found and only the firstname 1171 1145 # verification failed. 1172 self.flash(_('No application record found.') )1146 self.flash(_('No application record found.'), type='warning') 1173 1147 return 1174 1148 elif applicant.password is not None and \ 1175 1149 applicant.state != INITIALIZED: 1176 1150 self.flash(_('Your password has already been set and used. ' 1177 'Please proceed to the login page.')) 1151 'Please proceed to the login page.'), 1152 type='warning') 1178 1153 return 1179 1154 # Store email address but nothing else. … … 1182 1157 else: 1183 1158 # No record found, this is the truth. 1184 self.flash(_('No application record found.') )1159 self.flash(_('No application record found.'), type='warning') 1185 1160 return 1186 1161 else: … … 1227 1202 grok.name('index.html') 1228 1203 grok.template('exportjobsindex') 1229 label = _(' ApplicantData Exports')1204 label = _('Data Exports') 1230 1205 pnav = 3 1231 1206 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantcontainerstatistics.pt
r8643 r11254 1 1 <tal:statistics define="stats context/statistics" i18n:domain="waeup.kofa"> 2 2 <h2 i18n:translate="">Container Statistics</h2> 3 <table class=" span8">3 <table class="table"> 4 4 <thead> 5 5 <tr> … … 17 17 </tbody> 18 18 </table> 19 <table class=" span8" tal:condition="python: stats[1]">19 <table class="table" tal:condition="python: stats[1]"> 20 20 <thead> 21 21 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt
r10353 r11254 41 41 Application Fee Payment Tickets 42 42 </h3> 43 <table i18n:domain="waeup.kofa" >43 <table i18n:domain="waeup.kofa" class="table table-condensed"> 44 44 <thead> 45 45 <tr> … … 54 54 <tbody> 55 55 <tr tal:repeat="value context/values"> 56 <td> <a tal:attributes="href value/__name__">56 <td> <a tal:attributes="href python:view.url(value)"> 57 57 <span tal:content="value/p_id">PID</span></a></td> 58 58 <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt
r10353 r11254 38 38 <td class="fieldname" i18n:translate="">Password:</td> 39 39 <td> 40 <input name="password" type="password" />40 <input class="form-control" name="password" type="password" /> 41 41 </td> 42 42 </tr> … … 44 44 <td class="fieldname" i18n:translate="">Retype Password:</td> 45 45 <td> 46 <input name="control_password" type="password" />46 <input class="form-control" name="control_password" type="password" /> 47 47 </td> 48 48 </tr> … … 50 50 <td class="fieldname" i18n:translate="">Application Transition:</td> 51 51 <td> 52 <select id="transition" name="transition" >52 <select id="transition" name="transition" class="form-control half"> 53 53 <option tal:repeat="transition view/getTransitions" 54 54 tal:attributes="value transition/name"> … … 84 84 </h3> 85 85 86 <table >86 <table i18n:domain="waeup.kofa" class="table table-condensed"> 87 87 <thead> 88 88 <tr> … … 104 104 tal:condition="python: not view.unremovable(cl)" /> 105 105 </td> 106 <td> <a tal:attributes="href cl/__name__">106 <td> <a tal:attributes="href python:view.url(cl)"> 107 107 <span tal:content="cl/p_id">PID</span></a></td> 108 108 <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantregemailsent.pt
r8855 r11254 19 19 <tal:credentials condition = "view/password" i18n:domain="waeup.kofa"> 20 20 <h3 i18n:translate="">Your login credentials are:</h3> 21 <table class=" bordered-table span6">21 <table class="table-bordered"> 22 22 <tr> 23 23 <td i18n:translate="">User Name:</td> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontaineraddpage.pt
r7737 r11254 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 class="edit-form"enctype="multipart/form-data">2 enctype="multipart/form-data"> 3 3 4 4 <table class="form-table"> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontainermanagepage.pt
r9339 r11254 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 i18n:domain="waeup.kofa" class="edit-form"enctype="multipart/form-data">2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <ul class="tabs" data-tabs="tabs">5 <li tal:attributes="class view/tab1">6 <a href="#tab -1">4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab"> 7 7 <span i18n:translate="">Settings 8 8 </span></a> 9 9 </li> 10 <li tal:attributes="class view/tab2">11 <a href="#tab -2">10 <li> 11 <a href="#tab2" data-toggle="tab"> 12 12 <span i18n:translate="">Applicants 13 13 </span></a> 14 14 </li> 15 <li tal:attributes="class view/tab3">16 <a href="#tab -3">15 <li> 16 <a href="#tab3" data-toggle="tab"> 17 17 <span i18n:translate="">Local Roles 18 18 </span></a> … … 20 20 </ul> 21 21 <div class="tab-content"> 22 <div id="tab-1" tal:attributes="class view/tab1"> 22 <div id="tab1" class="active tab-pane"> 23 <br /> 23 24 <table class="form-table"> 24 25 <tbody> … … 33 34 </div> 34 35 </div> 35 <div id="tab -2" tal:attributes="class view/tab2">36 <div id="tab2" class="tab-pane"> 36 37 <tal:showApplicants condition="view/showApplicants"> 37 <input type="checkbox" onClick="toggle(this, 'val_id')" /> 38 <span i18n:translate="">Select all</span> 39 <br /><br /> 40 41 <table class="display dataTableManage"> 38 <br /> 39 <table class="kofa-data-table dataTableManage"> 42 40 <thead> 43 41 <tr> … … 55 53 </thead> 56 54 <tbody> 57 <tr class="gradeC"tal:repeat="appl context/values">55 <tr tal:repeat="appl context/values"> 58 56 <td> 59 57 <input type="checkbox" name="val_id" tal:attributes="value appl/__name__" /> … … 78 76 </tbody> 79 77 </table> 78 <input type="checkbox" onClick="toggle(this, 'val_id')" /> 79 <span i18n:translate="">Select all</span> 80 <br /><br /> 80 81 <div tal:condition="view/availableActions"> 81 82 <span tal:repeat="action view/actions" tal:omit-tag=""> … … 100 101 </tal:showNoApplicants> 101 102 </div> 102 <div id="tab -3" tal:attributes="class view/tab3"> <br />103 <table class=" displaydataTableManage">103 <div id="tab3" class="tab-pane"> <br /> 104 <table class="kofa-data-table dataTableManage"> 104 105 <thead> 105 106 <tr> … … 115 116 </thead> 116 117 <tbody> 117 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>118 <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td> 118 119 <input type="checkbox" name="role_id" 119 120 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> … … 132 133 <table class="form-table"> 133 134 <tr> <td> 134 <select id="user" name="user" >135 <select id="user" name="user" class="form-control"> 135 136 <option tal:repeat="user view/getUsers" 136 137 tal:attributes="value user/name"> … … 139 140 </option> 140 141 </select> </td> <td> 141 <select id="local_role" name="local_role" >142 <select id="local_role" name="local_role" class="form-control"> 142 143 <option tal:repeat="localrole view/getLocalRoles" 143 144 tal:attributes="value localrole/name"> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootmanagepage.pt
r8547 r11254 1 1 <form action="." tal:attributes="action request/URL" 2 2 i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data"> 3 <ul class="tabs " data-tabs="tabs">4 <li tal:attributes="class view/tab1">5 <a href="#tab -1">3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 <li class="active"> 5 <a href="#tab1" data-toggle="tab"> 6 6 <span i18n:translate="">Introduction 7 7 </span></a> 8 8 </li> 9 <li tal:attributes="class view/tab2">10 <a href="#tab -2">9 <li> 10 <a href="#tab2" data-toggle="tab"> 11 11 <span tal:content="view/subunits">Contents 12 12 </span></a> 13 13 </li> 14 <li tal:attributes="class view/tab3">15 <a href="#tab -3">14 <li> 15 <a href="#tab3" data-toggle="tab"> 16 16 <span i18n:translate="">Local Roles 17 17 </span></a> … … 19 19 </ul> 20 20 <div class="tab-content"> 21 <div id="tab-1" tal:attributes="class view/tab1"> 21 <div id="tab1" class="active tab-pane"> 22 <br /> 22 23 <table class="form-table"> 23 24 <tbody> … … 25 26 </tbody> 26 27 </table> 27 28 28 <div tal:condition="view/availableActions"> 29 29 <span tal:repeat="action view/actions" tal:omit-tag=""> … … 33 33 </div> 34 34 </div> 35 <div id="tab-2" tal:attributes="class view/tab2"> 36 <h3 tal:content="view/subunits">SUBUNITS</h3> 37 35 <div id="tab2" class="tab-pane"> 36 <br /> 38 37 <p i18n:translate="note_armp"> 39 38 Please note that containers will be opened in manage mode here. … … 42 41 Please be patient until all records have been loaded. 43 42 </p> 44 45 <table class="display dataTableManage"> 43 <table class="kofa-data-table dataTableManage"> 46 44 <thead> 47 45 <tr> … … 59 57 </thead> 60 58 <tbody> 61 <tr tal:repeat="entry context/values" class="gradeC"> <td>59 <tr tal:repeat="entry context/values"> <td> 62 60 <input type="checkbox" name="val_id" 63 61 tal:attributes="value entry/__name__" /> </td> … … 78 76 </div> 79 77 </div> 80 <div id="tab -3" tal:attributes="class view/tab3">78 <div id="tab3" class="tab-pane"> 81 79 <br /> 82 <table class=" displaydataTableManage">80 <table class="kofa-data-table dataTableManage"> 83 81 <thead> 84 82 <tr> … … 94 92 </thead> 95 93 <tbody> 96 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC">94 <tr tal:repeat="entry view/getUsersWithLocalRoles"> 97 95 <td> <input type="checkbox" name="role_id" 98 96 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> … … 109 107 </span> 110 108 </div> <br /><br /> 111 <table class="form-table"> 112 <tr> <td> 113 <select id="user" name="user"> 114 <option tal:repeat="user view/getUsers" 115 tal:attributes="value user/name"> 116 <span tal:replace="user/val/title">USERTITLE 117 </span> 118 </option> 119 </select> </td> <td> 120 <select id="local_role" name="local_role"> 121 <option tal:repeat="localrole view/getLocalRoles" 122 tal:attributes="value localrole/name"> 123 <span tal:replace="localrole/title">LOCALROLETITLE 124 </span> 125 </option> 126 </select> </td> <td> 127 <div tal:condition="view/availableActions"> 128 <span tal:repeat="action view/actions" tal:omit-tag=""> 129 <input tal:condition="python:action.label in view.tabthreeactions2" 130 tal:replace="structure action/render"/> 131 </span> 132 </div> </td> 133 </tr> 134 </table> 109 <div class="form-inline"> 110 <br /> 111 <div class="form-group"> 112 <select id="user" name="user" class="form-control"> 113 <option tal:repeat="user view/getUsers" 114 tal:attributes="value user/name"> 115 <span tal:replace="user/val/title">USERTITLE 116 </span> 117 </option> 118 </select> 119 </div> 120 <div class="form-group"> 121 <select id="local_role" name="local_role" class="form-control"> 122 <option tal:repeat="localrole view/getLocalRoles" 123 tal:attributes="value localrole/name"> 124 <span tal:replace="localrole/title">LOCALROLETITLE 125 </span> 126 </option> 127 </select> 128 </div> 129 <div class="form-group" tal:condition="view/availableActions"> 130 <span tal:repeat="action view/actions" tal:omit-tag=""> 131 <input tal:condition="python:action.label in view.tabthreeactions2" 132 tal:replace="structure action/render"/> 133 </span> 134 </div> 135 </div> 135 136 </div> 136 137 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootpage.pt
r10097 r11254 4 4 </span> 5 5 6 <table i18n:domain="waeup.kofa" >6 <table i18n:domain="waeup.kofa" class="table table-hover"> 7 7 <thead> 8 8 <tr> … … 14 14 </thead> 15 15 <tbody> 16 <tr tal:repeat="entry view/containers" class="gradeC">16 <tr tal:repeat="entry view/containers"> 17 17 <td tal:content="entry/year">Year 18 18 </td> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantssearchpage.pt
r10645 r11254 1 <form method="POST" i18n:domain="waeup.kofa" >1 <form method="POST" i18n:domain="waeup.kofa" class="form-inline"> 2 2 <br /> 3 <input class="btn primary" type="submit" name="search" 4 tal:attributes="value view/search_button" /> 3 <div class="form-group"> 4 <input class="btn btn-primary" type="submit" name="search" 5 tal:attributes="value view/search_button" /> 6 </div> 7 <div class="form-group"> 8 <select name="searchtype" class="form-control"> 9 <option i18n:translate="" value="applicant_id">with id</option> 10 <option i18n:translate="" value="fullname">with name</option> 11 <option i18n:translate="" value="reg_number">with registration number</option> 12 <option i18n:translate="" value="email">with email address</option> 13 </select> 14 </div> 15 <div class="form-group"> 16 <input type="text" class="form-control" name="searchterm" /> 17 </div> 5 18 6 <select name="searchtype"> 7 <option i18n:translate="" value="applicant_id">with id</option> 8 <option i18n:translate="" value="fullname">with name</option> 9 <option i18n:translate="" value="reg_number">with registration number</option> 10 <option i18n:translate="" value="email">with email address</option> 11 </select> 12 13 <input type="text" name="searchterm" /> 14 15 <p> </p> 19 <br /><br /> 16 20 <div tal:condition="view/results"> 17 21 <h3 i18n:translate="">Search Results</h3> … … 20 24 <input type="hidden" name="old_searchtype" 21 25 tal:attributes="value view/searchtype" /> 22 <table class=" displaydataTable">26 <table class="kofa-data-table dataTable"> 23 27 <thead> 24 28 <tr> … … 30 34 </thead> 31 35 <tbody> 32 <tr tal:repeat="item view/results" class="gradeC">36 <tr tal:repeat="item view/results"> 33 37 <td> <a tal:attributes="href python:view.url(item)"> 34 38 <span tal:content="item/applicant_id">XXXX_1234</span></a> … … 42 46 </tbody> 43 47 </table> 44 <br />45 48 </div> 46 49 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/exportjobsindex.pt
r10655 r11254 1 <table i18n:domain="waeup.kofa" >1 <table i18n:domain="waeup.kofa" class="table table-condensed table-hover"> 2 2 <thead> 3 3 <tr> … … 25 25 <span tal:replace="job/creator">CREATOR</span> 26 26 </td> 27 <td nowrap>27 <td> 28 28 <span tal:replace="job/start_time">DATETIME</span> 29 29 </td> … … 32 32 </td> 33 33 <td nowrap> 34 <a href="" class="btn " i18n:translate=""34 <a href="" class="btn btn-default btn-xs" i18n:translate="" 35 35 tal:condition="job/show_refresh_button"> 36 <img tal:attributes="src static/actionicon_reload.png" />36 <img src="/static/img/actionicon_reload.png" /> 37 37 Reload 38 38 </a> 39 39 <form method="POST"> 40 <a href="" class="btn primary small"40 <a href="" class="btn btn-primary btn-xs" 41 41 tal:attributes="href job/download_url" 42 42 tal:condition="job/show_download_button"> 43 43 Download</a> 44 45 44 <input type="hidden" name="job_id" 46 45 tal:attributes="value job/job" /> 47 <input type="submit" class="btn small"46 <input type="submit" class="btn btn-default btn-xs" 48 47 name="DISCARD" value="Discard" 49 48 tal:condition="job/show_discard_button" /> … … 53 52 </tbody> 54 53 </table> 54 55 55 <form method="POST" i18n:domain="waeup.kofa"> 56 <div class="span12"> 57 58 </div> 59 <input class="btn primary" type="submit" name="CREATE" 56 <input class="btn btn-primary" type="submit" name="CREATE" 60 57 value="Start new export" 61 58 /> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r10843 r11254 51 51 session_config = grok.getSite()['configuration'][session] 52 52 except KeyError: 53 return _(u'Session configuration object is not available.') 53 return _(u'Session configuration object is not available.'), None 54 54 payment.p_id = "p%s" % timestamp 55 55 payment.p_item = container.title -
main/waeup.kofa/trunk/src/waeup/kofa/browser/async.py
r9217 r11254 4 4 from waeup.kofa.async import IJob, IJobManager 5 5 from waeup.kofa.browser.layout import KofaPage 6 from waeup.kofa.browser.resources import jquery, loadbar7 6 from waeup.kofa.interfaces import IKofaObject, IDataCenter 8 7 from waeup.kofa.interfaces import MessageFactory as _ … … 51 50 self.exports = self.getRunningExports() 52 51 self.uncompleted = [x for x in self.exports if x[0] != 'completed'] 53 loadbar.need()54 52 55 53 def render(self): … … 126 124 127 125 def update(self, START_NEW=None, REMOVE=None, job_id=None): 128 jquery.need()129 126 if REMOVE and job_id: 130 127 self.context.remove(job_id) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt
r10207 r11254 55 55 >>> 'Given storage path cannot be used.' in browser.contents 56 56 True 57 >>> browser.getControl(' Cancel').click()57 >>> browser.getControl('Back to Data Center').click() 58 58 59 59 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
r10540 r11254 30 30 >>> browser = Browser() 31 31 32 Let's get the default view of a university and see if the 33 favicon is properly referenced:: 32 Let's get the default view of a university:: 34 33 35 34 >>> browser.open('http://localhost/myuniversity') 36 35 >>> print browser.contents 37 36 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 38 ...href="http://localhost/myuniversity/@@/waeup_kofa/favicon.ico"39 37 ...Welcome to WAeUP.Kofa... 40 38 ... … … 102 100 103 101 >>> 'Sample University' in browser.contents 104 True105 106 The edit form contains the default value for the portal skin::107 108 >>> 'waeup-base.css' in browser.contents109 102 True 110 103 … … 311 304 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 312 305 ...<h1 class="kofa-content-label">Academic Section</h1> 313 ...<td> <a href=" TF"> <span>TF</span></a></td>306 ...<td> <a href="http://localhost/myuniversity/faculties/TF"> <span>TF</span></a></td> 314 307 ... 315 308 … … 355 348 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 356 349 ...<h1 class="kofa-content-label">Academic Section</h1> 357 ...<td> <a href=" TF"> <span>TF</span></a></td>350 ...<td> <a href="http://localhost/myuniversity/faculties/TF"> <span>TF</span></a></td> 358 351 ...<td>Faculty of My renamed faculty (TF)</td> 359 352 ... … … 481 474 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 482 475 ...<h1 class="kofa-content-label">Departments</h1> 483 ...<td> <a href=" TD"> <span>TD</span></a></td>476 ...<td> <a href="http://localhost/myuniversity/faculties/TF/TD"> <span>TD</span></a></td> 484 477 ...<td>Department of TestDept (TD)</td> 485 478 ... … … 514 507 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 515 508 ...<h1 class="kofa-content-label">Departments</h1> 516 ...<td> <a href=" TD"> <span>TD</span></a></td>509 ...<td> <a href="http://localhost/myuniversity/faculties/TF/TD"> <span>TD</span></a></td> 517 510 ...<td>Department of My renamed dept (TD)</td> 518 511 ... -
main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py
r9217 r11254 28 28 from zope.interface import Interface 29 29 from zope.publisher.interfaces.http import IHTTPRequest 30 from waeup.kofa.browser import resources31 30 from waeup.kofa.browser.layout import KofaPage 32 31 from waeup.kofa.browser.interfaces import ( … … 229 228 #: name of challenge field in HTTP request 230 229 chal_field = 'recaptcha_challenge_field' 231 #: resource to set theme and other options232 theme = resources.recaptcha_white233 230 234 231 # Do not use the following keys in productive environments! As … … 294 291 form). 295 292 """ 296 if self.theme is not None:297 self.theme.need()298 293 error_param = '' 299 294 if error_code: -
main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py
r10685 r11254 59 59 """Get the list of breadcrumbs as real Python list. 60 60 """ 61 class ITheme(Interface):62 """An theme or 'skin'.63 64 Themes are basically collections of CSS- and/or JavaScript files65 stored somewhere. In Grok-contexts these files can be registered66 as 'resources' (see :mod:`waeup.kofa.browser.resources`).67 68 Furthermore, to make themes selectable and distinctable from each69 other we assign them short descriptions.70 71 Themes should be registered as named utilities so that they can be72 defined also in third-party packages and be looked up by other73 components like theme-selectors.74 """75 description = schema.TextLine(76 title = u'Description',77 description = u'Short description of the theme for choice fields',78 required = False,79 )80 81 def getResources():82 """Get resources of the theme.83 84 Deliver a list of resources that must be included in a web page to85 let it be rendered in the theme's style.86 87 A resource is normally defined in the `resources` module. If a88 theme needs several of them which normally do not depend on89 each other then all these resources can be returned by this90 method. Normally, you will only return one resource.91 92 These resources will (if the theme is selected) be `need()`-ed93 by the `update()` method of the general site layout.94 """95 96 61 class ICaptchaRequest(Interface): 97 62 """A set of data required to verify captcha solutions. -
main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
r10709 r11254 26 26 from zope.i18n import translate 27 27 from zope.i18nmessageid import Message 28 from hurry.resource import mode29 28 from megrok.layout import Page, Layout, Form, EditForm, DisplayForm, AddForm 30 29 from z3c.flashmessage.interfaces import IMessageSource, IMessageReceiver … … 37 36 from waeup.kofa.utils.helpers import to_timezone 38 37 from waeup.kofa.browser.interfaces import ( 39 ITheme, IStudentNavigationBase, IApplicantBase) 40 from waeup.kofa.browser.theming import get_all_themes, KofaThemeBase 38 IStudentNavigationBase, IApplicantBase) 41 39 from waeup.kofa.authentication import get_principal_role_manager 42 40 … … 74 72 super(KofaAction, self).__init__(label, **options) 75 73 self.style = style 74 if style == '': 75 self.style = 'default' 76 76 77 77 78 def render(self): … … 82 83 label = translate(self.label, context=self.form.request) 83 84 return ('<input type="submit" id="%s" name="%s" value="%s"' 84 ' class="btn %s"/>' %85 ' class="btn btn-%s"/>' % 85 86 (self.__name__, self.__name__, escape(label, quote=True), 86 87 self.style)) … … 96 97 97 98 msg = _('\'Are you sure?\'') 99 100 def __init__(self, label, style='', **options): 101 super(JSAction, self).__init__(label, **options) 102 self.style = style 103 if style == '': 104 self.style = 'default' 98 105 99 106 def render(self): … … 105 112 msg = translate(self.msg, context=self.form.request) 106 113 return ('<input type="submit" id="%s" name="%s" value="%s"' 107 ' class="btn" onclick="return confirmPost(%s)" />' % 108 (self.__name__, self.__name__, escape(label, quote=True), msg) 114 ' class="btn btn-%s" onclick="return window.confirm(%s)" />' % 115 (self.__name__, self.__name__, escape(label, quote=True), 116 self.style, msg) 109 117 ) 110 118 … … 151 159 return self.url(site, name) 152 160 153 def flash(self, message, type=' alert-message warning'):161 def flash(self, message, type='success'): 154 162 """Send a short message to the user. 155 163 """ 164 cssClass = 'alert alert-%s' % type 156 165 source = queryUtility(IMessageSource, name='session') 157 166 if source is None: 158 167 return None 159 source.send(message, type)168 source.send(message, cssClass) 160 169 return True 161 170 … … 174 183 # Width parameters will be overridden by Bootstrap 175 184 # so we have to set the css class 176 if self.widgets.get('subject'):177 self.widgets['subject'].cssClass = 'span9'178 185 if self.widgets.get('body'): 179 186 self.widgets['body'].height = 10 180 if self.widgets.get('body'):181 self.widgets['body'].cssClass = 'span9'182 187 183 188 class KofaPage(UtilityView,Page): … … 202 207 super(KofaEditFormPage,self).setUpWidgets(ignore_request) 203 208 for widget in self.widgets: 204 if widget.__class__.__name__ == 'TextWidget':205 widget.cssClass = 'span8'206 elif widget.__class__.__name__ == 'IntWidget':207 widget.cssClass = 'span2'208 209 if 'address' in widget.name or \ 209 210 'comment' in widget.name or \ 210 211 'notice' in widget.name: 211 widget.cssClass = 'span8'212 212 widget.height = 6 213 if self.widgets.get('title'):214 self.widgets['title'].cssClass = 'span12'215 if self.widgets.get('frontpage'):216 self.widgets['frontpage'].cssClass = 'span12'217 if self.widgets.get('phone'):218 self.widgets['phone'].cssClass = 'span4'219 213 if self.widgets.get('transcript_comment'): 220 self.widgets['transcript_comment'].cssClass = 'span12'221 214 self.widgets['transcript_comment'].height = 12 222 215 if self.widgets.get('jamb_subjects'): 223 self.widgets['jamb_subjects'].cssClass = 'span8'224 216 self.widgets['jamb_subjects'].height = 6 225 if self.widgets.get('description'):226 self.widgets['description'].cssClass = 'span12'227 217 228 218 class KofaAddFormPage(UtilityView,AddForm): … … 238 228 239 229 #: An instance of the default theme to use for the site layout 240 default_theme = KofaThemeBase()241 230 stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt') 242 231 studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt') … … 318 307 return None 319 308 320 def update(self):321 """Include the resources required by the chosen skin/theme.322 323 University instances provide a 'skin' attribute, that should324 hold the internal name of a theme.325 326 A theme in the waeup.kofa sense consists of a list of327 CSS/JavaScript resources defined in the328 :mod:`waeup.kofa.browser.resources` module.329 330 If the context University object has no such attribute or the331 set value is not a valid theme name, we pick 'gray waeup332 theme' as default.333 """334 mode('minified')335 theme_name = getattr(grok.getSite()['configuration'], 'skin', '')336 theme = queryUtility(ITheme, name=theme_name,337 default=self.default_theme)338 for resource in theme.getResources():339 resource.need()340 return341 342 309 def render(self): 343 310 if self.isStudent() or self.isApplicant() or not self.isAuthenticated(): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r10685 r11254 51 51 ICaptchaManager, IChangePassword) 52 52 from waeup.kofa.browser.layout import jsaction, action, UtilityView 53 from waeup.kofa.browser.resources import (54 warning, tabs, datatable)55 53 from waeup.kofa.interfaces import MessageFactory as _ 56 54 from waeup.kofa.interfaces import( … … 85 83 user = view.request.form.get('user', None) 86 84 if user is None or localrole is None: 87 view.flash('No user selected.' )88 view.redirect(view.url(view.context, '@@manage')+' ?tab%s' % tab)85 view.flash('No user selected.', type='danger') 86 view.redirect(view.url(view.context, '@@manage')+'#tab%s' % tab) 89 87 return 90 88 role_manager = IPrincipalRoleManager(view.context) … … 94 92 grok.getSite().logger.info( 95 93 '%s - added: %s|%s' % (ob_class, user, localrole)) 96 view.redirect(view.url(view.context, u'@@manage')+' ?tab%s' % tab)94 view.redirect(view.url(view.context, u'@@manage')+'#tab%s' % tab) 97 95 return 98 96 … … 100 98 child_ids = view.request.form.get('role_id', None) 101 99 if child_ids is None: 102 view.flash(_('No local role selected.') )103 view.redirect(view.url(view.context, '@@manage')+' ?tab%s' % tab)100 view.flash(_('No local role selected.'), type='danger') 101 view.redirect(view.url(view.context, '@@manage')+'#tab%s' % tab) 104 102 return 105 103 if not isinstance(child_ids, list): … … 117 115 except: 118 116 view.flash('Could not remove %s: %s: %s' % ( 119 child_id, sys.exc_info()[0], sys.exc_info()[1])) 117 child_id, sys.exc_info()[0], sys.exc_info()[1]), 118 type='danger') 120 119 if len(deleted): 121 120 view.flash( … … 125 124 grok.getSite().logger.info( 126 125 '%s - removed: %s' % (ob_class, ', '.join(deleted))) 127 view.redirect(view.url(view.context, u'@@manage')+' ?tab%s' % tab)126 view.redirect(view.url(view.context, u'@@manage')+'#tab%s' % tab) 128 127 return 129 128 … … 133 132 child_id = form['val_id'] 134 133 else: 135 view.flash(_('No item selected.') )134 view.flash(_('No item selected.'), type='danger') 136 135 if tab: 137 view.redirect(view.url(view.context, redirect)+' ?tab%s' % tab)136 view.redirect(view.url(view.context, redirect)+'#tab%s' % tab) 138 137 else: 139 138 view.redirect(view.url(view.context, redirect)) … … 152 151 except: 153 152 view.flash('Could not delete %s: %s: %s' % ( 154 id, sys.exc_info()[0], sys.exc_info()[1]) )153 id, sys.exc_info()[0], sys.exc_info()[1]), type='danger') 155 154 if len(deleted): 156 155 view.flash(_('Successfully removed: ${a}', … … 160 159 '%s - removed: %s' % (ob_class, ', '.join(deleted))) 161 160 if tab: 162 view.redirect(view.url(view.context, redirect)+' ?tab%s' % tab)161 view.redirect(view.url(view.context, redirect)+'#tab%s' % tab) 163 162 else: 164 163 view.redirect(view.url(view.context, redirect)) … … 282 281 self.request.principal.id) 283 282 self.flash( 284 _('Your personal data record is outdated. Please update.')) 283 _('Your personal data record is outdated. Please update.'), 284 type='warning') 285 285 self.redirect(self.application_url() + rel_link) 286 286 return … … 316 316 now < temp_password_dict.get('timestamp', now) + delta: 317 317 self.flash( 318 _('Your account has been temporarily deactivated.')) 318 _('Your account has been temporarily deactivated.'), 319 type='warning') 319 320 return 320 321 # Now we know that the student is suspended. 321 322 comment = self._comment(student) 322 323 if comment: 323 self.flash(comment )324 self.flash(comment, type='warning') 324 325 else: 325 self.flash(_('Your account has been deactivated.')) 326 self.flash(_('Your account has been deactivated.'), 327 type='warning') 326 328 return 327 self.flash(_('You entered invalid credentials.') )329 self.flash(_('You entered invalid credentials.'), type='danger') 328 330 return 329 331 … … 441 443 self.flash(_('Your message has been sent.')) 442 444 else: 443 self.flash(_('A smtp server error occurred.') )445 self.flash(_('A smtp server error occurred.'), type='danger') 444 446 return 445 447 … … 528 530 529 531 def update(self, userid=None, adduser=None, manage=None, delete=None): 530 datatable.need()531 532 if manage is not None and userid is not None: 532 533 self.redirect(self.url(userid) + '/@@manage') … … 588 589 errors = validator.validate_password(password, password_ctl) 589 590 if errors: 590 self.flash( ' '.join(errors) )591 self.flash( ' '.join(errors), type='danger') 591 592 return 592 593 try: … … 601 602 except KeyError: 602 603 self.status = self.flash('The userid chosen already exists ' 603 'in the database.' )604 'in the database.', type='danger') 604 605 return 605 606 self.redirect(self.url(self.context)) … … 632 633 errors = validator.validate_password(password, password_ctl) 633 634 if errors: 634 self.flash( ' '.join(errors) )635 self.flash( ' '.join(errors), type='danger') 635 636 return 636 637 changed_fields = self.applyData(self.context, **data) … … 744 745 745 746 def update(self, *args, **kw): 746 datatable.need()747 747 form = self.request.form 748 748 self.hitlist = [] … … 769 769 form_fields = grok.AutoFields(IConfigurationContainer) 770 770 form_fields['frontpage'].custom_widget = HTMLDisplayWidget 771 771 772 772 773 class ConfigurationContainerManageFormPage(KofaEditFormPage): … … 784 785 _('Add session configuration'), 785 786 _('Remove selected')] 786 form_fields = grok.AutoFields(IConfigurationContainer).omit('frontpage_dict') 787 788 def update(self): 789 tabs.need() 790 self.tab1 = self.tab2 = '' 791 qs = self.request.get('QUERY_STRING', '') 792 if not qs: 793 qs = 'tab1' 794 setattr(self, qs, 'active') 795 datatable.need() 796 warning.need() 797 return super(ConfigurationContainerManageFormPage, self).update() 787 form_fields = grok.AutoFields(IConfigurationContainer).omit( 788 'frontpage_dict') 798 789 799 790 def _frontpage(self): … … 857 848 ob_class, sessionconfiguration.academic_session)) 858 849 except KeyError: 859 self.flash(_('The session chosen already exists.') )860 return 861 self.redirect(self.url(self.context, '@@index')+' ?tab2')850 self.flash(_('The session chosen already exists.'), type='danger') 851 return 852 self.redirect(self.url(self.context, '@@index')+'#tab2') 862 853 return 863 854 864 855 @action(_('Cancel'), validator=NullValidator) 865 856 def cancel(self): 866 self.redirect(self.url(self.context, '@@index')+' ?tab2')857 self.redirect(self.url(self.context, '@@index')+'#tab2') 867 858 return 868 859 … … 885 876 def save(self, **data): 886 877 msave(self, **data) 887 self.redirect(self.url(self.context.__parent__, '@@index')+' ?tab2')878 self.redirect(self.url(self.context.__parent__, '@@index')+'#tab2') 888 879 return 889 880 890 881 @action(_('Cancel'), validator=NullValidator) 891 882 def cancel(self): 892 self.redirect(self.url(self.context.__parent__, '@@index')+' ?tab2')883 self.redirect(self.url(self.context.__parent__, '@@index')+'#tab2') 893 884 return 894 885 … … 904 895 pnav = 0 905 896 906 def update(self):907 datatable.need()908 warning.need()909 return super(DatacenterPage, self).update()910 911 897 @jsaction(_('Remove selected')) 912 898 def delFiles(self, **data): … … 915 901 child_id = form['val_id'] 916 902 else: 917 self.flash(_('No item selected.') )903 self.flash(_('No item selected.'), type='danger') 918 904 return 919 905 if not isinstance(child_id, list): … … 926 912 deleted.append(id) 927 913 except OSError: 928 self.flash(_('OSError: The file could not be deleted.')) 914 self.flash(_('OSError: The file could not be deleted.'), 915 type='danger') 929 916 return 930 917 if len(deleted): … … 942 929 label = _(u'Processed Files') 943 930 pnav = 0 944 945 def update(self): 946 datatable.need() 931 cancel_button =_('Back to Data Center') 932 933 def update(self, CANCEL=None): 934 if CANCEL is not None: 935 self.redirect(self.url(self.context)) 936 return 947 937 return super(DatacenterFinishedPage, self).update() 948 938 … … 955 945 max_files = 20 956 946 upload_button =_(u'Upload') 957 cancel_button =_(u' Cancel')947 cancel_button =_(u'Back to Data Center') 958 948 959 949 def getPreviewHeader(self): … … 1027 1017 _('All import managers have been notified by email.')) 1028 1018 else: 1029 self.flash(_('An smtp server error occurred.') )1019 self.flash(_('An smtp server error occurred.'), type='danger') 1030 1020 return 1031 1021 … … 1035 1025 if number_of_pendings > self.max_files: 1036 1026 self.flash( 1037 _('Maximum number of files in the data center exceeded.')) 1027 _('Maximum number of files in the data center exceeded.'), 1028 type='danger') 1038 1029 self.redirect(self.url(self.context)) 1039 1030 return … … 1046 1037 filename = uploadfile.filename 1047 1038 #if 'pending' in filename: 1048 # self.flash(_("You can't re-upload pending data files.") )1039 # self.flash(_("You can't re-upload pending data files."), type='danger') 1049 1040 # return 1050 1041 if not filename.endswith('.csv'): 1051 self.flash(_("Only csv files are allowed.") )1042 self.flash(_("Only csv files are allowed."), type='danger') 1052 1043 return 1053 1044 normalized_filename = self.getNormalizedFileName(filename) … … 1057 1048 self.context.storage, 'unfinished', normalized_filename) 1058 1049 if os.path.exists(finished_file) or os.path.exists(unfinished_file): 1059 self.flash(_("File with same name was uploaded earlier.")) 1050 self.flash(_("File with same name was uploaded earlier."), 1051 type='danger') 1060 1052 return 1061 1053 target = os.path.join(self.context.storage, normalized_filename) … … 1071 1063 "has invalid CSV format. " 1072 1064 "First problematic line detected: line %s. " 1073 "Please replace." % invalid_line) )1065 "Please replace." % invalid_line), type='danger') 1074 1066 logger.info('%s - invalid file uploaded: %s' % 1075 1067 (ob_class, target)) … … 1083 1075 1084 1076 except IOError: 1085 self.flash('Error while uploading file. Please retry.' )1086 self.flash('I/O error: %s' % sys.exc_info()[1] )1077 self.flash('Error while uploading file. Please retry.', type='danger') 1078 self.flash('I/O error: %s' % sys.exc_info()[1], type='danger') 1087 1079 return 1088 1080 self.redirect(self.url(self.context)) … … 1181 1173 label = _(u'Process CSV file') 1182 1174 pnav = 0 1183 cancel_button =_(u' Cancel')1175 cancel_button =_(u'Back to Data Center') 1184 1176 1185 1177 def getFiles(self): … … 1193 1185 def update(self, filename=None, select=None, cancel=None): 1194 1186 if cancel is not None: 1195 self.flash(_('Import aborted.'))1196 1187 self.redirect(self.url(self.context)) 1197 1188 return … … 1277 1268 return 1278 1269 if cancel is not None: 1279 self.flash(_('Import aborted.') )1270 self.flash(_('Import aborted.'), type='warning') 1280 1271 self.redirect(self.url(self.context)) 1281 1272 return … … 1289 1280 if self.importer and 'update' in self.importer: 1290 1281 if self.mode != 'update': 1291 self.flash(_('Update mode only!') )1282 self.flash(_('Update mode only!'), type='warning') 1292 1283 self.mode_locked = True 1293 1284 self.mode = 'update' … … 1303 1294 else: 1304 1295 self.reader = () 1305 self.flash(warnings )1296 self.flash(warnings, type='warning') 1306 1297 1307 1298 class DatacenterImportStep3(KofaPage): … … 1388 1379 1389 1380 def update(self, headerfield=None, back2=None, cancel=None, proceed=None): 1390 datatable.need()1391 1381 session = ISession(self.request)['waeup.kofa'] 1392 1382 self.filename = session.get('import_filename', None) … … 1401 1391 return 1402 1392 if cancel is not None: 1403 self.flash(_('Import aborted.') )1393 self.flash(_('Import aborted.'), type='warning') 1404 1394 self.redirect(self.url(self.context)) 1405 1395 return … … 1416 1406 warnings = self.getWarnings() 1417 1407 if warnings: 1418 self.flash(warnings )1408 self.flash(warnings, type='warning') 1419 1409 1420 1410 class DatacenterImportStep4(KofaPage): … … 1478 1468 if self.warn_num: 1479 1469 self.flash(_('Processing of ${a} rows failed.', 1480 mapping = {'a':self.warn_num}) )1470 mapping = {'a':self.warn_num}), type='warning') 1481 1471 self.flash(_('Successfully processed ${a} rows.', 1482 1472 mapping = {'a':linenum - self.warn_num})) … … 1506 1496 pnav = 0 1507 1497 search_button = _('Search') 1508 back_button = _('Back ')1498 back_button = _('Back to Data Center') 1509 1499 placeholder = _('Enter a regular expression here...') 1510 1500 … … 1516 1506 self.flash( 1517 1507 _('Log files can only be searched ' + 1518 'on Unix-based operating systems.') )1508 'on Unix-based operating systems.'), type='danger') 1519 1509 self.redirect(self.url(self.context, '@@logs')) 1520 1510 return … … 1530 1520 self.context.queryLogfiles(logname, query)) 1531 1521 except ValueError: 1532 self.flash(_('Invalid search expression.') )1522 self.flash(_('Invalid search expression.'), type='danger') 1533 1523 return 1534 1524 if not self.result: 1535 self.flash(_('No search results found.') )1525 self.flash(_('No search results found.'), type='warning') 1536 1526 return 1537 1527 … … 1545 1535 save_button =_(u'Save') 1546 1536 reset_button =_(u'Reset') 1547 cancel_button =_(u' Cancel')1537 cancel_button =_(u'Back to Data Center') 1548 1538 1549 1539 def update(self, newpath=None, move=False, overwrite=False, … … 1562 1552 for name in not_copied: 1563 1553 self.flash(_('File already existed (not copied): ${a}', 1564 mapping = {'a':name}) )1554 mapping = {'a':name}), type='danger') 1565 1555 except: 1566 self.flash(_('Given storage path cannot be used. '))1567 self.flash(_('Error: ${a}', mapping = {'a':sys.exc_info()[1]}))1556 self.flash(_('Given storage path cannot be used. ${a}', 1557 mapping = {'a':sys.exc_info()[1]}), type='danger') 1568 1558 return 1569 1559 if newpath: … … 1583 1573 pnav = 0 1584 1574 export_button = _(u'Create CSV file') 1575 cancel_button =_(u'Back to Data Center') 1585 1576 1586 1577 def getExporters(self): … … 1594 1585 return sorted(title_name_tuples) 1595 1586 1596 def update(self, CREATE=None, DISCARD=None, exporter=None, job_id=None): 1587 def update(self, CREATE=None, DISCARD=None, exporter=None, 1588 job_id=None, CANCEL=None): 1589 if CANCEL is not None: 1590 self.redirect(self.url(self.context)) 1591 return 1597 1592 if CREATE: 1598 1593 job_id = self.context.start_export_job( … … 1718 1713 return _('Manage academic section') 1719 1714 1720 def update(self):1721 warning.need()1722 return super(FacultiesContainerManageFormPage, self).update()1723 1724 1715 @jsaction(_('Remove selected')) 1725 1716 def delFaculties(self, **data): 1726 1717 if not checkPermission('waeup.managePortal', self.context): 1727 self.flash(_('You are not allowed to remove entire faculties.')) 1718 self.flash(_('You are not allowed to remove entire faculties.'), 1719 type='warning') 1728 1720 return 1729 1721 delSubobjects(self, redirect='@@manage', tab='1') … … 1758 1750 self.context.addFaculty(faculty) 1759 1751 except KeyError: 1760 self.flash(_('The faculty code chosen already exists.')) 1752 self.flash(_('The faculty code chosen already exists.'), 1753 type='danger') 1761 1754 return 1762 1755 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1763 1756 self.context.__parent__.logger.info( 1764 1757 '%s - added: %s' % (ob_class, faculty.code)) 1765 self.redirect(self.url(self.context, u'@@manage')+' ?tab1')1758 self.redirect(self.url(self.context, u'@@manage')+'#tab1') 1766 1759 return 1767 1760 … … 1806 1799 return _('Manage faculty') 1807 1800 1808 def update(self):1809 tabs.need()1810 self.tab1 = self.tab2 = self.tab3 = ''1811 qs = self.request.get('QUERY_STRING', '')1812 if not qs:1813 qs = 'tab1'1814 setattr(self, qs, 'active')1815 warning.need()1816 datatable.need()1817 return super(FacultyManageFormPage, self).update()1818 1819 1801 @jsaction(_('Remove selected')) 1820 1802 def delDepartments(self, **data): 1821 1803 if not checkPermission('waeup.managePortal', self.context): 1822 self.flash(_('You are not allowed to remove entire departments.')) 1804 self.flash(_('You are not allowed to remove entire departments.'), 1805 type='danger') 1823 1806 return 1824 1807 delSubobjects(self, redirect='@@manage', tab='2') … … 1841 1824 @action(_('Add local role'), validator=NullValidator) 1842 1825 def addLocalRole(self, **data): 1843 return add_local_role(self, '3',**data)1826 return add_local_role(self,3,**data) 1844 1827 1845 1828 @action(_('Remove selected local roles')) … … 1878 1861 1879 1862 def update(self, *args, **kw): 1880 datatable.need()1881 1863 form = self.request.form 1882 1864 self.hitlist = [] … … 1889 1871 else: 1890 1872 if 'search' in form: 1891 self.flash(_('Empty search string') )1873 self.flash(_('Empty search string'), type='warning') 1892 1874 return 1893 1875 self.hitlist = self._find_students(query=self.searchterm, 1894 1876 searchtype=self.searchtype, view=self) 1895 1877 if not self.hitlist: 1896 self.flash(_('No student found.') )1878 self.flash(_('No student found.'), type='warning') 1897 1879 return 1898 1880 … … 1914 1896 self.context.addDepartment(department) 1915 1897 except KeyError: 1916 self.flash(_('The code chosen already exists in this faculty.')) 1898 self.flash(_('The code chosen already exists in this faculty.'), 1899 type='danger') 1917 1900 return 1918 1901 self.status = self.flash( … … 1921 1904 self.context.__parent__.__parent__.logger.info( 1922 1905 '%s - added: %s' % (ob_class, data['code'])) 1923 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1906 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1924 1907 return 1925 1908 … … 1942 1925 1943 1926 def update(self): 1944 tabs.need()1945 datatable.need()1946 1927 super(DepartmentPage, self).update() 1947 1928 return … … 1997 1978 yield(dict(url=url, name=key, container=val)) 1998 1979 1999 def update(self):2000 tabs.need()2001 self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''2002 qs = self.request.get('QUERY_STRING', '')2003 if not qs:2004 qs = 'tab1'2005 setattr(self, qs, 'active')2006 warning.need()2007 datatable.need()2008 super(DepartmentManageFormPage, self).update()2009 return2010 2011 1980 @action(_('Save'), style='primary') 2012 1981 def save(self, **data): … … 2022 1991 def delCertificates(self, **data): 2023 1992 if not checkPermission('waeup.managePortal', self.context): 2024 self.flash(_('You are not allowed to remove certificates.')) 1993 self.flash(_('You are not allowed to remove certificates.'), 1994 type='warning') 2025 1995 return 2026 1996 delSubobjects( … … 2045 2015 @action(_('Add local role'), validator=NullValidator) 2046 2016 def addLocalRole(self, **data): 2047 return add_local_role(self, 4,**data)2017 return add_local_role(self,4,**data) 2048 2018 2049 2019 @action(_('Remove selected local roles')) … … 2076 2046 message += '<a href="%s">%s</a>' % ( 2077 2047 self.url(entry), getattr(entry, '__name__', u'Unnamed')) 2078 self.flash(message )2048 self.flash(message, type='warning') 2079 2049 self.redirect(self.url(self.context, u'@@addcourse')) 2080 2050 return … … 2084 2054 self.context.__parent__.__parent__.__parent__.logger.info( 2085 2055 '%s - added: %s' % (ob_class, data['code'])) 2086 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')2056 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 2087 2057 return 2088 2058 … … 2117 2087 message += '<a href="%s">%s</a>' % ( 2118 2088 self.url(entry), getattr(entry, '__name__', u'Unnamed')) 2119 self.flash(message )2089 self.flash(message, type='warning') 2120 2090 self.redirect(self.url(self.context, u'@@addcertificate')) 2121 2091 return … … 2125 2095 self.context.__parent__.__parent__.__parent__.logger.info( 2126 2096 '%s - added: %s' % (ob_class, data['code'])) 2127 self.redirect(self.url(self.context, u'@@manage')+' ?tab3')2097 self.redirect(self.url(self.context, u'@@manage')+'#tab3') 2128 2098 return 2129 2099 … … 2165 2135 form_fields = grok.AutoFields(ICourse).omit('code') 2166 2136 2167 def update(self):2168 tabs.need()2169 self.tab1 = self.tab2 = ''2170 qs = self.request.get('QUERY_STRING', '')2171 if not qs:2172 qs = 'tab1'2173 setattr(self, qs, 'active')2174 warning.need()2175 datatable.need()2176 return super(CourseManageFormPage, self).update()2177 2178 2137 @action(_('Save'), style='primary') 2179 2138 def save(self, **data): … … 2187 2146 @action(_('Add local role'), validator=NullValidator) 2188 2147 def addLocalRole(self, **data): 2189 return add_local_role(self, 2,**data)2148 return add_local_role(self,2,**data) 2190 2149 2191 2150 @action(_('Remove selected local roles')) … … 2211 2170 2212 2171 def update(self): 2213 datatable.need()2214 2172 return super(CertificatePage, self).update() 2215 2173 … … 2238 2196 return _('Manage certificate') 2239 2197 2240 def update(self):2241 tabs.need()2242 self.tab1 = self.tab2 = self.tab3 = ''2243 qs = self.request.get('QUERY_STRING', '')2244 if not qs:2245 qs = 'tab1'2246 setattr(self, qs, 'active')2247 warning.need()2248 datatable.need()2249 return super(CertificateManageFormPage, self).update()2250 2251 2198 @action(_('Save'), style='primary') 2252 2199 def save(self, **data): … … 2270 2217 @action(_('Add local role'), validator=NullValidator) 2271 2218 def addLocalRole(self, **data): 2272 return add_local_role(self, 3,**data)2219 return add_local_role(self,3,**data) 2273 2220 2274 2221 @action(_('Remove selected local roles')) … … 2293 2240 except KeyError: 2294 2241 self.status = self.flash(_('The chosen certificate course is already ' 2295 'part of this certificate.') )2242 'part of this certificate.'), type='warning') 2296 2243 return 2297 2244 self.status = self.flash( … … 2301 2248 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 2302 2249 grok.getSite().logger.info('%s - added: %s' % (ob_class, code)) 2303 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')2250 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 2304 2251 return 2305 2252 … … 2421 2368 user = self._searchUser(identifier, email) 2422 2369 if user is None: 2423 self.flash(_('No record found.') )2370 self.flash(_('No record found.'), type='warning') 2424 2371 return 2425 2372 # Change password … … 2442 2389 'has been sent to ${a}.', mapping = {'a':email})) 2443 2390 else: 2444 self.flash(_('An smtp server error occurred.') )2391 self.flash(_('An smtp server error occurred.'), type='danger') 2445 2392 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 2446 2393 self.context.logger.info( -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/actionbutton.pt
r9145 r11254 1 <a class="btn actionbar" tal:condition="viewlet/target_url"1 <a class="btn btn-default" tal:condition="viewlet/target_url" 2 2 tal:attributes="href viewlet/target_url; onclick viewlet/onclick"> 3 3 <img src="" alt="edit" -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/breadcrumbs.pt
r7459 r11254 1 <span tal:repeat="item viewlet/getEntries"> 2 <li> 3 <a href="#" tal:attributes="href item/url"> 4 <span tal:content="item/title">Entry</span> 5 </a> 6 <span tal:condition="not: repeat/item/end" class="divider">/</span> 7 </li> 8 </span> 1 <li tal:repeat="item viewlet/getEntries"> 2 <a href="#" tal:attributes="href item/url"> 3 <span tal:replace="item/title">Entry</span> 4 </a> 5 </li> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatemanagepage.pt
r9320 r11254 2 2 enctype="multipart/form-data" i18n:domain="waeup.kofa"> 3 3 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-2" i18n:translate="">Certificate Courses</a></li> 7 <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li> 4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a> 7 </li> 8 <li> 9 <a href="#tab2" data-toggle="tab" 10 i18n:translate="">Certificate Courses</a> 11 </li> 12 <li> 13 <a href="#tab3" data-toggle="tab" i18n:translate="">Local Roles</a> 14 </li> 8 15 </ul> 9 16 10 17 <div class="tab-content"> 11 <div id="tab-1" tal:attributes="class view/tab1"> 12 <table class="form-table"> 13 <tbody> 14 <tal:widgets content="structure provider:widgets" /> 15 </tbody> 16 </table> 17 <div tal:condition="view/availableActions"> 18 <span tal:repeat="action view/actions" 19 tal:omit-tag=""> 20 <input tal:condition="python:action.label in view.taboneactions" 21 tal:replace="structure action/render"/> 22 </span> 18 <div id="tab1" class="active tab-pane"> 19 <table class="form-table"> 20 <tbody> 21 <tal:widgets content="structure provider:widgets" /> 22 </tbody> 23 </table> 24 <div tal:condition="view/availableActions"> 25 <span tal:repeat="action view/actions" 26 tal:omit-tag=""> 27 <input tal:condition="python:action.label in view.taboneactions" 28 tal:replace="structure action/render"/> 29 </span> 30 </div> 23 31 </div> 24 </div> 25 <div id="tab-2" tal:attributes="class view/tab2"> 26 <h3> 27 <span tal:content="context/__name__">Code</span> 28 <span i18n:domain="waeup.kofa" i18n:translate="">Courses</span> 29 </h3> 30 <table class="display dataTableManage"> 32 <div id="tab2" class="tab-pane"> 33 <br /> 34 <table class="kofa-data-table dataTableManage"> 31 35 <thead> 32 36 <tr> … … 41 45 </thead> 42 46 <tbody> 43 <tr tal:repeat="cc context/values" class="gradeC">44 47 <tr tal:repeat="cc context/values"> 48 <td> 45 49 <input type="checkbox" name="val_id" 46 50 tal:attributes="value cc/__name__" /> 47 51 </td> 48 52 <td> 49 53 <span tal:content="cc/level"> 50 54 LEVEL 51 55 </span> 52 56 </td> … … 54 58 <td> 55 59 <a tal:attributes="href python: view.url(cc)" 56 60 tal:content="cc/__name__"> 57 61 REFERRER CODE 58 62 </a> … … 60 64 <td> 61 65 <a tal:attributes="href python:view.url(cc.course)" 62 66 tal:content="cc/course/code"> 63 67 COURSE CODE 64 68 </a> … … 66 70 <td> 67 71 <span tal:content="cc/course/title"> 68 72 COURSE TITLE 69 73 </span> 70 74 </td> 71 75 <td> 72 76 <span tal:content="cc/mandatory"> 73 77 REQUIRED 74 78 </span> 75 79 </td> … … 85 89 </div> 86 90 </div> 87 <div id="tab-3" tal:attributes="class view/tab3"> <br /> 88 <table class="display dataTableManage"> 91 <div id="tab3" class="tab-pane"> 92 <br /> 93 <table class="kofa-data-table dataTableManage"> 89 94 <thead> 90 95 <tr> … … 100 105 </thead> 101 106 <tbody> 102 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>103 104 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>107 <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td> 108 <input type="checkbox" name="role_id" 109 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> 105 110 <td tal:content="entry/user_name"> USERNAME </td> 106 111 <td tal:content="entry/user_title"> USERTITLE </td> … … 112 117 <span tal:repeat="action view/actions" tal:omit-tag=""> 113 118 <input tal:condition="python:action.label in view.tabthreeactions1" 114 tal:replace="structure action/render"/>119 tal:replace="structure action/render"/> 115 120 </span> 116 121 </div><br /><br /> 117 <table class="form-table"> 118 <tr> <td> 119 <select id="user" name="user"> 120 <option tal:repeat="user view/getUsers" 121 tal:attributes="value user/name"> 122 <span tal:replace="user/val/title">USERTITLE 123 </span> 124 </option> 125 </select> </td> <td> 126 <select id="local_role" name="local_role"> 127 <option tal:repeat="localrole view/getLocalRoles" 128 tal:attributes="value localrole/name"> 129 <span tal:replace="localrole/title">LOCALROLETITLE 130 </span> 131 </option> 132 </select> </td> <td> 133 <div tal:condition="view/availableActions"> 134 <span tal:repeat="action view/actions" tal:omit-tag=""> 135 <input tal:condition="python:action.label in view.tabthreeactions2" 136 tal:replace="structure action/render"/> 137 </span> 138 </div> </td> 139 </tr> 140 </table> 122 <div class="form-inline"> 123 <br /> 124 <div class="form-group"> 125 <select id="user" name="user" class="form-control"> 126 <option tal:repeat="user view/getUsers" 127 tal:attributes="value user/name"> 128 <span tal:replace="user/val/title">USERTITLE 129 </span> 130 </option> 131 </select> 132 </div> 133 <div class="form-group"> 134 <select id="local_role" name="local_role" class="form-control"> 135 <option tal:repeat="localrole view/getLocalRoles" 136 tal:attributes="value localrole/name"> 137 <span tal:replace="localrole/title">LOCALROLETITLE 138 </span> 139 </option> 140 </select> 141 </div> 142 <div class="form-group"> 143 <div tal:condition="view/availableActions"> 144 <span tal:repeat="action view/actions" tal:omit-tag=""> 145 <input tal:condition="python:action.label in view.tabthreeactions2" 146 tal:replace="structure action/render"/> 147 </span> 148 </div> 149 </div> 150 </div> 141 151 </div> 142 152 </div> 143 153 </form> 144 145 146 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatepage.pt
r9320 r11254 23 23 </h3> 24 24 <br /> 25 <table i18n:domain="waeup.kofa" class=" displaydataTable">25 <table i18n:domain="waeup.kofa" class="kofa-data-table dataTable"> 26 26 <thead> 27 27 <tr> … … 35 35 </thead> 36 36 <tbody> 37 <tr tal:repeat="cc context/values" class="gradeC">37 <tr tal:repeat="cc context/values"> 38 38 <td> 39 39 <span tal:content="cc/level"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/configurationmanagepage.pt
r7811 r11254 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data" i18n:domain="waeup.kofa"> 3 <ul class="tabs" data-tabs="tabs"> 4 <li tal:attributes="class view/tab1"> 5 <a href="#tab-1" i18n:translate="">Site Settings</a> 6 </li> 7 <li tal:attributes="class view/tab2"> 8 <a href="#tab-2" i18n:translate="">Session Configurations</a> 9 </li> 10 </ul> 11 <div class="tab-content"> 12 <div id="tab-1" tal:attributes="class view/tab1"> 2 enctype="multipart/form-data" i18n:domain="waeup.kofa"> 3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 <li class="active"> 5 <a href="#tab1" data-toggle="tab" 6 i18n:translate="">Site Settings</a> 7 </li> 8 <li> 9 <a href="#tab2" data-toggle="tab" 10 i18n:translate="">Session Configurations</a> 11 </li> 12 </ul> 13 <div class="tab-content"> 14 <div id="tab1" class="active tab-pane"> 13 15 <table class="form-table"> 14 16 <tbody> … … 23 25 </div> 24 26 </div> 25 <div id="tab-2" tal:attributes="class view/tab2"> <br /> 26 <table class="display dataTableManage"> 27 <div id="tab2" class="tab-pane"> 28 <br /> 29 <table class="kofa-data-table dataTableManage"> 27 30 <thead> 28 31 <tr> … … 34 37 </thead> 35 38 <tbody> 36 <tr tal:repeat="entry view/getSessionConfigurations" class="gradeC"> <td> 37 <input type="checkbox" name="val_id" tal:attributes="value entry/name" /> </td> <td> 38 <a href="" tal:attributes="href entry/url" tal:content="entry/title">Name</a> </td> 39 <tr tal:repeat="entry view/getSessionConfigurations"> 40 <td> 41 <input type="checkbox" name="val_id" 42 tal:attributes="value entry/name" /> </td> <td> 43 <a href="" tal:attributes="href entry/url" 44 tal:content="entry/title">Name</a> </td> 39 45 </tr> 40 46 </tbody> … … 43 49 <span tal:repeat="action view/actions" tal:omit-tag=""> 44 50 <input tal:condition="python:action.label in view.tabtwoactions" 45 tal:replace="structure action/render"/>51 tal:replace="structure action/render"/> 46 52 </span> 47 53 </div> 48 </div> 49 </div> 54 </div><!-- /tab2 --> 55 </div><!-- /tab-content --> 50 56 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/coursemanagepage.pt
r10540 r11254 2 2 enctype="multipart/form-data" i18n:domain="waeup.kofa"> 3 3 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-3" i18n:translate="">Local Roles</a></li> 4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a> 7 </li> 8 <li> 9 <a href="#tab3" data-toggle="tab" i18n:translate="">Local Roles</a> 10 </li> 7 11 </ul> 8 12 9 13 <div class="tab-content"> 10 <div id="tab-1" tal:attributes="class view/tab1"> 11 <table class="form-table"> 12 <tbody> 13 <tal:widgets content="structure provider:widgets" /> 14 </tbody> 15 </table> 16 <div tal:condition="view/availableActions"> 17 <span tal:repeat="action view/actions" 18 tal:omit-tag=""> 19 <input tal:condition="python:action.label in view.taboneactions" 20 tal:replace="structure action/render"/> 21 </span> 14 <div id="tab1" class="tab-pane active"> 15 <table class="form-table"> 16 <tbody> 17 <tal:widgets content="structure provider:widgets" /> 18 </tbody> 19 </table> 20 <div tal:condition="view/availableActions"> 21 <span tal:repeat="action view/actions" 22 tal:omit-tag=""> 23 <input tal:condition="python:action.label in view.taboneactions" 24 tal:replace="structure action/render"/> 25 </span> 26 </div> 22 27 </div> 23 < /div>24 <div id="tab-3" tal:attributes="class view/tab2"><br />25 <table class=" displaydataTableManage">28 <div id="tab3" class="tab-pane"> 29 <br /> 30 <table class="kofa-data-table dataTableManage"> 26 31 <thead> 27 32 <tr> … … 37 42 </thead> 38 43 <tbody> 39 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>40 41 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>44 <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td> 45 <input type="checkbox" name="role_id" 46 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> 42 47 <td tal:content="entry/user_name"> USERNAME </td> 43 48 <td tal:content="entry/user_title"> USERTITLE </td> … … 49 54 <span tal:repeat="action view/actions" tal:omit-tag=""> 50 55 <input tal:condition="python:action.label in view.tabtwoactions1" 51 tal:replace="structure action/render"/>56 tal:replace="structure action/render"/> 52 57 </span> 53 58 </div><br /><br /> 54 <table class="form-table"> 55 <tr> <td> 56 <select id="user" name="user"> 57 <option tal:repeat="user view/getUsers" 58 tal:attributes="value user/name"> 59 <span tal:replace="user/val/title">USERTITLE 60 </span> 61 </option> 62 </select> </td> <td> 63 <select id="local_role" name="local_role"> 64 <option tal:repeat="localrole view/getLocalRoles" 65 tal:attributes="value localrole/name"> 66 <span tal:replace="localrole/title">LOCALROLETITLE 67 </span> 68 </option> 69 </select> </td> <td> 70 <div tal:condition="view/availableActions"> 71 <span tal:repeat="action view/actions" tal:omit-tag=""> 72 <input tal:condition="python:action.label in view.tabtwoactions2" 73 tal:replace="structure action/render"/> 74 </span> 75 </div> </td> 76 </tr> 77 </table> 59 <div class="form-inline"> 60 <br /> 61 <div class="form-group"> 62 <select id="user" name="user" class="form-control"> 63 <option tal:repeat="user view/getUsers" 64 tal:attributes="value user/name"> 65 <span tal:replace="user/val/title">USERTITLE 66 </span> 67 </option> 68 </select> 69 </div> 70 <div class="form-group"> 71 <select id="local_role" name="local_role" class="form-control"> 72 <option tal:repeat="localrole view/getLocalRoles" 73 tal:attributes="value localrole/name"> 74 <span tal:replace="localrole/title">LOCALROLETITLE 75 </span> 76 </option> 77 </select> 78 </div> 79 <div class="form-group"> 80 <div tal:condition="view/availableActions"> 81 <span tal:repeat="action view/actions" tal:omit-tag=""> 82 <input tal:condition="python:action.label in view.tabtwoactions2" 83 tal:replace="structure action/render"/> 84 </span> 85 </div> 86 </div> 87 </div> 78 88 </div> 79 89 </div> 80 90 </form> 81 82 83 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterexportpage.pt
r9841 r11254 8 8 <br /> 9 9 10 <form method="POST" >10 <form method="POST" class="form-inline"> 11 11 <label for="exporter"> 12 12 Exporter (Data Type): 13 13 </label> 14 <div class=" input">15 <select name="exporter" >14 <div class="form-group"> 15 <select name="exporter" class="form-control half"> 16 16 <span tal:repeat="items view/getExporters" tal:omit-tag=""> 17 17 <option tal:define="name python: items[1]; title python: items[0]" … … 23 23 </select> 24 24 </div> 25 <br /> 26 <div class="input"> 27 <input i18n:translate="" type="submit" class="btn primary" 25 <div class="form-group"> 26 <input i18n:translate="" type="submit" class="btn btn-primary" 28 27 name="CREATE" tal:attributes="value view/export_button" /> 28 </div> 29 <div class="form-group"> 30 <input type="submit" name="CANCEL" class="btn btn-default" 31 tal:attributes="value view/cancel_button" /> 29 32 </div> 30 33 </form> … … 39 42 <br /><br /> 40 43 41 <table i18n:domain="waeup.kofa" >44 <table i18n:domain="waeup.kofa" class="table table-condensed table-hover"> 42 45 <thead> 43 46 <tr> … … 65 68 <span tal:replace="job/creator">CREATOR</span> 66 69 </td> 67 <td nowrap>70 <td> 68 71 <span tal:replace="job/start_time">DATETIME</span> 69 72 </td> … … 72 75 </td> 73 76 <td nowrap> 74 <a href="" class="btn small" i18n:translate=""77 <a href="" class="btn btn-default btn-xs" i18n:translate="" 75 78 tal:condition="job/show_refresh_button"> 76 <img tal:attributes="src static/actionicon_reload.png" />79 <img src="/static/img/actionicon_reload.png" /> 77 80 Reload 78 81 </a> 79 82 <form method="POST"> 80 <a href="" class="btn primary small"83 <a href="" class="btn btn-primary btn-xs" 81 84 tal:attributes="href job/download_url" 82 85 tal:condition="job/show_download_button"> 83 86 Download</a> 84 85 87 <input type="hidden" name="job_id" 86 88 tal:attributes="value job/job" /> 87 <input type="submit" class="btn small"89 <input type="submit" class="btn btn-default btn-xs" 88 90 name="DISCARD" value="Discard" 89 91 tal:condition="job/show_discard_button" /> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterfinishedpage.pt
r9592 r11254 4 4 imports. The files contain the imported datasets. 5 5 </p> 6 <table i18n:domain="waeup.kofa" class=" displaydataTableFiles">6 <table i18n:domain="waeup.kofa" class="kofa-data-table dataTableFiles"> 7 7 <thead> 8 8 <tr> … … 13 13 </thead> 14 14 <tbody> 15 <tr tal:repeat="file context/getFinishedFiles" class="gradeC">15 <tr tal:repeat="file context/getFinishedFiles"> 16 16 <td><a tal:attributes="href python: 'download?filename=' + file.rel_path" 17 17 tal:content="file/name">FILENAME</a></td> … … 21 21 </tbody> 22 22 </table> 23 <form method="POST"> 24 <input i18n:translate="" type="submit" class="btn btn-default" name="CANCEL" 25 tal:attributes="value view/cancel_button"/> 26 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport1page.pt
r7811 r11254 8 8 </p> 9 9 <form i18n:domain="waeup.kofa" method="POST"> 10 <table >10 <table class="table"> 11 11 <thead> 12 12 <th /> … … 20 20 <td> 21 21 <button i18n:translate="" 22 type="submit" name="select" class="btn primary"22 type="submit" name="select" class="btn btn-primary" 23 23 tal:attributes="value file/name">Select</button> 24 24 </td> … … 30 30 </tbody> 31 31 </table> 32 <input type="submit" name="cancel" class="btn "32 <input type="submit" name="cancel" class="btn btn-default" 33 33 tal:attributes="value view/cancel_button" /> 34 34 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport2page.pt
r8651 r11254 9 9 Please select a file-processor and a processing-mode from the selections below. 10 10 </p> 11 <div> 12 <table tal:define="prev_table view/getPreviewTable;"> 13 <thead> 14 <tr> 15 <th i18n:translate="">Header</th> 16 <th i18n:translate="">Sample Record 1</th> 17 <th i18n:translate="">Sample Record 2</th> 18 <th i18n:translate="">Sample Record 3</th> 19 </tr> 20 </thead> 21 <tbody> 22 <tr tal:repeat="row prev_table"> 23 <td tal:repeat="value row" 24 tal:content="value"> value 25 </td> 26 </tr> 27 </tbody> 28 </table> 29 </div> 11 <table tal:define="prev_table view/getPreviewTable;" class="table table-condensed"> 12 <thead> 13 <tr> 14 <th i18n:translate="">Header</th> 15 <th i18n:translate="">Sample Record 1</th> 16 <th i18n:translate="">Sample Record 2</th> 17 <th i18n:translate="">Sample Record 3</th> 18 </tr> 19 </thead> 20 <tbody> 21 <tr tal:repeat="row prev_table"> 22 <td tal:repeat="value row" 23 tal:content="value"> value 24 </td> 25 </tr> 26 </tbody> 27 </table> 30 28 <div> <b i18n:translate="">Processor:</b> 31 <select name="importer" >29 <select name="importer" class="form-control"> 32 30 <option tal:repeat="importer view/getImporters" 33 31 tal:attributes="value importer/name; … … 55 53 </p> 56 54 </div> 57 <input class="btn " type="submit" name="cancel" tal:attributes="value view/cancel_button" />58 <input class="btn danger" type="submit" name="back1" tal:attributes="value view/back_button" />59 <input class="btn primary"55 <input class="btn btn-default" type="submit" name="cancel" tal:attributes="value view/cancel_button" /> 56 <input class="btn btn-danger" type="submit" name="back1" tal:attributes="value view/back_button" /> 57 <input class="btn btn-primary" 60 58 tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button" 61 59 type="submit" name="proceed" /> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport3page.pt
r8783 r11254 1 1 <div i18n:domain="waeup.kofa" i18n:translate="" 2 class="alert -messagesuccess" tal:condition="not: view/getWarnings">2 class="alert alert-success" tal:condition="not: view/getWarnings"> 3 3 Header fields OK 4 4 </div> … … 29 29 30 30 <div> 31 32 33 31 <table tal:define="prev_table view/getPreviewTable; 34 headers view/headerfields;"> 32 headers view/headerfields;" 33 class="table"> 35 34 <thead> 36 35 <tr> … … 45 44 </td> 46 45 <td> 47 <select class="span4" name="headerfield">46 <select name="headerfield" class="form-control"> 48 47 <option tal:repeat="opt view/getPossibleHeaders" 49 48 tal:attributes="value opt/value; … … 62 61 </div> 63 62 64 <input class="btn " type="submit" name="cancel"63 <input class="btn btn-default" type="submit" name="cancel" 65 64 tal:attributes="value view/cancel_button" /> 66 <input class="btn " type="reset" name="reset"65 <input class="btn btn-default" type="reset" name="reset" 67 66 tal:attributes="value view/reset_button" /> 68 <input class="btn " type="submit" name="update"67 <input class="btn btn-default" type="submit" name="update" 69 68 tal:attributes="value view/update_button" /> 70 69 <br /><br /> 71 <input class="btn danger" type="submit" name="back2"70 <input class="btn btn-danger" type="submit" name="back2" 72 71 tal:attributes="value view/back_button" /> 73 <input class="btn primary"72 <input class="btn btn-primary" 74 73 tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button" 75 74 type="submit" name="proceed"/> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport4page.pt
r10099 r11254 15 15 </p> 16 16 <form method="POST" i18n:domain="waeup.kofa"> 17 <input class="btn primary" type="submit" name="finish"17 <input class="btn btn-primary" type="submit" name="finish" 18 18 tal:attributes="value view/back_button" /> 19 19 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogspage.pt
r9641 r11254 3 3 Currently no log files are available. 4 4 </p> 5 <table tal:condition="files" class="table condensed-table">5 <table tal:condition="files" class="table"> 6 6 <thead> 7 7 <tr> … … 17 17 </thead> 18 18 <tbody> 19 <tr tal:repeat="file files" 20 tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'"> 21 <td class="text-center"> 19 <tr tal:repeat="file files"> 20 <td> 22 21 <form method="POST" action="@@show"> 23 <input i18n:translate="" type="submit" class="btn primary"24 22 <input i18n:translate="" type="submit" class="btn btn-primary" 23 name="show" tal:attributes="value view/show_button" /> 25 24 <input type="hidden" name="logname" 26 25 tal:attributes="value file/name" /> 27 26 </form></td> 28 27 <td tal:content="file/name">file.name</td> … … 33 32 </table> 34 33 <form method="POST"> 35 <button class="btn primary"> 36 <span i18n:translate="">Reload page</span> 37 </button> 38 <input i18n:translate="" type="submit" class="btn" name="back" 34 <input i18n:translate="" type="submit" class="btn btn-default" name="back" 39 35 tal:attributes="value view/back_button"/> 40 36 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogsshowfilepage.pt
r8529 r11254 1 1 <form method="post" class="form-horizontal"> 2 <input type="text" name="query" 2 <input type="text" name="query" class="form-control" 3 3 tal:attributes="value view/query; placeholder view/placeholder" /> 4 <input class="btn primary" type="submit" name="search"4 <input class="btn btn-primary" type="submit" name="search" 5 5 tal:attributes="value view/search_button" /> 6 <input class="btn " type="submit" name="back"6 <input class="btn btn-default" type="submit" name="back" 7 7 tal:attributes="value view/back_button" /> 8 8 <input type="hidden" name="logname" -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacentermanagepage.pt
r7811 r11254 1 1 <form i18n:domain="waeup.kofa" method="POST"> 2 <div> 3 <span i18n:translate="">Storage path:</span> 4 <input type="text" name="newpath" 5 tal:attributes="value context/storage" /> 6 <br /><br /> 7 <span i18n:translate=""> 8 Copy existing data to new storage? 9 </span> 10 <input type="checkbox" name="move" checked="checked" /> 11 <br /><br /> 12 <span i18n:translate=""> 13 Overwrite contents in new location? 14 </span> 15 <input type="checkbox" name="overwrite" checked="no" /> 16 <br /><br /> 17 <input class="btn primary" type="submit" name="save" 18 tal:attributes="value view/save_button" /> 19 <input class="btn" type="reset" name="reset" 20 tal:attributes="value view/reset_button" /> 21 <input class="btn" type="submit" name="cancel" 22 tal:attributes="value view/cancel_button" /> 2 3 <br /> 4 <div class="form-group"> 5 <label i18n:translate="">Storage path</label> 6 <input type="text" name="newpath" class="form-control" 7 tal:attributes="value context/storage" /> 23 8 </div> 9 10 <div class="checkbox"> 11 <label> 12 <input type="checkbox" name="move" checked="checked"> 13 Copy existing data to new storage? 14 </label> 15 </div> 16 17 <div class="checkbox"> 18 <label> 19 <input type="checkbox" name="overwrite"> 20 Overwrite contents in new location? 21 </label> 22 </div> 23 24 <input class="btn btn-primary" type="submit" name="save" 25 tal:attributes="value view/save_button" /> 26 <input class="btn btn-default" type="reset" name="reset" 27 tal:attributes="value view/reset_button" /> 28 <input class="btn btn-default" type="submit" name="cancel" 29 tal:attributes="value view/cancel_button" /> 24 30 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt
r9610 r11254 11 11 <form action="." tal:attributes="action request/URL" method="post" 12 12 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 13 <table i18n:domain="waeup.kofa" class=" displaydataTableManageFiles">13 <table i18n:domain="waeup.kofa" class="kofa-data-table dataTableManageFiles"> 14 14 <thead> 15 15 <tr> … … 21 21 </thead> 22 22 <tbody> 23 <tr tal:repeat="file context/getPendingFiles" class="gradeC">23 <tr tal:repeat="file context/getPendingFiles"> 24 24 <td> 25 25 <input type="checkbox" name="val_id" … … 33 33 </tbody> 34 34 </table> 35 36 37 38 39 35 <div tal:condition="view/availableActions"> 36 <span tal:repeat="action view/actions" tal:omit-tag=""> 37 <input tal:replace="structure action/render"/> 38 </span> 39 </div> 40 40 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenteruploadpage.pt
r9930 r11254 24 24 </td> 25 25 <td> 26 <select name="importer" >26 <select name="importer" class="form-control half"> 27 27 <option tal:repeat="importer view/getImporters" 28 28 tal:attributes="value importer/title" … … 37 37 </td> 38 38 <td> 39 <select name="import_mode" >39 <select name="import_mode" class="form-control half"> 40 40 <option value='Create'>Create</option> 41 41 <option value='Update'>Update</option> … … 44 44 </td> 45 45 </tr> 46 <tr>47 <td>48 <input class="btn primary" type="submit" name="SUBMIT"49 tal:attributes="value view/upload_button" />50 <input class="btn" type="submit" name="CANCEL"51 tal:attributes="value view/cancel_button"/>52 </td>53 <td>54 </td>55 </tr>56 46 </table> 47 <br /> 48 <input class="btn btn-primary" type="submit" name="SUBMIT" 49 tal:attributes="value view/upload_button" /> 50 <input class="btn btn-default" type="submit" name="CANCEL" 51 tal:attributes="value view/cancel_button"/> 57 52 </form> 58 53 <br /> 59 54 <p i18n:translate=""> 60 55 Import managers will be automatically informed by email after file upload. … … 67 62 <h2 i18n:translate="">Available Processors (Importers)</h2> 68 63 69 <table i18n:domain="waeup.kofa" >64 <table i18n:domain="waeup.kofa" class="table table-condensed"> 70 65 <thead> 71 66 <tr> … … 74 69 <th i18n:translate="">Optional Schema Fields</th> 75 70 <th i18n:translate="">Non-Schema Fields</th> 76 <th i18n:translate="">CSV Skeleton File</th>77 71 </tr> 78 72 </thead> 79 73 <tr tal:repeat="importer view/getImporters"> 80 <td tal:content="importer/title"></td> 74 <td> 75 <span tal:content="importer/title">TITLE</span><br /><br /> 76 <a i18n:translate="" class="btn btn-primary btn-xs" 77 tal:attributes="href python: 'skeleton?name=' + importer['name']"> 78 Download CSV Skeleton File 79 </a> 80 </td> 81 81 <td nowrap> 82 82 <span tal:repeat="field importer/fields"> … … 110 110 </td> 111 111 112 <td>113 <a i18n:translate=""114 tal:attributes="href python: 'skeleton?name=' + importer['name']">Download</a>115 </td>116 112 </tr> 117 113 </table> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentmanagepage.pt
r7811 r11254 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 <ul class="tabs" data-tabs="tabs"> 4 <li tal:attributes="class view/tab1"> 5 <a href="#tab-1"> 6 <span i18n:translate="">Settings 7 </span></a> 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 <li class="active"> 5 <a href="#tab1" data-toggle="tab"> 6 <span i18n:translate="">Settings</span></a> 8 7 </li> 9 <li tal:attributes="class view/tab2">10 <a href="#tab-2" i18n:translate="">Courses</a>8 <li> 9 <a href="#tab2" data-toggle="tab" i18n:translate="">Courses</a> 11 10 </li> 12 <li tal:attributes="class view/tab3">13 <a href="#tab-3" i18n:translate="">Certificates</a>11 <li> 12 <a href="#tab3" data-toggle="tab" i18n:translate="">Certificates</a> 14 13 </li> 15 <li tal:attributes="class view/tab4">16 <a href="#tab-4" i18n:translate="">Local Roles</a>14 <li> 15 <a href="#tab4" data-toggle="tab" i18n:translate="">Local Roles</a> 17 16 </li> 18 17 </ul> 19 18 <div class="tab-content"> 20 <div id="tab -1" tal:attributes="class view/tab1">19 <div id="tab1" class="active tab-pane"> 21 20 <table class="form-table"> 22 21 <tbody> … … 27 26 <span tal:repeat="action view/actions" tal:omit-tag=""> 28 27 <input tal:condition="python:action.label in view.taboneactions" 29 tal:replace="structure action/render"/>28 tal:replace="structure action/render"/> 30 29 </span> 31 30 </div> 32 31 </div> 33 <div id="tab-2" tal:attributes="class view/tab2"> <br /> 34 <table class="display dataTableManage"> 32 <div id="tab2" class="tab-pane"> 33 <br /> 34 <table class="kofa-data-table dataTableManage"> 35 35 <thead> 36 36 <tr> … … 44 44 </thead> 45 45 <tbody> 46 <tr tal:repeat="entry view/getCourses" class="gradeC"> <td>47 48 tal:attributes="value entry/name" /> </td> <td>49 50 46 <tr tal:repeat="entry view/getCourses"> <td> 47 <input type="checkbox" name="val_id" 48 tal:attributes="value entry/name" /> </td> <td> 49 <a href="" tal:attributes="href entry/url" 50 tal:content="entry/name">Name</a> </td> 51 51 <td tal:content="entry/container/title"> Title </td> 52 52 </tr> … … 56 56 <span tal:repeat="action view/actions" tal:omit-tag=""> 57 57 <input tal:condition="python:action.label in view.tabtwoactions" 58 tal:replace="structure action/render"/>58 tal:replace="structure action/render"/> 59 59 </span> 60 60 </div> 61 61 </div> 62 <div id="tab-3" tal:attributes="class view/tab3"> <br /> 63 <table class="display dataTableManage"> 62 <div id="tab3" class="tab-pane"> 63 <br /> 64 <table class="kofa-data-table dataTableManage"> 64 65 <thead> 65 66 <tr> … … 73 74 </thead> 74 75 <tbody> 75 <tr tal:repeat="entry view/getCertificates" class="gradeC"> <td>76 77 tal:attributes="value entry/name" /> </td> <td>78 79 76 <tr tal:repeat="entry view/getCertificates"> <td> 77 <input type="checkbox" name="val_id" 78 tal:attributes="value entry/name" /> </td> <td> 79 <a href="" tal:attributes="href entry/url" 80 tal:content="entry/name">Name</a> </td> 80 81 <td tal:content="entry/container/title"> Title </td> 81 82 </tr> … … 85 86 <span tal:repeat="action view/actions" tal:omit-tag=""> 86 87 <input tal:condition="python:action.label in view.tabthreeactions" 87 tal:replace="structure action/render"/>88 tal:replace="structure action/render"/> 88 89 </span> 89 90 </div> 90 91 </div> 91 <div id="tab -4" tal:attributes="class view/tab4"> <br />92 <table class=" displaydataTableManage">92 <div id="tab4" class="tab-pane"> <br /> 93 <table class="kofa-data-table dataTableManage"> 93 94 <thead> 94 95 <tr> … … 104 105 </thead> 105 106 <tbody> 106 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC">107 <tr tal:repeat="entry view/getUsersWithLocalRoles"> 107 108 <td> <input type="checkbox" name="role_id" 108 109 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> 109 110 <td tal:content="entry/user_name"> USERNAME </td> 110 111 <td tal:content="entry/user_title"> USERTITLE </td> … … 116 117 <span tal:repeat="action view/actions" tal:omit-tag=""> 117 118 <input tal:condition="python:action.label in view.tabfouractions1" 118 tal:replace="structure action/render"/>119 tal:replace="structure action/render"/> 119 120 </span> 120 121 </div> <br /><br /> 121 <table class="form-table"> 122 <tr> <td> 123 <select id="user" name="user"> 124 <option tal:attributes="value user/name" tal:repeat="user view/getUsers"> 125 <span tal:replace="user/val/title">USERTITLE 126 </span> 127 </option> 128 </select> </td> <td> 129 <select id="local_role" name="local_role"> 130 <option tal:attributes="value localrole/name" 131 tal:repeat="localrole view/getLocalRoles"> 132 <span tal:replace="localrole/title">LOCALROLETITLE 133 </span> 134 </option> 135 </select> </td> <td> 136 <div tal:condition="view/availableActions"> 137 <span tal:repeat="action view/actions" tal:omit-tag=""> 138 <input tal:condition="python:action.label in view.tabfouractions2" 139 tal:replace="structure action/render"/> 140 </span> 141 </div> </td> 142 </tr> 143 </table> 122 <div class="form-inline"> 123 <br /> 124 <div class="form-group"> 125 <select class="form-control" id="user" name="user"> 126 <option tal:repeat="user view/getUsers" 127 tal:attributes="value user/name"> 128 <span tal:replace="user/val/title">USERTITLE 129 </span> 130 </option> 131 </select> 132 </div> 133 <div class="form-group"> 134 <select class="form-control" id="local_role" name="local_role"> 135 <option tal:repeat="localrole view/getLocalRoles" 136 tal:attributes="value localrole/name"> 137 <span tal:replace="localrole/title">LOCALROLETITLE 138 </span> 139 </option> 140 </select> 141 </div> 142 <div class="form-group"> 143 <div tal:condition="view/availableActions"> 144 <span tal:repeat="action view/actions" tal:omit-tag=""> 145 <input tal:condition="python:action.label in view.tabfouractions2" 146 tal:replace="structure action/render"/> 147 </span> 148 </div> 149 </div> 150 </div> 144 151 </div> 145 152 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentpage.pt
r8481 r11254 1 <ul i18n:domain="waeup.kofa" class="tabs " data-tabs="tabs">2 <li class="active"><a href="#tab -1">3 <span i18n:translate="">Courses</span></a>1 <ul i18n:domain="waeup.kofa" class="tabs nav nav-tabs" data-tabs="tabs"> 2 <li class="active"><a href="#tab1" data-toggle="tab"> 3 <span i18n:translate="">Courses</span></a> 4 4 </li> 5 <li><a href="#tab -2">5 <li><a href="#tab2" data-toggle="tab"> 6 6 <span i18n:translate="">Certificates</span></a> 7 7 </li> 8 8 </ul> 9 <div 10 <div id="tab-1" class="active">9 <div i18n:domain="waeup.kofa" class="tab-content"> 10 <div id="tab1" class="active tab-pane"> 11 11 <br /> 12 <table class=" displaydataTable">12 <table class="kofa-data-table dataTable"> 13 13 <thead> 14 14 <tr> … … 18 18 </thead> 19 19 <tbody> 20 <tr tal:repeat="entry view/getCourses" class="gradeC">20 <tr tal:repeat="entry view/getCourses"> 21 21 <td> 22 23 24 22 <a href="" 23 tal:attributes="href entry/url" 24 tal:content="entry/name">Name</a> 25 25 </td> 26 26 <td tal:content="entry/container/title"> 27 27 Title 28 28 </td> 29 29 </tr> 30 30 </tbody> 31 31 </table> 32 33 <div id="tab-2">32 </div> 33 <div id="tab2" class="tab-pane"> 34 34 <br /> 35 <table class=" displaydataTable">35 <table class="kofa-data-table dataTable"> 36 36 <thead> 37 37 <tr> … … 41 41 </thead> 42 42 <tbody> 43 <tr tal:repeat="entry view/getCertificates" class="gradeC">43 <tr tal:repeat="entry view/getCertificates"> 44 44 <td> 45 46 47 45 <a href="" 46 tal:attributes="href entry/url" 47 tal:content="entry/name">Name</a> 48 48 </td> 49 49 <td tal:content="entry/container/title"> 50 50 Title 51 51 </td> 52 52 </tr> 53 53 </tbody> 54 54 </table> 55 55 </div> 56 56 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultiescontainermanagepage.pt
r7464 r11254 2 2 enctype="multipart/form-data"> 3 3 4 <table >4 <table class="table table-hover"> 5 5 <thead> 6 6 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultymanagepage.pt
r7811 r11254 1 1 <form action="." tal:attributes="action request/URL" 2 2 i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data"> 3 <ul class="tabs " data-tabs="tabs">4 <li tal:attributes="class view/tab1">5 <a href="#tab -1">3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 <li class="active"> 5 <a href="#tab1" data-toggle="tab"> 6 6 <span i18n:translate="">Settings 7 7 </span></a> 8 8 </li> 9 <li tal:attributes="class view/tab2">10 <a href="#tab -2">9 <li> 10 <a href="#tab2" data-toggle="tab"> 11 11 <span tal:content="view/subunits">CONTENTS 12 12 </span> </a> 13 13 </li> 14 <li tal:attributes="class view/tab3">15 <a href="#tab -3">14 <li> 15 <a href="#tab3" data-toggle="tab"> 16 16 <span i18n:translate="">Local Roles 17 17 </span></a> … … 19 19 </ul> 20 20 <div class="tab-content"> 21 <div id="tab -1" tal:attributes="class view/tab1">21 <div id="tab1" class="active tab-pane"> 22 22 <table class="form-table"> 23 23 <tbody> … … 32 32 </div> 33 33 </div> 34 <div id="tab -2" tal:attributes="class view/tab2">34 <div id="tab2" class="tab-pane"> 35 35 <h3 tal:content="view/subunits">DEPARTMENTS</h3> 36 <table >36 <table class="table table-hover"> 37 37 <thead> 38 38 <tr> … … 63 63 </div> 64 64 </div> 65 <div id="tab -3" tal:attributes="class view/tab3"> <br />66 <table class=" displaydataTableManage">65 <div id="tab3" class="tab-pane"> <br /> 66 <table class="kofa-data-table dataTableManage"> 67 67 <thead> 68 68 <tr> … … 78 78 </thead> 79 79 <tbody> 80 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td> 80 <tr tal:repeat="entry view/getUsersWithLocalRoles"> 81 <td> 81 82 <input type="checkbox" name="role_id" 82 83 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> … … 93 94 </span> 94 95 </div><br /><br /> 95 <table class="form-table"> 96 <tr> <td> 97 <select id="user" name="user"> 98 <option tal:repeat="user view/getUsers" tal:attributes="value user/name"> 99 <span tal:replace="user/val/title">USERTITLE 100 </span> 101 </option> 102 </select> </td> <td> 103 <select id="local_role" name="local_role"> 104 <option tal:repeat="localrole view/getLocalRoles" 105 tal:attributes="value localrole/name"> 106 <span tal:replace="localrole/title">LOCALROLETITLE 107 </span> 108 </option> 109 </select> </td> <td> 110 <div tal:condition="view/availableActions"> 111 <span tal:repeat="action view/actions" tal:omit-tag=""> 112 <input tal:condition="python:action.label in view.tabthreeactions2" 113 tal:replace="structure action/render"/> 114 </span> 115 </div> </td> 116 </tr> 117 </table> 96 <div class="form-inline"> 97 <br /> 98 <div class="form-group"> 99 <select id="user" name="user" class="form-control"> 100 <option tal:repeat="user view/getUsers" 101 tal:attributes="value user/name"> 102 <span tal:replace="user/val/title">USERTITLE 103 </span> 104 </option> 105 </select> 106 </div> 107 <div class="form-group"> 108 <select id="local_role" name="local_role" class="form-control"> 109 <option tal:repeat="localrole view/getLocalRoles" 110 tal:attributes="value localrole/name"> 111 <span tal:replace="localrole/title">LOCALROLETITLE 112 </span> 113 </option> 114 </select> 115 </div> 116 <div class="form-group" tal:condition="view/availableActions"> 117 <span tal:repeat="action view/actions" tal:omit-tag=""> 118 <input tal:condition="python:action.label in view.tabthreeactions2" 119 tal:replace="structure action/render"/> 120 </span> 121 </div> 122 </div> 123 118 124 </div> 119 125 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultypage.pt
r8024 r11254 3 3 </div> 4 4 5 <table i18n:domain="waeup.kofa">5 <table class="table table-hover" i18n:domain="waeup.kofa"> 6 6 <thead> 7 7 <tr> … … 12 12 <tbody> 13 13 <tr tal:repeat="value context/values"> 14 <td> <a tal:attributes="href value/__name__">14 <td> <a tal:attributes="href python: view.url(value)"> 15 15 <span tal:content="value/code">Name</span></a></td> 16 16 <td tal:content="value/longtitle">Title</td> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/filedisplay.pt
r8106 r11254 4 4 </td> 5 5 <td> 6 <a tal:attributes="href viewlet/download_name"6 <a tal:attributes="href python: view.url(context, viewlet.download_name)" 7 7 tal:content="viewlet/download_name" 8 8 target="image"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/fileupload.pt
r8135 r11254 5 5 <td> 6 6 <tal:file tal:condition="viewlet/file_exists"> 7 <a tal:attributes="href viewlet/download_name"7 <a tal:attributes="href python: view.url(context, viewlet.download_name)" 8 8 tal:content="viewlet/title" 9 9 target="image"> … … 11 11 </a> 12 12 </tal:file> 13 <input type="file" tal:attributes="name viewlet/input_name"/> 13 14 <br /> 14 <input type="file" tal:attributes="name viewlet/input_name"/>15 <br /><br />16 15 <input type="submit" tal:condition="viewlet/file_exists" 17 16 tal:attributes="id python:('delete_%s' % viewlet.input_name); 18 17 name python:('delete_%s' % viewlet.input_name); 19 18 value viewlet/delete_button" 20 class="btn error" />19 class="btn btn-danger" /> 21 20 <input type="submit" 22 21 tal:attributes="id python:('upload_%s' % viewlet.input_name); 23 22 name python:('upload_%s' % viewlet.input_name); 24 23 value viewlet/upload_button" 25 class="btn primary" />24 class="btn btn-primary" /> 26 25 <span i18n:translate=""> 27 26 Max. file size: -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/findstudentspage.pt
r10646 r11254 1 <form method="POST" i18n:domain="waeup.kofa" >1 <form method="POST" i18n:domain="waeup.kofa" class="form-inline"> 2 2 <br /> 3 <input class="btn primary" type="submit" name="search" 4 tal:attributes="value view/search_button" /> 5 6 <select name="searchtype"> 7 <option i18n:translate="" value="student_id">with id</option> 8 <option i18n:translate="" value="fullname">with name</option> 9 <option i18n:translate="" value="reg_number">with registration number</option> 10 <option i18n:translate="" value="matric_number">with matriculation number</option> 11 </select> 12 13 <input type="text" name="searchterm" /> 14 15 <p> </p> 16 <div tal:condition="view/hitlist"> 17 <h3 i18n:translate="">Search Results</h3> 18 <input type="hidden" name="old_searchterm" 19 tal:attributes="value view/searchterm" /> 20 <input type="hidden" name="old_searchtype" 21 tal:attributes="value view/searchtype" /> 22 <table class="display dataTable"> 23 <thead> 24 <tr> 25 <th i18n:translate="">Student Id</th> 26 <th i18n:translate="">Reg. Number</th> 27 <th i18n:translate="">Matric. Number</th> 28 <th i18n:translate="">State</th> 29 <th i18n:translate="">Full Name</th> 30 </tr> 31 </thead> 32 <tbody> 33 <tr tal:repeat="item view/hitlist" class="gradeC"> 34 <td> <a tal:attributes="href item/url"> 35 <span tal:content="item/student_id">A123456</span></a> 36 </td> 37 <td class="center"> <a tal:attributes="href item/url"> 38 <span tal:content="item/reg_number">9999999</span></a> 39 </td> 40 <td class="center"> <a tal:attributes="href item/url"> 41 <span tal:content="item/matric_number">9999999</span></a> 42 </td> 43 <td tal:content="item/state">admitted</td> 44 <td tal:content="item/display_fullname">Bob</td> 45 </tr> 46 </tbody> 47 </table> 48 <br /> 3 <div class="form-group"> 4 <input class="btn btn-primary" type="submit" name="search" 5 tal:attributes="value view/search_button" /> 6 </div> 7 <div class="form-group"> 8 <select name="searchtype" class="form-control"> 9 <option i18n:translate="" value="student_id">with id</option> 10 <option i18n:translate="" value="fullname">with name</option> 11 <option i18n:translate="" value="reg_number">with registration number</option> 12 <option i18n:translate="" value="matric_number">with matriculation number</option> 13 </select> 14 </div> 15 <div class="form-group"> 16 <input type="text" class="form-control" name="searchterm" /> 49 17 </div> 50 18 </form> 19 20 <p> </p> 21 <div tal:condition="view/hitlist"> 22 <h3 i18n:translate="">Search Results</h3> 23 <input type="hidden" name="old_searchterm" 24 tal:attributes="value view/searchterm" /> 25 <input type="hidden" name="old_searchtype" 26 tal:attributes="value view/searchtype" /> 27 <table class="kofa-data-table dataTable"> 28 <thead> 29 <tr> 30 <th i18n:translate="">Student Id</th> 31 <th i18n:translate="">Reg. Number</th> 32 <th i18n:translate="">Matric. Number</th> 33 <th i18n:translate="">State</th> 34 <th i18n:translate="">Full Name</th> 35 </tr> 36 </thead> 37 <tbody> 38 <tr tal:repeat="item view/hitlist"> 39 <td> <a tal:attributes="href item/url"> 40 <span tal:content="item/student_id">A123456</span></a> 41 </td> 42 <td class="center"> <a tal:attributes="href item/url"> 43 <span tal:content="item/reg_number">9999999</span></a> 44 </td> 45 <td class="center"> <a tal:attributes="href item/url"> 46 <span tal:content="item/matric_number">9999999</span></a> 47 </td> 48 <td tal:content="item/state">admitted</td> 49 <td tal:content="item/display_fullname">Bob</td> 50 </tr> 51 </tbody> 52 </table> 53 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt
r8853 r11254 1 <form i18n:domain="waeup.kofa" method="post"> 2 <table id="login" class="form-table" summary="Table for entering login information"> 3 <tbody> 4 <tr> 5 <td i18n:translate="" class="fieldname"> 6 User Name or Id: 7 </td> 8 <td> 9 <input type="text" id="login" name="form.login" size="20" /> 10 </td> 11 </tr> 12 <tr> 13 <td i18n:translate="" class="fieldname"> 14 Password: 15 </td> 16 <td> 17 <input type="password" id="password" name="form.password" size="20" value="" /> 18 19 </td> 20 </tr> 21 <tr> 22 <td> </td> 23 <td> 24 <font i18n:translate="" color="red"> Notice: User names, Ids and passwords are case sensitive.</font> 25 </td> 26 </tr> 27 </tbody> 28 </table> 1 <form i18n:domain="waeup.kofa" method="post" class="form-horizontal"> 2 <br /> 3 <div class="form-group"> 4 <label i18n:translate="" class="col-sm-2 control-label">User Name or Id</label> 5 <div class="col-sm-10"> 6 <input name="form.login" type="text" class="form-control" id="login"> 7 </div> 8 </div> 9 <div class="form-group"> 10 <label i18n:translate="" class="col-sm-2 control-label">Password</label> 11 <div class="col-sm-10"> 12 <input name="form.password" type="password" class="form-control" id="password"> 13 <font i18n:translate="" color="red"> Notice: User names, Ids and passwords are case sensitive.</font> 14 </div> 15 </div> 29 16 <input type="hidden" name="camefrom" tal:attributes="value view/camefrom" /> 30 <input class="btn primary" type="submit" name="SUBMIT"17 <input class="btn btn-primary" type="submit" name="SUBMIT" 31 18 tal:attributes="value view/login_button" /> 32 33 34 19 <br /><br /><br /> 35 36 20 <p i18n:translate="login_trouble1">Don't forget to logout or exit your browser when you're done. 37 21 If you are having trouble logging in, make sure to enable cookies in your web browser. -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/reportscontainercreate.pt
r9643 r11254 8 8 </p> 9 9 <br /> 10 <div class="clearfix"> 11 <label for="generator">Report Type:</label> 12 <div class="input"> 13 <select name="generator"> 14 <span tal:repeat="items view/creators" tal:omit-tag=""> 15 <option 16 tal:define="name python: items[1]; title python: items[0]" 17 tal:attributes="value name"> 18 <span tal:replace="title">TITLE</span> 19 </option> 20 </span> 21 </select> 22 <div class="help-inline" i18n:translate=""> 23 Type of report to create 24 </div> 25 </div> 10 <div class="form-group"> 11 <label for="generator">Report Type</label> 12 <select name="generator" class="form-control half"> 13 <span tal:repeat="items view/creators" tal:omit-tag=""> 14 <option 15 tal:define="name python: items[1]; title python: items[0]" 16 tal:attributes="value name"> 17 <span tal:replace="title">TITLE</span> 18 </option> 19 </span> 20 </select> 26 21 </div> 27 <div class=" input">28 <input i18n:translate="" type="submit" class="btn primary"22 <div class="form-group"> 23 <input i18n:translate="" type="submit" class="btn btn-primary" 29 24 name="START_GENERATOR" value="Configure" /> 30 <a class="btn secondary" href=""25 <a class="btn btn-default" href="" 31 26 tal:attributes="href python:view.url(context)">Cancel</a> 32 27 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/reportscontainerpage.pt
r9840 r11254 1 <table i18n:domain="waeup.kofa" >1 <table i18n:domain="waeup.kofa" class="table"> 2 2 <thead> 3 3 <tr> … … 31 31 <input type="hidden" name="job_id" 32 32 tal:attributes="value python: entry[0]" /> 33 <input type="submit" class="btn smallprimary"33 <input type="submit" class="btn btn-sm btn-primary" 34 34 name="DOWNLOAD" value="Download" 35 35 tal:condition="python: entry[4]" /> 36 <input type="submit" class="btn small secondary"36 <input type="submit" class="btn btn-sm btn-default" 37 37 name="DISCARD" value="Discard" 38 38 tal:condition="python: entry[3]" /> 39 <a href="" class="btn " i18n:translate=""39 <a href="" class="btn btn-sm btn-default" i18n:translate="" 40 40 tal:condition="python: entry[5]"> 41 <img tal:attributes="src static/actionicon_reload.png" />41 <img src="/static/img/actionicon_reload.png" /> 42 42 Reload 43 43 </a> … … 48 48 </table> 49 49 <form method="POST" i18n:domain="waeup.kofa"> 50 <div class="span12"> 51 <a href="create" class="btn primary" i18n:translate=""> 52 Create new report 53 </a> 54 </div> 50 <a tal:attributes="href python:view.url(context, 'create')" 51 class="btn btn-primary" i18n:translate=""> 52 Create new report 53 </a> 55 54 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/searchpage.pt
r9631 r11254 1 <form method="post"> 2 <input type="text" name="query" 3 tal:attributes="value view/query" /> 4 <input class="btn primary" type="submit" name="SUBMIT" 1 <form method="POST" class="form-inline"> 2 <br /> 3 <div class="form-group"> 4 <input type="text" name="query" class="form-control" 5 tal:attributes="value view/query" /> 6 </div> 7 <div class="form-group"> 8 <input class="btn btn-primary" type="submit" name="SUBMIT" 5 9 tal:attributes="value view/search_button"/> 10 </div> 6 11 </form> 7 12 <br /> 8 13 <span i18n:domain="waeup.kofa" tal:condition="view/hitlist"> 9 14 <h3 i18n:translate="">Search Results</h3> 10 <table class=" displaydataTable">15 <table class="kofa-data-table dataTable"> 11 16 <thead> 12 17 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt
r10900 r11254 2 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.kofa"> 3 3 <head> 4 5 <!-- Diazo element--> 4 6 <title i18n:translate=""> 5 7 WAeUP.Kofa - Student Management System 6 </title> 8 </title> 9 <!-- /Diazo element--> 10 7 11 <!--base href="http://localhost:8080/app/@@page" 8 12 tal:attributes="href python: view.url(layout.site)" / --> … … 14 18 href python: view.url(layout.site, 'feed.rss')" /> 15 19 </head> 16 <body>17 <div class="topbar" data-scrollspy="scrollspy" >18 <div class="topbar-inner">19 <div class="container-fluid">20 <a class="brand" href="#"21 tal:attributes="href python: view.url(layout.site)"22 tal:content="layout/getAppAcronym">ACRONYM</a>23 <ul class="nav kofa-navbar-left">24 <tal:primary_nav content="structure provider:primary_nav" />25 </ul>26 <ul class="nav secondary-nav kofa-navbar-right">27 <li tal:condition="not: layout/isAuthenticated">28 <a href="#" i18n:translate=""29 tal:attributes="href python: view.url(layout.site, 'login')">30 Login31 </a>32 </li>33 <li tal:condition="layout/isAuthenticated">34 <a href="#" i18n:translate=""35 tal:attributes="href python: view.url(layout.site, '@@contactadmin')">36 Contact37 </a>38 </li>39 <li tal:condition="layout/isAuthenticated">40 <a href="#" i18n:translate=""41 tal:attributes="href python: view.url(context, '@@logout')">42 Logout43 </a>44 </li>45 </ul>46 <span class="language"47 tal:define="langs provider:languages"48 tal:condition="langs">49 <tal:languages50 tal:content="structure langs" /> |51 </span>52 </div>53 </div>54 </div>55 20 21 <!-- Diazo element--> 22 <body class="kofa-body"> 23 24 <!-- Diazo element--> 25 <a class="kofa-brand-link" href="#" 26 tal:attributes="href python: view.url(layout.site)" 27 tal:content="layout/getAppAcronym">ACRONYM 28 </a> 29 <!-- /Diazo element--> 30 31 <!-- Diazo element--> 32 <ul class="nav kofa-navbar-left"> 33 <tal:primary_nav content="structure provider:primary_nav" /> 34 </ul> 35 <!-- /Diazo element--> 36 37 <!-- Diazo element--> 38 <ul class="nav secondary-nav kofa-navbar-right"> 39 <li tal:condition="not: layout/isAuthenticated"> 40 <a href="#" i18n:translate="" 41 tal:attributes="href python: view.url(layout.site, 'login')"> 42 Login 43 </a> 44 </li> 45 <li tal:condition="layout/isAuthenticated"> 46 <a href="#" i18n:translate="" 47 tal:attributes="href python: view.url(layout.site, '@@contactadmin')"> 48 Contact 49 </a> 50 </li> 51 <li tal:condition="layout/isAuthenticated"> 52 <a href="#" i18n:translate="" 53 tal:attributes="href python: view.url(context, '@@logout')"> 54 Logout 55 </a> 56 </li> 57 </ul> 58 <!-- /Diazo element--> 59 60 <span tal:define="langs provider:languages" 61 tal:condition="langs" 62 class="language"> 63 <tal:languages tal:content="structure langs" /> | 64 </span> 65 66 <!-- Diazo element--> 56 67 <ul class="breadcrumb"> 57 68 <tal:breadcrumbs 58 69 tal:condition="python: layout.isAuthenticated()" 59 70 tal:content="structure provider:breadcrumbs" /> 60 <span61 tal:condition="layout/getStudentName" class="wfstatus">62 <span i18n:translate="">Student Id:</span>63 <span tal:replace="python:context.student.student_id">64 ID65 </span> 66 <span i18n:translate="">State:</span>67 <span tal:replace="python:context.student.translated_state">68 STATE69 </span>70 </span>71 71 </ul> 72 <!-- /Diazo element--> 72 73 73 <div class="container-fluid"> 74 <div class="sidebar"> 75 <div class="well"> 76 <div tal:condition="layout/getStudentName"> 77 <h5 tal:content="layout/getStudentName">STUDENTNAME</h5> 78 <ul> 79 <tal:left content="structure provider:left_studentmanage" /> 80 </ul> 81 </div> 82 <div tal:condition="layout/isAuthenticated"> 83 <h5 tal:content="layout/getUserTitle">USERNAME</h5> 84 <ul> 85 <tal:left content="structure provider:left_manage" /> 86 </ul> 87 </div> 74 <!-- Diazo element--> 75 <span tal:condition="layout/getStudentName"> 76 <div class="wfstatus"> 77 <span tal:replace="python:context.student.student_id"> 78 Id 79 </span> 80 • 81 <span tal:replace="python:context.student.translated_state"> 82 State 83 </span> 84 </div> 85 </span> 86 <!-- /Diazo element--> 87 88 <!-- Diazo element--> 89 <div class="sidebar well"> 90 <div tal:condition="layout/getStudentName"> 91 <div class="kofa-sidebar-title" tal:content="layout/getStudentName">STUDENTNAME</div> 92 <ul class="nav"> 93 <tal:left content="structure provider:left_studentmanage" /> 94 </ul> 95 </div> 96 <div tal:condition="layout/isAuthenticated"> 97 <div class="kofa-sidebar-title" tal:content="layout/getUserTitle">USERNAME</div> 98 <ul class="nav"> 99 <tal:left content="structure provider:left_manage" /> 100 </ul> 101 </div> 102 </div> 103 <!-- /Diazo element--> 104 105 <!-- Diazo element--> 106 <div class="kofa-content"> 107 <div class="actionbar" tal:condition="provider:actionbar"> 108 <tal:actionbar content="structure provider:actionbar" /> 109 </div> 110 <div 111 tal:define="message context/@@messages" 112 tal:condition="python: len(message)>11"> 113 <div tal:content="structure message"> 88 114 </div> 89 115 </div> 90 <div class="span13 content"> 91 <div class="actionbar" tal:condition="provider:actionbar"> 92 <tal:actionbar content="structure provider:actionbar" /> 93 </div> 94 <div 95 tal:define="message context/@@messages" 96 tal:condition="python: len(message)>11"> 97 <div tal:content="structure message"> 98 </div> 99 </div> 100 <div class="alert-message error" 101 tal:define="status view/status|nothing" 102 tal:condition="status"> 103 <span tal:content="view/status"> 104 FORM STATUS SUMMARY 105 </span>: 106 <ul id="alert-error" tal:condition="view/errors"> 107 <li tal:repeat="error view/error_views"> 108 <span tal:replace="structure error">Error Type</span> 109 </li> 110 </ul> 111 </div> 112 <div class="pull-right"> 113 <a i18n:translate="" href="#footer">Back to bottom</a> 114 </div> 115 <h1 class="kofa-content-label" 116 tal:condition="view/label|nothing" 117 tal:content="structure view/label">LABEL</h1> 118 <div tal:content="structure view/content"> THE CONTENT 119 </div> 120 <div id="footer" class="footer"> 121 <div class="pull-right"> 122 <a i18n:translate="" href="#">Back to top</a> 123 </div> 124 <div i18n:translate=""> 125 Kofa - Student Management System 126 </div> 127 <div i18n:translate=""> 128 Copyright © WAeUP Group 2008-2014 129 </div> 130 </div> 116 <div class="alert alert-danger" 117 tal:define="status view/status|nothing" 118 tal:condition="status"> 119 <span tal:content="view/status"> 120 FORM STATUS SUMMARY 121 </span>: 122 <ul id="alert-error" tal:condition="view/errors"> 123 <li tal:repeat="error view/error_views"> 124 <span tal:replace="structure error">Error Type</span> 125 </li> 126 </ul> 131 127 </div> 128 <div class="pull-right"> 129 <a i18n:translate="" href="#bottom">Back to bottom</a> 130 </div> 131 <h1 class="kofa-content-label" 132 tal:condition="view/label|nothing" 133 tal:content="structure view/label">LABEL</h1> 134 <div tal:content="structure view/content"> THE CONTENT 135 </div> 136 <div id="bottom" class="pull-right"> 137 <a i18n:translate="" href="#">Back to top</a> 138 </div> 139 <br /> 140 132 141 </div> 142 <!-- /Diazo element--> 143 133 144 </body> 145 <!-- /Diazo element--> 146 134 147 </html> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt
r10900 r11254 17 17 href python: view.url(layout.site, 'feed.rss')" /> 18 18 </head> 19 <body>20 <div class="topbar" data-scrollspy="scrollspy" >21 <div class="topbar-inner">22 <div class="container">23 <a class="brand" href="#"24 tal:attributes="href python: view.url(layout.site)"25 tal:content="layout/getAppAcronym">ACRONYM</a>26 <ul class="nav kofa-navbar-left">27 <tal:primary_nav content="structure provider:primary_nav" />28 <tal:primary_nav content="structure provider:primary_nav_student" />29 </ul>30 <ul class="nav secondary-nav kofa-navbar-right">31 <li tal:condition="not: layout/isAuthenticated">32 <a href="#" i18n:translate=""33 tal:attributes="href python: view.url(layout.site, 'login')">34 Login35 </a>36 </li>37 <li tal:condition="layout/isAuthenticated">38 <a href="#" i18n:translate=""39 tal:attributes="href python: view.url(layout.site, '@@contactadmin')">40 Contact41 </a>42 </li>43 <li tal:condition="layout/isAuthenticated">44 <a href="#" i18n:translate=""45 tal:attributes="href python: view.url(context, '@@logout')">46 Logout47 </a>48 </li>49 </ul>50 <span class="language"51 tal:define="langs provider:languages"52 tal:condition="langs">53 <tal:languages54 tal:content="structure langs" /> |55 </span>56 </div>57 </div>58 </div>59 19 60 <div class="container"> 61 <ul class="student-info-bar" tal:condition="layout/isAuthenticated"> 62 <tal:breadcrumbs 63 tal:condition="python: layout.isAuthenticated()" 64 tal:content="structure provider:breadcrumbs" /> 65 <span tal:condition="layout/getStudentName" class="wfstatus"> 20 <!-- Diazo element--> 21 <body class="kofa-body"> 22 23 <!-- Diazo element--> 24 <a class="kofa-brand-link" href="#" 25 tal:attributes="href python: view.url(layout.site)" 26 tal:content="layout/getAppAcronym">ACRONYM</a> 27 <!-- /Diazo element--> 28 29 <!-- Diazo element--> 30 <ul class="nav kofa-navbar-left"> 31 <tal:primary_nav content="structure provider:primary_nav" /> 32 <tal:primary_nav content="structure provider:primary_nav_student" /> 33 </ul> 34 <!-- /Diazo element--> 35 36 <!-- Diazo element--> 37 <ul class="nav secondary-nav kofa-navbar-right"> 38 <li tal:condition="not: layout/isAuthenticated"> 39 <a href="#" i18n:translate="" 40 tal:attributes="href python: view.url(layout.site, 'login')"> 41 Login 42 </a> 43 </li> 44 <li tal:condition="layout/isAuthenticated"> 45 <a href="#" i18n:translate="" 46 tal:attributes="href python: view.url(layout.site, '@@contactadmin')"> 47 Contact 48 </a> 49 </li> 50 <li tal:condition="layout/isAuthenticated"> 51 <a href="#" i18n:translate="" 52 tal:attributes="href python: view.url(context, '@@logout')"> 53 Logout 54 </a> 55 </li> 56 </ul> 57 <!-- Diazo element--> 58 59 <span tal:define="langs provider:languages" 60 tal:condition="langs" 61 class="language"> 62 <tal:languages tal:content="structure langs" /> | 63 </span> 64 65 <!-- Diazo element--> 66 <ul class="breadcrumb" tal:condition="layout/isAuthenticated"> 67 <tal:breadcrumbs 68 tal:condition="python: layout.isAuthenticated()" 69 tal:content="structure provider:breadcrumbs" /> 70 </ul> 71 <!-- /Diazo element--> 72 73 <!-- Diazo element--> 74 <span tal:condition="layout/getStudentName"> 75 <div class="wfstatus"> 66 76 <span tal:replace="python:context.student.student_id"> 67 77 Id 68 78 </span> 69 |79 • 70 80 <span tal:replace="python:context.student.translated_state"> 71 81 State 72 82 </span> 73 </span> 74 </ul> 75 <div class="content"> 76 <div class="actionbar" tal:condition="provider:actionbar"> 77 <tal:actionbar content="structure provider:actionbar" /> 78 </div> 79 <div tal:define="message context/@@messages" 80 tal:condition="python: len(message)>11"> 81 <div tal:content="structure message"> 82 </div> 83 </div> 84 <div class="alert-message error" 85 tal:define="status view/status|nothing" 86 tal:condition="status"> 87 <span tal:content="view/status"> 88 FORM STATUS SUMMARY 89 </span>: 90 <ul id="alert-error" tal:condition="view/errors"> 91 <li tal:repeat="error view/error_views"> 92 <span tal:replace="structure error">Error Type</span> 93 </li> 94 </ul> 95 </div> 96 <div class="pull-right"> 97 <a i18n:translate="" href="#footer">Back to bottom</a> 98 </div> 99 <h1 class="kofa-content-label" 100 tal:condition="view/label|nothing" 101 tal:content="structure view/label">Label</h1> 102 <div tal:content="structure view/content"> 103 THE CONTENT 104 </div> 105 <div id="footer" class="footer"> 106 <div class="pull-right"> 107 <a i18n:translate="" href="#">Back to top</a> 108 </div> 109 <div i18n:translate=""> 110 Kofa - Student Management System 111 </div> 112 <div i18n:translate=""> 113 Copyright © WAeUP Group 2008-2014 114 </div> 83 </div> 84 </span> 85 <!-- /Diazo element--> 86 87 <!-- Diazo element--> 88 <div class="kofa-content"> 89 <div class="actionbar" tal:condition="provider:actionbar"> 90 <tal:actionbar content="structure provider:actionbar" /> 91 </div> 92 <div tal:define="message context/@@messages" 93 tal:condition="python: len(message)>11"> 94 <div tal:content="structure message"> 115 95 </div> 116 96 </div> 97 <div class="alert alert-danger" 98 tal:define="status view/status|nothing" 99 tal:condition="status"> 100 <span tal:content="view/status"> 101 FORM STATUS SUMMARY 102 </span>: 103 <ul id="alert-error" tal:condition="view/errors"> 104 <li tal:repeat="error view/error_views"> 105 <span tal:replace="structure error">Error Type</span> 106 </li> 107 </ul> 108 </div> 109 <div class="pull-right"> 110 <a i18n:translate="" href="#bottom">Back to bottom</a> 111 </div> 112 <h1 class="kofa-content-label" 113 tal:condition="view/label|nothing" 114 tal:content="structure view/label">Label</h1> 115 <div tal:content="structure view/content"> 116 THE CONTENT 117 </div> 118 <div id="bottom" class="pull-right"> 119 <a i18n:translate="" href="#">Back to top</a> 120 </div> 121 <br /> 117 122 </div> 123 <!-- /Diazo element--> 124 118 125 </body> 126 <!-- /Diazo element--> 127 119 128 </html> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/usereditformpage.pt
r8486 r11254 9 9 <td i18n:translate="" class="fieldname">Password:</td> 10 10 <td> 11 <input name="password" type="password" />11 <input class="form-control" name="password" type="password" /> 12 12 </td> 13 13 </tr> … … 15 15 <td i18n:translate="" class="fieldname">Retype Password:</td> 16 16 <td> 17 <input name="control_password" type="password" />17 <input class="form-control" name="control_password" type="password" /> 18 18 </td> 19 19 </tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/userscontainerpage.pt
r9495 r11254 1 <table i18n:domain="waeup.kofa" class=" displaydataTable">1 <table i18n:domain="waeup.kofa" class="kofa-data-table dataTable"> 2 2 <thead> 3 3 <tr> 4 <th i18n:translate=""> UserId</th>4 <th i18n:translate="">Id</th> 5 5 <th i18n:translate="">Name</th> 6 6 <th i18n:translate="">Portal Roles</th> … … 19 19 <input type="hidden" name="userid" 20 20 tal:attributes="value account/name"/> 21 <input class="btn " type="submit" name="manage"21 <input class="btn btn-sm btn-primary" type="submit" name="manage" 22 22 tal:attributes="value view/manage_button" /> 23 <input class="btn " type="submit" name="delete"23 <input class="btn btn-sm btn-default" type="submit" name="delete" 24 24 tal:attributes="value view/delete_button" /> 25 25 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r10676 r11254 374 374 self.browser.open(self.datacenter_path) 375 375 self.browser.getLink("Upload data").click() 376 self.assertTrue(377 '<a href="skeleton?name=facultyprocessor">Download</a>'378 in self.browser.contents)379 376 self.browser.getLink(url='skeleton?name=facultyprocessor').click() 380 377 self.assertEqual(self.browser.headers['Status'], '200 Ok') -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r10782 r11254 124 124 """Get the icon URL. 125 125 """ 126 static = self.view.static 127 if static is None or static.get(self.icon, None) is None: 128 # In derived classes defined in other modules/packages 129 # than w.k.browser, ``static`` might refer to a static dir 130 # local to the derived class' module. As we often like to 131 # get the icons from here 132 # (i.e. waeup.kofa.browser/static), we set the directory 133 # resource appropiately. 134 # 135 # XXX: The hardcoding of 'w.k.browser' should be replaced 136 # by something smarter. 137 # 138 # TODO: notes in here should go to general documentation. 139 static = queryAdapter( 140 self.request, Interface, name='waeup.kofa.browser') 141 return static[self.icon]() 126 return '/static/img/%s' % self.icon 142 127 143 128 @property -
main/waeup.kofa/trunk/src/waeup/kofa/frontpage.html
r9374 r11254 1 1 <h1>Welcome to WAeUP.Kofa 2 2 <br> 3 < small>3 <p class="kofa-content-desc"> 4 4 the Information and Registration Portal 5 5 for Schools, Colleges and Universities 6 </ small>6 </p> 7 7 </h1> 8 8 -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
r10771 r11254 26 26 NullValidator) 27 27 from waeup.kofa.browser.breadcrumbs import Breadcrumb 28 from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning29 28 from waeup.kofa.browser.layout import default_primary_nav_template 30 29 from waeup.kofa.browser.pages import delSubobjects … … 134 133 _('Clear all hostels'), 135 134 _('Remove selected')] 136 137 def update(self):138 tabs.need()139 self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''140 qs = self.request.get('QUERY_STRING', '')141 if not qs:142 qs = 'tab1'143 setattr(self, qs, 'active')144 warning.need()145 datatable.need()146 return super(HostelsContainerManagePage, self).update()147 135 148 136 # It's quite dangerous to remove entire hostels with its content (beds). … … 167 155 return 168 156 169 @jsaction(_('Clear all hostels') )157 @jsaction(_('Clear all hostels'), style='danger') 170 158 def clearHostels(self, **data): 171 159 self.context.clearAllHostels() 172 160 self.flash(_('All hostels cleared.')) 173 161 write_log_message(self, 'all hostels cleared') 174 self.redirect(self.url(self.context, '@@manage')+' ?tab2')162 self.redirect(self.url(self.context, '@@manage')+'#tab2') 175 163 return 176 164 … … 201 189 self.context.addHostel(hostel) 202 190 except KeyError: 203 self.flash(_('The hostel already exists.') )191 self.flash(_('The hostel already exists.'), type='warning') 204 192 return 205 193 self.flash(_('Hostel created.')) … … 251 239 return self.url(grok.getSite(),'students') 252 240 253 def update(self): 254 datepicker.need() # Enable jQuery datepicker in date fields. 255 tabs.need() 256 datatable.need() 257 warning.need() 258 self.tab1 = self.tab2 = '' 259 qs = self.request.get('QUERY_STRING', '') 260 if not qs: 261 qs = 'tab1' 262 setattr(self, qs, 'active') 263 super(HostelManageFormPage, self).update() 264 return 265 266 @action(_('Save')) 241 @action(_('Save'), style='primary') 267 242 def save(self, **data): 268 243 msave(self, **data) 269 244 return 270 245 271 @action(_('Update all beds') )246 @action(_('Update all beds'), style='primary') 272 247 def updateBeds(self, **data): 273 248 removed, added, modified, modified_beds = self.context.updateBeds() … … 280 255 self.flash(flash_message) 281 256 write_log_message(self, message) 282 self.redirect(self.url(self.context, '@@manage')+' ?tab2')257 self.redirect(self.url(self.context, '@@manage')+'#tab2') 283 258 return 284 259 … … 289 264 child_id = form['val_id'] 290 265 else: 291 self.flash(_('No item selected.') )292 self.redirect(self.url(self.context, '@@manage')+' ?tab2')266 self.flash(_('No item selected.'), type='warning') 267 self.redirect(self.url(self.context, '@@manage')+'#tab2') 293 268 return 294 269 if not isinstance(child_id, list): … … 310 285 mapping = {'a':m_translated})) 311 286 write_log_message(self, 'switched: %s' % message) 312 self.redirect(self.url(self.context, '@@manage')+' ?tab2')287 self.redirect(self.url(self.context, '@@manage')+'#tab2') 313 288 return 314 289 … … 319 294 child_id = form['val_id'] 320 295 else: 321 self.flash(_('No item selected.') )322 self.redirect(self.url(self.context, '@@manage')+' ?tab2')296 self.flash(_('No item selected.'), type='warning') 297 self.redirect(self.url(self.context, '@@manage')+'#tab2') 323 298 return 324 299 if not isinstance(child_id, list): … … 334 309 mapping = {'a':message})) 335 310 write_log_message(self, 'released: %s' % message) 336 self.redirect(self.url(self.context, '@@manage')+' ?tab2')311 self.redirect(self.url(self.context, '@@manage')+'#tab2') 337 312 else: 338 self.flash(_('No allocated bed selected.') )339 self.redirect(self.url(self.context, '@@manage')+' ?tab2')340 return 341 342 @jsaction(_('Clear hostel') )313 self.flash(_('No allocated bed selected.'), type='warning') 314 self.redirect(self.url(self.context, '@@manage')+'#tab2') 315 return 316 317 @jsaction(_('Clear hostel'), style='danger') 343 318 def clearHostel(self, **data): 344 319 self.context.clearHostel() 345 320 self.flash(_('Hostel cleared.')) 346 321 write_log_message(self, 'cleared') 347 self.redirect(self.url(self.context, '@@manage')+' ?tab2')322 self.redirect(self.url(self.context, '@@manage')+'#tab2') 348 323 return 349 324 … … 362 337 def save(self, **data): 363 338 if data['owner'] == NOT_OCCUPIED: 364 self.flash(_('No valid student id.') )339 self.flash(_('No valid student id.'), type='warning') 365 340 self.redirect(self.url(self.context)) 366 341 return 367 342 msave(self, **data) 368 self.redirect(self.url(self.context.__parent__, '@@manage')+' ?tab2')343 self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2') 369 344 return 370 345 … … 374 349 # Beds must be released first before they can be allocated to 375 350 # other students. 376 self.redirect(self.url(self.context.__parent__, '@@manage')+' ?tab2')377 return 351 self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2') 352 return -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt
r8685 r11254 4 4 5 5 6 <ul class="tabs " data-tabs="tabs">7 <li tal:attributes="class view/tab1">8 <a href="#tab-1">9 <span i18n:translate="">Settings10 </ span></a>6 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 7 <li class="active"> 8 <a href="#tab1" data-toggle="tab" i18n:translate=""> 9 Settings 10 </a> 11 11 </li> 12 <li tal:attributes="class view/tab2"> 13 <a href="#tab-2" i18n:translate="">Hostels</a> 12 <li> 13 <a href="#tab2" data-toggle="tab" i18n:translate=""> 14 Hostels 15 </a> 14 16 </li> 15 17 </ul> 16 18 17 19 <div class="tab-content"> 18 <div id="tab-1" tal:attributes="class view/tab1"> 20 <div id="tab1" class="active tab-pane"> 21 <br /> 19 22 <table class="form-table"> 20 23 <tbody> … … 29 32 </div> 30 33 </div> 31 <div id="tab-2" tal:attributes="class view/tab2"> <br /> 32 <table class="display dataTableManage"> 34 <div id="tab2" class="tab-pane"> 35 <br /> 36 <table class="kofa-data-table dataTableManage"> 33 37 <thead> 34 38 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt
r10674 r11254 16 16 </table> 17 17 18 <table i18n:domain="waeup.kofa" >18 <table i18n:domain="waeup.kofa" class="table"> 19 19 <thead> 20 20 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt
r9534 r11254 2 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"> 6 <span i18n:translate="">Hostel Data</span></a> 4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab"> 7 <span i18n:translate="">Hostel Data</span> 8 </a> 7 9 </li> 8 <li tal:attributes="class view/tab2"><a href="#tab-2"> 9 <span i18n:translate="">Beds</span></a> 10 <li> 11 <a href="#tab2" data-toggle="tab"> 12 <span i18n:translate="">Beds</span> 13 </a> 10 14 </li> 11 15 </ul> 12 16 13 17 <div class="tab-content"> 14 <div id="tab-1" tal:attributes="class view/tab1"> 18 <div id="tab1" class="active tab-pane"> 19 <br /> 15 20 <table class="form-table"> 16 21 <tbody> … … 37 42 </div> 38 43 39 <div id="tab -2" tal:attributes="class view/tab2">40 < h3>Beds</h3>41 <table class=" displaydataTableManage">42 <thead>43 <tr>44 <th> </th>45 <th i18n:translate="">Id</th>46 <th i18n:translate="">Type</th>47 <th i18n:translate="">Number</th>48 <th i18n:translate="">Owner</th>49 </tr>50 </thead>51 <tbody>52 <tr tal:repeat="value context/values">53 <td>54 <input type="checkbox" name="val_id"55 tal:attributes="value value/__name__" />56 </td>57 <td tal:content="value/bed_id">ID</td>58 <td tal:content="value/bed_type">TYPE</td>59 <td tal:content="value/bed_number">NUMBER</td>60 <td>61 <a tal:condition="python: value.owner != view.not_occupied"62 tal:attributes="href python: '%s/%s/accommodation' %63 (view.students_url,value.owner)">64 <span tal:content="value/owner">OWNER</span>65 </a>66 <a tal:condition="python: value.owner == view.not_occupied"67 tal:attributes="href python: view.url(value)"68 i18n:translate="">69 [allocate student]70 </a>71 </td>72 </tr>73 </tbody>44 <div id="tab2" class="tab-pane"> 45 <br /> 46 <table class="kofa-data-table dataTableManage"> 47 <thead> 48 <tr> 49 <th> </th> 50 <th i18n:translate="">Id</th> 51 <th i18n:translate="">Type</th> 52 <th i18n:translate="">Number</th> 53 <th i18n:translate="">Owner</th> 54 </tr> 55 </thead> 56 <tbody> 57 <tr tal:repeat="value context/values"> 58 <td> 59 <input type="checkbox" name="val_id" 60 tal:attributes="value value/__name__" /> 61 </td> 62 <td tal:content="value/bed_id">ID</td> 63 <td tal:content="value/bed_type">TYPE</td> 64 <td tal:content="value/bed_number">NUMBER</td> 65 <td> 66 <a tal:condition="python: value.owner != view.not_occupied" 67 tal:attributes="href python: '%s/%s/accommodation' % 68 (view.students_url,value.owner)"> 69 <span tal:content="value/owner">OWNER</span> 70 </a> 71 <a tal:condition="python: value.owner == view.not_occupied" 72 tal:attributes="href python: view.url(value)" 73 i18n:translate=""> 74 [allocate student] 75 </a> 76 </td> 77 </tr> 78 </tbody> 74 79 </table> 75 80 -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
r10683 r11254 368 368 self.browser.open(self.container_path + '/hall-1/hall-1_A_101_A') 369 369 self.assertEqual(self.browser.url, 370 self.container_path + '/hall-1/@@manage ?tab2')370 self.container_path + '/hall-1/@@manage#tab2') 371 371 # Updating the beds again will not affect the allocation and also 372 372 # the bed numbering remains the same -
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r10680 r11254 585 585 ) 586 586 587 skin = schema.Choice(588 title = _(u'Skin'),589 default = u'gray waeup theme',590 vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary',591 required = True,592 )593 594 587 frontpage = schema.Text( 595 588 title = _(u'Content in HTML format'), -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r10706 r11254 39 39 from waeup.kofa.browser.breadcrumbs import Breadcrumb 40 40 from waeup.kofa.browser.pages import ContactAdminForm, ExportCSVView, doll_up 41 from waeup.kofa.browser.resources import (42 datepicker, datatable, tabs, warning, toggleall)43 41 from waeup.kofa.browser.layout import jsaction, action, UtilityView 44 42 from waeup.kofa.browser.interfaces import ICaptchaManager … … 107 105 """Flash a lock message. 108 106 """ 109 view.flash(_('The requested form is locked (read-only).') )107 view.flash(_('The requested form is locked (read-only).'), type="warning") 110 108 view.redirect(view.url(view.context)) 111 109 return … … 122 120 value._p_activate() 123 121 value_dict = dict([i for i in value.__dict__.items()]) 122 value_dict['url'] = view.url(value) 124 123 value_dict['removable_by_student'] = value.removable_by_student 125 124 value_dict['mandatory'] = translate(str(value.mandatory), 'zope', … … 155 154 view.flash(_( 156 155 'Total credits exceed ${a}.', 157 mapping = {'a': max_credits}) )156 mapping = {'a': max_credits}), type="warning") 158 157 return False 159 158 try: 160 159 view.context.addCourseTicket(ticket, course) 161 160 except KeyError: 162 view.flash(_('The ticket exists.') )161 view.flash(_('The ticket exists.'), type="warning") 163 162 return False 164 163 view.flash(_('Successfully added ${a}.', … … 258 257 grok.require('waeup.viewStudentsContainer') 259 258 grok.template('containerpage') 260 label = _(' Student Section')259 label = _('Find students') 261 260 search_button = _('Find student(s)') 262 261 pnav = 4 263 262 264 263 def update(self, *args, **kw): 265 datatable.need()266 264 form = self.request.form 267 265 self.hitlist = [] … … 280 278 else: 281 279 if 'search' in form: 282 self.flash(_('Empty search string') )280 self.flash(_('Empty search string'), type="warning") 283 281 return 284 282 if self.searchtype == 'current_session': … … 286 284 self.searchterm = int(self.searchterm) 287 285 except ValueError: 288 self.flash(_('Only year dates allowed (e.g. 2011).')) 286 self.flash(_('Only year dates allowed (e.g. 2011).'), 287 type="danger") 289 288 return 290 289 self.hitlist = search(query=self.searchterm, 291 290 searchtype=self.searchtype, view=self) 292 291 if not self.hitlist: 293 self.flash(_('No student found.') )292 self.flash(_('No student found.'), type="warning") 294 293 return 295 294 … … 307 306 308 307 def update(self, *args, **kw): 309 datatable.need()310 toggleall.need()311 warning.need()312 308 form = self.request.form 313 309 self.hitlist = [] … … 323 319 else: 324 320 if 'search' in form: 325 self.flash(_('Empty search string') )321 self.flash(_('Empty search string'), type="warning") 326 322 return 327 323 if self.searchtype == 'current_session': … … 329 325 self.searchterm = int(self.searchterm) 330 326 except ValueError: 331 self.flash('Only year dates allowed (e.g. 2011).') 327 self.flash(_('Only year dates allowed (e.g. 2011).'), 328 type="danger") 332 329 return 333 330 if not 'entries' in form: … … 335 332 searchtype=self.searchtype, view=self) 336 333 if not self.hitlist: 337 self.flash(_('No student found.') )334 self.flash(_('No student found.'), type="warning") 338 335 if 'remove' in form: 339 self.flash(_('No item selected.') )336 self.flash(_('No item selected.'), type="warning") 340 337 return 341 338 entries = form['entries'] … … 495 492 self.flash(_('Your message has been sent.')) 496 493 else: 497 self.flash(_('An smtp server error occurred.') )494 self.flash(_('An smtp server error occurred.'), type="danger") 498 495 return 499 496 … … 535 532 536 533 def update(self): 537 datepicker.need() # Enable jQuery datepicker in date fields.538 tabs.need()539 self.tab1 = self.tab2 = ''540 qs = self.request.get('QUERY_STRING', '')541 if not qs:542 qs = 'tab1'543 setattr(self, qs, 'active')544 534 super(StudentBaseManageFormPage, self).update() 545 535 self.wf_info = IWorkflowInfo(self.context) … … 555 545 errors = validator.validate_password(password, password_ctl) 556 546 if errors: 557 self.flash( ' '.join(errors) )547 self.flash( ' '.join(errors), type="danger") 558 548 return 559 549 changed_fields = self.applyData(self.context, **data) … … 764 754 return form_fields 765 755 766 def update(self):767 datepicker.need() # Enable jQuery datepicker in date fields.768 tabs.need()769 self.tab1 = self.tab2 = ''770 qs = self.request.get('QUERY_STRING', '')771 if not qs:772 qs = 'tab1'773 setattr(self, qs, 'active')774 return super(StudentClearanceManageFormPage, self).update()775 776 756 @action(_('Save'), style='primary') 777 757 def save(self, **data): … … 795 775 self.flash(_('Student has been cleared.')) 796 776 else: 797 self.flash(_('Student is in wrong state.') )777 self.flash(_('Student is in wrong state.'), type="warning") 798 778 self.redirect(self.url(self.context,'view_clearance')) 799 779 return … … 814 794 def update(self): 815 795 if clearance_disabled_message(self.context): 816 self.flash(clearance_disabled_message(self.context) )796 self.flash(clearance_disabled_message(self.context), type="warning") 817 797 self.redirect(self.url(self.context,'view_clearance')) 818 798 return … … 824 804 IWorkflowInfo(self.context).fireTransition('reset4') 825 805 message = _('Clearance has been annulled.') 826 self.flash(message )806 self.flash(message, type="warning") 827 807 elif self.context.state == REQUESTED: 828 808 IWorkflowInfo(self.context).fireTransition('reset3') 829 809 message = _('Clearance request has been rejected.') 830 self.flash(message )831 else: 832 self.flash(_('Student is in wrong state.') )810 self.flash(message, type="warning") 811 else: 812 self.flash(_('Student is in wrong state.'), type="warning") 833 813 self.redirect(self.url(self.context,'view_clearance')) 834 814 return … … 987 967 return 988 968 super(StudyCourseManageFormPage, self).update() 989 tabs.need()990 self.tab1 = self.tab2 = ''991 qs = self.request.get('QUERY_STRING', '')992 if not qs:993 qs = 'tab1'994 setattr(self, qs, 'active')995 warning.need()996 datatable.need()997 969 return 998 970 … … 1003 975 except ConstraintNotSatisfied: 1004 976 # The selected level might not exist in certificate 1005 self.flash(_('Current level not available for certificate.')) 977 self.flash(_('Current level not available for certificate.'), 978 type="warning") 1006 979 return 1007 980 notify(grok.ObjectModifiedEvent(self.context.__parent__)) … … 1023 996 yield(dict(code=code, title=title)) 1024 997 1025 @action(_('Add study level') )998 @action(_('Add study level'), style='primary') 1026 999 def addStudyLevel(self, **data): 1027 1000 level_code = self.request.form.get('addlevel', None) 1028 1001 level_session = self.request.form.get('level_session', None) 1029 1002 if not level_session: 1030 self.flash(_('You must select a session for the level.')) 1031 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 1003 self.flash(_('You must select a session for the level.'), 1004 type="warning") 1005 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1032 1006 return 1033 1007 studylevel = createObject(u'waeup.StudentStudyLevel') … … 1039 1013 self.flash(_('Study level has been added.')) 1040 1014 except KeyError: 1041 self.flash(_('This level exists.') )1042 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1015 self.flash(_('This level exists.'), type="warning") 1016 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1043 1017 return 1044 1018 … … 1049 1023 child_id = form['val_id'] 1050 1024 else: 1051 self.flash(_('No study level selected.') )1052 self.redirect(self.url(self.context, '@@manage')+' ?tab2')1025 self.flash(_('No study level selected.'), type="warning") 1026 self.redirect(self.url(self.context, '@@manage')+'#tab2') 1053 1027 return 1054 1028 if not isinstance(child_id, list): … … 1063 1037 self.context.writeLogMessage( 1064 1038 self,'removed: %s' % ', '.join(deleted)) 1065 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1039 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1066 1040 return 1067 1041 … … 1082 1056 def update(self, SUBMIT=None): 1083 1057 super(StudentTranscriptRequestPage, self).update() 1084 tabs.need()1085 self.tab1 = self.tab2 = ''1086 qs = self.request.get('QUERY_STRING', '')1087 if not qs:1088 qs = 'tab1'1089 setattr(self, qs, 'active')1090 1058 if not self.context.state == GRADUATED: 1091 self.flash(_("Wrong state") )1059 self.flash(_("Wrong state"), type="danger") 1092 1060 self.redirect(self.url(self.context)) 1093 1061 return … … 1106 1074 code = get_access_code(pin) 1107 1075 if not code: 1108 self.flash(_('Activation code is invalid.') )1076 self.flash(_('Activation code is invalid.'), type="warning") 1109 1077 return 1110 1078 if code.state == USED: 1111 self.flash(_('Activation code has already been used.')) 1079 self.flash(_('Activation code has already been used.'), 1080 type="warning") 1112 1081 return 1113 1082 # Mark pin as used (this also fires a pin related transition) … … 1117 1086 # expect an exception, but the owner might be different 1118 1087 if not invalidate_accesscode(pin, comment, self.context.student_id): 1119 self.flash(_('You are not the owner of this access code.')) 1088 self.flash(_('You are not the owner of this access code.'), 1089 type="warning") 1120 1090 return 1121 1091 self.context.clr_code = pin … … 1157 1127 def update(self, SUBMIT=None): 1158 1128 super(StudentTranscriptRequestProcessFormPage, self).update() 1159 tabs.need()1160 self.tab1 = self.tab2 = ''1161 qs = self.request.get('QUERY_STRING', '')1162 if not qs:1163 qs = 'tab1'1164 setattr(self, qs, 'active')1165 1129 if self.context.state != TRANSCRIPT: 1166 self.flash(_('Student is in wrong state.') )1130 self.flash(_('Student is in wrong state.'), type="warning") 1167 1131 self.redirect(self.url(self.context)) 1168 1132 return … … 1222 1186 def update(self): 1223 1187 if not self.context.student.transcript_enabled: 1224 self.flash(_('You are not allowed to view the transcript.')) 1188 self.flash(_('You are not allowed to view the transcript.'), 1189 type="warning") 1225 1190 self.redirect(self.url(self.context)) 1226 1191 return … … 1255 1220 def update(self): 1256 1221 if not self.context.student.transcript_enabled: 1257 self.flash(_('You are not allowed to download the transcript.')) 1222 self.flash(_('You are not allowed to download the transcript.'), 1223 type="warning") 1258 1224 self.redirect(self.url(self.context)) 1259 1225 return … … 1319 1285 pnav = 4 1320 1286 1321 def update(self):1322 super(StudentTransferFormPage, self).update()1323 warning.need()1324 return1325 1326 1287 @jsaction(_('Transfer')) 1327 1288 def transferStudent(self, **data): 1328 1289 error = self.context.transfer(**data) 1329 1290 if error == -1: 1330 self.flash(_('Current level does not match certificate levels.')) 1291 self.flash(_('Current level does not match certificate levels.'), 1292 type="warning") 1331 1293 elif error == -2: 1332 self.flash(_('Former study course record incomplete.')) 1294 self.flash(_('Former study course record incomplete.'), 1295 type="warning") 1333 1296 elif error == -3: 1334 self.flash(_('Maximum number of transfers exceeded.')) 1297 self.flash(_('Maximum number of transfers exceeded.'), 1298 type="warning") 1335 1299 else: 1336 1300 self.flash(_('Successfully transferred.')) … … 1347 1311 1348 1312 def update(self): 1349 warning.need()1350 1313 if not self.context.has_key('studycourse_1'): 1351 self.flash(_('No previous transfer.') )1314 self.flash(_('No previous transfer.'), type="warning") 1352 1315 self.redirect(self.url(self.context)) 1353 1316 return … … 1375 1338 def update(self): 1376 1339 super(StudyLevelDisplayFormPage, self).update() 1377 datatable.need()1378 1340 return 1379 1341 … … 1486 1448 tabtwoactions = [_('Add course ticket'), 1487 1449 _('Remove selected tickets'),_('Cancel')] 1450 placeholder = _('Enter valid course code') 1488 1451 1489 1452 def update(self, ADD=None, course=None): … … 1492 1455 return 1493 1456 super(StudyLevelManageFormPage, self).update() 1494 tabs.need()1495 self.tab1 = self.tab2 = ''1496 qs = self.request.get('QUERY_STRING', '')1497 if not qs:1498 qs = 'tab1'1499 setattr(self, qs, 'active')1500 warning.need()1501 datatable.need()1502 1457 if ADD is not None: 1503 1458 if not course: 1504 self.flash(_('No valid course code entered.') )1505 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1459 self.flash(_('No valid course code entered.'), type="warning") 1460 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1506 1461 return 1507 1462 cat = queryUtility(ICatalog, name='courses_catalog') 1508 1463 result = cat.searchResults(code=(course, course)) 1509 1464 if len(result) != 1: 1510 self.flash(_('Course not found.') )1465 self.flash(_('Course not found.'), type="warning") 1511 1466 else: 1512 1467 course = list(result)[0] 1513 1468 addCourseTicket(self, course) 1514 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1469 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1515 1470 return 1516 1471 … … 1539 1494 child_id = form['val_id'] 1540 1495 else: 1541 self.flash(_('No ticket selected.') )1542 self.redirect(self.url(self.context, '@@manage')+' ?tab2')1496 self.flash(_('No ticket selected.'), type="warning") 1497 self.redirect(self.url(self.context, '@@manage')+'#tab2') 1543 1498 return 1544 1499 if not isinstance(child_id, list): … … 1554 1509 self,'removed: %s at %s' % 1555 1510 (', '.join(deleted), self.context.level)) 1556 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1511 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1557 1512 return 1558 1513 … … 1569 1524 return 1570 1525 if str(self.context.__parent__.current_level) != self.context.__name__: 1571 self.flash(_('This level does not correspond current level.')) 1526 self.flash(_('This level does not correspond current level.'), 1527 type="danger") 1572 1528 elif self.context.student.state == REGISTERED: 1573 1529 IWorkflowInfo(self.context.student).fireTransition( … … 1575 1531 self.flash(_('Course list has been validated.')) 1576 1532 else: 1577 self.flash(_('Student is in the wrong state.') )1533 self.flash(_('Student is in the wrong state.'), type="warning") 1578 1534 self.redirect(self.url(self.context)) 1579 1535 return … … 1594 1550 return 1595 1551 if str(self.context.__parent__.current_level) != self.context.__name__: 1596 self.flash(_('This level does not correspond current level.')) 1552 self.flash(_('This level does not correspond current level.'), 1553 type="danger") 1597 1554 self.redirect(self.url(self.context)) 1598 1555 return … … 1606 1563 self.flash(message) 1607 1564 else: 1608 self.flash(_('Student is in the wrong state.') )1565 self.flash(_('Student is in the wrong state.'), type="warning") 1609 1566 self.redirect(self.url(self.context)) 1610 1567 return … … 1634 1591 return 1635 1592 1636 @action(_('Add course ticket') )1593 @action(_('Add course ticket'), style='primary') 1637 1594 def addCourseTicket(self, **data): 1638 1595 course = data['course'] 1639 1596 success = addCourseTicket(self, course) 1640 1597 if success: 1641 self.redirect(self.url(self.context, u'@@manage')+' ?tab2')1598 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1642 1599 return 1643 1600 … … 1719 1676 mapping = {'a':self.context.__parent__.display_fullname}) 1720 1677 1721 def update(self):1722 super(PaymentsManageFormPage, self).update()1723 datatable.need()1724 warning.need()1725 return1726 1727 1678 @jsaction(_('Remove selected tickets')) 1728 1679 def delPaymentTicket(self, **data): … … 1731 1682 child_id = form['val_id'] 1732 1683 else: 1733 self.flash(_('No payment selected.') )1684 self.flash(_('No payment selected.'), type="warning") 1734 1685 self.redirect(self.url(self.context)) 1735 1686 return … … 1783 1734 self.flash( 1784 1735 _('Your current session does not match ' + \ 1785 'accommodation session.') )1736 'accommodation session.'), type="danger") 1786 1737 return 1787 1738 if 'maintenance' in p_category: 1788 1739 current_session = str(student['studycourse'].current_session) 1789 1740 if not current_session in student['accommodation']: 1790 self.flash(_('You have not yet booked accommodation.')) 1741 self.flash(_('You have not yet booked accommodation.'), 1742 type="warning") 1791 1743 return 1792 1744 students_utils = getUtility(IStudentsUtils) … … 1794 1746 p_category, student, previous_session, previous_level) 1795 1747 if error is not None: 1796 self.flash(error )1748 self.flash(error, type="danger") 1797 1749 return 1798 1750 self.context[payment.p_id] = payment … … 1817 1769 def update(self): 1818 1770 if self.context.student.before_payment: 1819 self.flash(_("No previous payment to be made.") )1771 self.flash(_("No previous payment to be made."), type="warning") 1820 1772 self.redirect(self.url(self.context)) 1821 1773 super(PreviousPaymentAddFormPage, self).update() … … 1832 1784 p_category, student, previous_session, previous_level) 1833 1785 if error is not None: 1834 self.flash(error )1786 self.flash(error, type="danger") 1835 1787 return 1836 1788 self.context[payment.p_id] = payment … … 1865 1817 balance_level, balance_amount) 1866 1818 if error is not None: 1867 self.flash(error )1819 self.flash(error, type="danger") 1868 1820 return 1869 1821 self.context[payment.p_id] = payment … … 1989 1941 mapping = {'a':self.context.__parent__.display_fullname}) 1990 1942 1991 def update(self):1992 super(AccommodationManageFormPage, self).update()1993 datatable.need()1994 warning.need()1995 return1996 1997 1943 @jsaction(_('Remove selected')) 1998 1944 def delBedTickets(self, **data): 1999 1945 if getattr(self.request.principal, 'user_type', None) == 'student': 2000 self.flash(_('You are not allowed to remove bed tickets.')) 1946 self.flash(_('You are not allowed to remove bed tickets.'), 1947 type="warning") 2001 1948 self.redirect(self.url(self.context)) 2002 1949 return … … 2005 1952 child_id = form['val_id'] 2006 1953 else: 2007 self.flash(_('No bed ticket selected.') )1954 self.flash(_('No bed ticket selected.'), type="warning") 2008 1955 self.redirect(self.url(self.context)) 2009 1956 return … … 2057 2004 enddate, tz).strftime("%d/%m/%Y %H:%M:%S") 2058 2005 self.flash(_("Outside booking period: ${a} - ${b}", 2059 mapping = {'a': startdate, 'b': enddate}) )2006 mapping = {'a': startdate, 'b': enddate}), type="warning") 2060 2007 else: 2061 self.flash(_("Outside booking period.") )2008 self.flash(_("Outside booking period."), type="warning") 2062 2009 self.redirect(self.url(self.context)) 2063 2010 return 2064 2011 if not acc_details: 2065 self.flash(_("Your data are incomplete.") )2012 self.flash(_("Your data are incomplete."), type="warning") 2066 2013 self.redirect(self.url(self.context)) 2067 2014 return 2068 2015 if not student.state in acc_details['allowed_states']: 2069 self.flash(_("You are in the wrong registration state.")) 2016 self.flash(_("You are in the wrong registration state."), 2017 type="warning") 2070 2018 self.redirect(self.url(self.context)) 2071 2019 return … … 2073 2021 'booking_session']: 2074 2022 self.flash( 2075 _('Your current session does not match accommodation session.')) 2023 _('Your current session does not match accommodation session.'), 2024 type="warning") 2076 2025 self.redirect(self.url(self.context)) 2077 2026 return … … 2079 2028 self.flash( 2080 2029 _('You already booked a bed space in current ' \ 2081 + 'accommodation session.') )2030 + 'accommodation session.'), type="warning") 2082 2031 self.redirect(self.url(self.context)) 2083 2032 return … … 2091 2040 code = get_access_code(pin) 2092 2041 if not code: 2093 self.flash(_('Activation code is invalid.') )2042 self.flash(_('Activation code is invalid.'), type="warning") 2094 2043 return 2095 2044 # Search and book bed … … 2103 2052 # XXX: Can be remove if nobody complains. 2104 2053 if bed.__parent__.__parent__ is None: 2105 self.flash(_('System error: Please contact the adminsitrator.')) 2054 self.flash(_('System error: Please contact the adminsitrator.'), 2055 type="danger") 2106 2056 self.context.writeLogMessage(self, 'fatal error: %s' % bed.bed_id) 2107 2057 return … … 2118 2068 # XXX: Can be remove if nobody complains. 2119 2069 if bed.__parent__.__parent__ is None: 2120 self.flash(_('System error: Please contact the adminsitrator.')) 2070 self.flash(_('System error: Please contact the adminsitrator.'), 2071 type="warning") 2121 2072 self.context.writeLogMessage(self, 'fatal error: %s' % bed.bed_id) 2122 2073 return … … 2124 2075 else: 2125 2076 self.flash(_('There is no free bed in your category ${a}.', 2126 mapping = {'a':acc_details['bt']}) )2077 mapping = {'a':acc_details['bt']}), type="warning") 2127 2078 return 2128 2079 if self.with_ac: 2129 2080 # Mark pin as used (this also fires a pin related transition) 2130 2081 if code.state == USED: 2131 self.flash(_('Activation code has already been used.')) 2082 self.flash(_('Activation code has already been used.'), 2083 type="warning") 2132 2084 return 2133 2085 else: … … 2137 2089 if not invalidate_accesscode( 2138 2090 pin,comment,self.context.student.student_id): 2139 self.flash(_('You are not the owner of this access code.')) 2091 self.flash(_('You are not the owner of this access code.'), 2092 type="warning") 2140 2093 return 2141 2094 # Create bed ticket … … 2231 2184 if self.context.bed != None and \ 2232 2185 'reserved' in self.context.bed.bed_type: 2233 self.flash(_("Students in reserved beds can't be relocated.")) 2186 self.flash(_("Students in reserved beds can't be relocated."), 2187 type="warning") 2234 2188 self.redirect(self.url(self.context)) 2235 2189 return … … 2237 2191 self.context.bed != None and \ 2238 2192 self.context.bed.bed_type == self.context.bed_type: 2239 self.flash(_("Student can't be relocated.") )2193 self.flash(_("Student can't be relocated."), type="warning") 2240 2194 self.redirect(self.url(self.context)) 2241 2195 return … … 2260 2214 else: 2261 2215 self.flash(_('There is no free bed in your category ${a}.', 2262 mapping = {'a':acc_details['bt']}) )2216 mapping = {'a':acc_details['bt']}), type="warning") 2263 2217 self.redirect(self.url(self.context)) 2264 2218 return … … 2343 2297 self.flash(_('Password changed.')) 2344 2298 else: 2345 self.flash( ' '.join(errors) )2299 self.flash( ' '.join(errors), type="warning") 2346 2300 return 2347 2301 … … 2391 2345 def update(self, SUBMIT=None): 2392 2346 if not self.context.state == ADMITTED: 2393 self.flash(_("Wrong state") )2347 self.flash(_("Wrong state"), type="warning") 2394 2348 self.redirect(self.url(self.context)) 2395 2349 return 2396 2350 if not self.portrait_uploaded: 2397 self.flash(_("No portrait uploaded.") )2351 self.flash(_("No portrait uploaded."), type="warning") 2398 2352 self.redirect(self.url(self.context, 'change_portrait')) 2399 2353 return 2400 2354 if not self.all_required_fields_filled: 2401 self.flash(_("Not all required fields filled.") )2355 self.flash(_("Not all required fields filled."), type="warning") 2402 2356 self.redirect(self.url(self.context, 'edit_base')) 2403 2357 return … … 2411 2365 code = get_access_code(pin) 2412 2366 if not code: 2413 self.flash(_('Activation code is invalid.') )2367 self.flash(_('Activation code is invalid.'), type="warning") 2414 2368 return 2415 2369 if code.state == USED: 2416 self.flash(_('Activation code has already been used.')) 2370 self.flash(_('Activation code has already been used.'), 2371 type="warning") 2417 2372 return 2418 2373 # Mark pin as used (this also fires a pin related transition) … … 2422 2377 # expect an exception, but the owner might be different 2423 2378 if not invalidate_accesscode(pin, comment, self.context.student_id): 2424 self.flash(_('You are not the owner of this access code.')) 2379 self.flash(_('You are not the owner of this access code.'), 2380 type="warning") 2425 2381 return 2426 2382 self.context.clr_code = pin … … 2469 2425 self.applyData(self.context, **data) 2470 2426 if self.dataNotComplete(): 2471 self.flash(self.dataNotComplete() )2427 self.flash(self.dataNotComplete(), type="warning") 2472 2428 return 2473 2429 self.flash(_('Clearance form has been saved.')) … … 2482 2438 # This shouldn't happen, but the application officer 2483 2439 # might have forgotten to lock the form after changing the state 2484 self.flash(_('This form cannot be submitted. Wrong state!')) 2440 self.flash(_('This form cannot be submitted. Wrong state!'), 2441 type="danger") 2485 2442 return 2486 2443 IWorkflowInfo(self.context).fireTransition('request_clearance') … … 2510 2467 pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number) 2511 2468 if self.context.clr_code and self.context.clr_code != pin: 2512 self.flash(_("This isn't your CLR access code.") )2469 self.flash(_("This isn't your CLR access code."), type="danger") 2513 2470 return 2514 2471 state = IWorkflowState(self.context).getState() … … 2516 2473 # This shouldn't happen, but the application officer 2517 2474 # might have forgotten to lock the form after changing the state 2518 self.flash(_('This form cannot be submitted. Wrong state!')) 2475 self.flash(_('This form cannot be submitted. Wrong state!'), 2476 type="danger") 2519 2477 return 2520 2478 IWorkflowInfo(self.context).fireTransition('request_clearance') … … 2541 2499 super(StartSessionPage, self).update() 2542 2500 if not self.context.next_session_allowed: 2543 self.flash(_("You are not entitled to start session.")) 2501 self.flash(_("You are not entitled to start session."), 2502 type="warning") 2544 2503 self.redirect(self.url(self.context)) 2545 2504 return … … 2553 2512 code = get_access_code(pin) 2554 2513 if not code: 2555 self.flash(_('Activation code is invalid.') )2514 self.flash(_('Activation code is invalid.'), type="warning") 2556 2515 return 2557 2516 # Mark pin as used (this also fires a pin related transition) 2558 2517 if code.state == USED: 2559 self.flash(_('Activation code has already been used.')) 2518 self.flash(_('Activation code has already been used.'), 2519 type="warning") 2560 2520 return 2561 2521 else: … … 2565 2525 if not invalidate_accesscode( 2566 2526 pin,comment,self.context.student.student_id): 2567 self.flash(_('You are not the owner of this access code.')) 2527 self.flash(_('You are not the owner of this access code.'), 2528 type="warning") 2568 2529 return 2569 2530 try: … … 2578 2539 'pay_pg_fee') 2579 2540 except ConstraintNotSatisfied: 2580 self.flash(_('An error occurred, please contact the system administrator.')) 2541 self.flash(_('An error occurred, please contact the system administrator.'), 2542 type="danger") 2581 2543 return 2582 2544 self.flash(_('Session started.')) … … 2607 2569 if self.context.student.state != PAID: 2608 2570 emit_lock_message(self) 2571 return 2572 code = self.context.current_level 2573 if code is None: 2574 self.flash(_('Your data are incomplete'), type="danger") 2575 self.redirect(self.url(self.context)) 2609 2576 return 2610 2577 super(AddStudyLevelFormPage, self).update() … … 2620 2587 self.context.certificate,studylevel) 2621 2588 except KeyError: 2622 self.flash(_('This level exists.') )2589 self.flash(_('This level exists.'), type="warning") 2623 2590 except RequiredMissing: 2624 self.flash(_('Your data are incomplete') )2591 self.flash(_('Your data are incomplete'), type="danger") 2625 2592 self.redirect(self.url(self.context)) 2626 2593 return … … 2646 2613 return 2647 2614 super(StudyLevelEditFormPage, self).update() 2648 datatable.need()2649 warning.need()2650 2615 if ADD is not None: 2651 2616 if not course: 2652 self.flash(_('No valid course code entered.') )2617 self.flash(_('No valid course code entered.'), type="warning") 2653 2618 return 2654 2619 cat = queryUtility(ICatalog, name='courses_catalog') 2655 2620 result = cat.searchResults(code=(course, course)) 2656 2621 if len(result) != 1: 2657 self.flash(_('Course not found.') )2622 self.flash(_('Course not found.'), type="warning") 2658 2623 return 2659 2624 course = list(result)[0] … … 2679 2644 child_id = form['val_id'] 2680 2645 else: 2681 self.flash(_('No ticket selected.') )2646 self.flash(_('No ticket selected.'), type="warning") 2682 2647 self.redirect(self.url(self.context, '@@edit')) 2683 2648 return … … 2710 2675 self.flash(_( 2711 2676 "You are a postgraduate student, " 2712 "your course list can't bee registered.") )2677 "your course list can't bee registered."), type="warning") 2713 2678 self.redirect(self.url(self.context)) 2714 2679 return … … 2717 2682 if self.context.total_credits > max_credits: 2718 2683 self.flash(_('Maximum credits of ${a} exceeded.', 2719 mapping = {'a':max_credits}) )2684 mapping = {'a':max_credits}), type="warning") 2720 2685 return 2721 2686 IWorkflowInfo(self.context.student).fireTransition( … … 2776 2741 searchtype='reg_number', view=self) 2777 2742 if not hitlist: 2778 self.flash(_('No student found.') )2743 self.flash(_('No student found.'), type="warning") 2779 2744 return 2780 2745 if len(hitlist) != 1: # Cannot happen but anyway 2781 self.flash(_('More than one student found.') )2746 self.flash(_('More than one student found.'), type="warning") 2782 2747 return 2783 2748 student = hitlist[0].context … … 2787 2752 code = get_access_code(pin) 2788 2753 if not code: 2789 self.flash(_('Access code is invalid.') )2754 self.flash(_('Access code is invalid.'), type="warning") 2790 2755 return 2791 2756 if student_pw and pin == student.adm_code: … … 2797 2762 self.flash( 2798 2763 _('Password has already been set. You are using the ' + 2799 'wrong Access Code.') )2764 'wrong Access Code.'), type="warning") 2800 2765 return 2801 2766 # Mark pin as used (this also fires a pin related transition) 2802 2767 # and set student password 2803 2768 if code.state == USED: 2804 self.flash(_('Access code has already been used.') )2769 self.flash(_('Access code has already been used.'), type="warning") 2805 2770 return 2806 2771 else: … … 2860 2825 student = results[0] 2861 2826 if getattr(student,'firstname',None) is None: 2862 self.flash(_('An error occurred.') )2827 self.flash(_('An error occurred.'), type="danger") 2863 2828 return 2864 2829 elif student.firstname.lower() != firstname.lower(): … … 2866 2831 # know that a record was found and only the firstname 2867 2832 # verification failed. 2868 self.flash(_('No student record found.') )2833 self.flash(_('No student record found.'), type="warning") 2869 2834 return 2870 2835 elif student.password is not None and self._pw_used: 2871 2836 self.flash(_('Your password has already been set and used. ' 2872 'Please proceed to the login page.')) 2837 'Please proceed to the login page.'), 2838 type="warning") 2873 2839 return 2874 2840 # Store email address but nothing else. … … 2877 2843 else: 2878 2844 # No record found, this is the truth. 2879 self.flash(_('No student record found.') )2845 self.flash(_('No student record found.'), type="warning") 2880 2846 return 2881 2847 … … 2965 2931 2966 2932 def update(self, SHOW=None, session=None, level=None): 2967 datatable.need()2968 2933 self.parent_url = self.url(self.context.__parent__) 2969 2934 self._set_session_values() … … 2988 2953 self.hitlist = self._searchCatalog(self.session, self.level) 2989 2954 if not self.hitlist: 2990 self.flash(_('No student found.') )2955 self.flash(_('No student found.'), type="warning") 2991 2956 return 2992 2957 … … 3073 3038 'configuration'].current_academic_session 3074 3039 if self.context.__parent__.__parent__.score_editing_disabled: 3075 self.flash(_('Score editing disabled.') )3040 self.flash(_('Score editing disabled.'), type="warning") 3076 3041 self.redirect(self.url(self.context)) 3077 3042 return 3078 3043 if not self.current_academic_session: 3079 self.flash(_('Current academic session not set.') )3044 self.flash(_('Current academic session not set.'), type="warning") 3080 3045 self.redirect(self.url(self.context)) 3081 3046 return 3082 datatable.need()3083 3047 self.tickets = self._searchCatalog(self.current_academic_session) 3084 3048 editable_tickets = [ 3085 3049 ticket for ticket in self.tickets if ticket.editable_by_lecturer] 3086 3050 if not self.tickets: 3087 self.flash(_('No student found.') )3051 self.flash(_('No student found.'), type="warning") 3088 3052 self.redirect(self.url(self.context)) 3089 3053 return … … 3115 3079 if error: 3116 3080 self.flash(_('Error: Score(s) of %s have not be updated. ' 3117 'Only integers are allowed.' % error.strip(', '))) 3081 'Only integers are allowed.' % error.strip(', ')), 3082 type="danger") 3118 3083 return 3119 3084 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/accommodationmanagepage.pt
r9984 r11254 2 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <table class=" displaydataTableManage">4 <table class="kofa-data-table dataTableManage"> 5 5 <thead> 6 6 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/basemanagepage.pt
r9273 r11254 3 3 autocomplete="off"> 4 4 5 <ul class="tabs" data-tabs="tabs"> 6 <li tal:attributes="class view/tab1"><a href="#tab-1"> 7 <span i18n:translate="">Base Data</span></a></li> 8 <li tal:attributes="class view/tab2"><a href="#tab-2"> 9 <span i18n:translate="">Passport Picture</span></a></li> 5 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 6 <li class="active"> 7 <a href="#tab1" data-toggle="tab"> 8 <span i18n:translate="">Base Data</span></a> 9 </li> 10 <li> 11 <a href="#tab2" data-toggle="tab"> 12 <span i18n:translate="">Passport Picture</span> 13 </a> 14 </li> 10 15 </ul> 11 16 12 17 <div class="tab-content"> 13 <div id="tab-1" tal:attributes="class view/tab1"> 18 <div id="tab1" class="active tab-pane"> 19 <br /> 14 20 <table class="form-table"> 15 21 <tbody> … … 18 24 <td class="fieldname" i18n:translate="">Password:</td> 19 25 <td> 20 <input name="password" type="password" />26 <input name="password" class="form-control" type="password" /> 21 27 </td> 22 28 </tr> … … 24 30 <td class="fieldname" i18n:translate="">Retype Password:</td> 25 31 <td> 26 <input name="control_password" type="password" />32 <input name="control_password" class="form-control" type="password" /> 27 33 </td> 28 34 </tr> … … 38 44 </div> 39 45 40 <div id="tab-2" tal:attributes="class view/tab2"> 46 <div id="tab2" class="tab-pane"> 47 <br /> 41 48 <table class="form-table"> 42 49 <tbody> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/change_password.pt
r8486 r11254 10 10 <td class="fieldname" i18n:translate="">Password:</td> 11 11 <td> 12 <input name="change_password" type="password" />12 <input name="change_password" class="form-control" type="password" /> 13 13 </td> 14 14 </tr> … … 16 16 <td class="fieldname" i18n:translate="">Retype Password:</td> 17 17 <td> 18 <input name="change_password_repeat" type="password" />18 <input name="change_password_repeat" class="form-control" type="password" /> 19 19 </td> 20 20 </tr> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/clearanceeditpage.pt
r7811 r11254 2 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"> 6 <span i18n:translate="">Clearance Data</span></a></li> 7 <li tal:attributes="class view/tab2"><a href="#tab-2"> 8 <span i18n:translate="">Scans</span></a></li> 4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab"> 7 <span i18n:translate="">Clearance Data</span> 8 </a> 9 </li> 10 <li> 11 <a href="#tab2" data-toggle="tab"> 12 <span i18n:translate="">Scans</span> 13 </a> 14 </li> 9 15 </ul> 10 16 <div class="tab-content"> 11 <div id="tab-1" tal:attributes="class view/tab1"> 17 <div id="tab1" class="active tab-pane"> 18 <br /> 12 19 <table class="form-table"> 13 20 <tbody> … … 23 30 </div> 24 31 25 <div id="tab-2" tal:attributes="class view/tab2"> 32 <div id="tab2" class="tab-pane"> 33 <br /> 26 34 <table class="form-table"> 27 35 <tbody> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containermanagepage.pt
r10647 r11254 1 <form method="POST" i18n:domain="waeup.kofa" >1 <form method="POST" i18n:domain="waeup.kofa" class="form-inline"> 2 2 <br /> 3 <input class="btn primary" type="submit" name="search" 4 tal:attributes="value view/search_button" /> 5 6 <select name="searchtype"> 7 <option i18n:translate="" value="student_id">with id</option> 8 <option i18n:translate="" value="fullname">with name</option> 9 <option i18n:translate="" value="reg_number">with registration number</option> 10 <option i18n:translate="" value="matric_number">with matriculation number</option> 11 <option i18n:translate="" value="current_session">in session</option> 12 <option i18n:translate="" value="depcode">in department</option> 13 <option i18n:translate="" value="current_mode">in study mode</option> 14 <option i18n:translate="" value="suspended"> 15 with deactivated account (search term omitted) 16 </option> 17 </select> 18 19 <input type="text" name="searchterm" /> 3 <div class="form-group"> 4 <input class="btn btn-primary" type="submit" name="search" 5 tal:attributes="value view/search_button" /> 6 </div> 7 <div class="form-group"> 8 <select name="searchtype" class="form-control"> 9 <option i18n:translate="" value="student_id">with id</option> 10 <option i18n:translate="" value="fullname">with name</option> 11 <option i18n:translate="" value="reg_number">with registration number</option> 12 <option i18n:translate="" value="matric_number">with matriculation number</option> 13 <option i18n:translate="" value="current_session">in session</option> 14 <option i18n:translate="" value="depcode">in department</option> 15 <option i18n:translate="" value="current_mode">in study mode</option> 16 <option i18n:translate="" value="suspended"> 17 with deactivated account (search term omitted) 18 </option> 19 <option i18n:translate="" value="transcript"> 20 who requested transcript (search term omitted) 21 </option> 22 </select> 23 </div> 24 <div class="form-group"> 25 <input type="text" class="form-control" name="searchterm" /> 26 </div> 20 27 21 28 <p> </p> … … 27 34 tal:attributes="value view/searchtype" /> 28 35 29 <input type="checkbox" onClick="toggle(this, 'entries')" />30 <span i18n:translate="">Select all</span>31 36 <br /><br /> 32 33 <table class="display dataTableManage"> 37 <table class="kofa-data-table dataTableManage"> 34 38 <thead> 35 39 <tr> … … 43 47 </thead> 44 48 <tbody> 45 <tr tal:repeat="item view/hitlist" class="gradeC">49 <tr tal:repeat="item view/hitlist"> 46 50 <td><input type="checkbox" name="entries" 47 51 tal:attributes="value item/context/__name__" /></td> … … 60 64 </tbody> 61 65 </table> 62 66 <input type="checkbox" onClick="toggle(this, 'entries')" /> 67 <span i18n:translate="">Select all</span> 68 <br /><br /> 63 69 <input type="submit" name="remove" 64 tal:attributes="value view/remove_button" class="btn "70 tal:attributes="value view/remove_button" class="btn btn-default" 65 71 onclick="return confirmPost('Are you sure?')"/> 66 72 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containerpage.pt
r10647 r11254 1 <form method="POST" i18n:domain="waeup.kofa" >1 <form method="POST" i18n:domain="waeup.kofa" class="form-inline"> 2 2 <br /> 3 <input class="btn primary" type="submit" name="search" 4 tal:attributes="value view/search_button" /> 5 6 <select name="searchtype"> 7 <option i18n:translate="" value="student_id">with id</option> 8 <option i18n:translate="" value="fullname">with name</option> 9 <option i18n:translate="" value="reg_number">with registration number</option> 10 <option i18n:translate="" value="matric_number">with matriculation number</option> 11 <option i18n:translate="" value="current_session">in session</option> 12 <option i18n:translate="" value="depcode">in department</option> 13 <option i18n:translate="" value="current_mode">in study mode</option> 14 <option i18n:translate="" value="suspended"> 15 with deactivated account (search term omitted) 16 </option> 17 <option i18n:translate="" value="transcript"> 18 who requested transcript (search term omitted) 19 </option> 20 </select> 21 22 <input type="text" name="searchterm" /> 23 24 <p> </p> 25 <div tal:condition="view/hitlist"> 26 <h3 i18n:translate="">Search Results</h3> 27 <input type="hidden" name="old_searchterm" 28 tal:attributes="value view/searchterm" /> 29 <input type="hidden" name="old_searchtype" 30 tal:attributes="value view/searchtype" /> 31 <table class="display dataTable"> 32 <thead> 33 <tr> 34 <th i18n:translate="">Student Id</th> 35 <th i18n:translate="">Reg. Number</th> 36 <th i18n:translate="">Matric. Number</th> 37 <th i18n:translate="">State</th> 38 <th i18n:translate="">Full Name</th> 39 </tr> 40 </thead> 41 <tbody> 42 <tr tal:repeat="item view/hitlist" class="gradeC"> 43 <td> <a tal:attributes="href item/url"> 44 <span tal:content="item/student_id">A123456</span></a> 45 </td> 46 <td class="center"> <a tal:attributes="href item/url"> 47 <span tal:content="item/reg_number">9999999</span></a> 48 </td> 49 <td class="center"> <a tal:attributes="href item/url"> 50 <span tal:content="item/matric_number">9999999</span></a> 51 </td> 52 <td tal:content="item/state">admitted</td> 53 <td tal:content="item/display_fullname">Bob</td> 54 </tr> 55 </tbody> 56 </table> 57 <br /> 3 <div class="form-group"> 4 <input class="btn btn-primary" type="submit" name="search" 5 tal:attributes="value view/search_button" /> 6 </div> 7 <div class="form-group"> 8 <select name="searchtype" class="form-control"> 9 <option i18n:translate="" value="student_id">with id</option> 10 <option i18n:translate="" value="fullname">with name</option> 11 <option i18n:translate="" value="reg_number">with registration number</option> 12 <option i18n:translate="" value="matric_number">with matriculation number</option> 13 <option i18n:translate="" value="current_session">in session</option> 14 <option i18n:translate="" value="depcode">in department</option> 15 <option i18n:translate="" value="current_mode">in study mode</option> 16 <option i18n:translate="" value="suspended"> 17 with deactivated account (search term omitted) 18 </option> 19 <option i18n:translate="" value="transcript"> 20 who requested transcript (search term omitted) 21 </option> 22 </select> 23 </div> 24 <div class="form-group"> 25 <input type="text" class="form-control" name="searchterm" /> 58 26 </div> 59 27 </form> 28 <br /> 29 <div tal:condition="view/hitlist"> 30 <h3 i18n:translate="">Search Results</h3> 31 <input type="hidden" name="old_searchterm" 32 tal:attributes="value view/searchterm" /> 33 <input type="hidden" name="old_searchtype" 34 tal:attributes="value view/searchtype" /> 35 <table class="kofa-data-table dataTable"> 36 <thead> 37 <tr> 38 <th i18n:translate="">Student Id</th> 39 <th i18n:translate="">Reg. Number</th> 40 <th i18n:translate="">Matric. Number</th> 41 <th i18n:translate="">State</th> 42 <th i18n:translate="">Full Name</th> 43 </tr> 44 </thead> 45 <tbody> 46 <tr tal:repeat="item view/hitlist"> 47 <td> <a tal:attributes="href item/url"> 48 <span tal:content="item/student_id">A123456</span></a> 49 </td> 50 <td class="center"> <a tal:attributes="href item/url"> 51 <span tal:content="item/reg_number">9999999</span></a> 52 </td> 53 <td class="center"> <a tal:attributes="href item/url"> 54 <span tal:content="item/matric_number">9999999</span></a> 55 </td> 56 <td tal:content="item/state">admitted</td> 57 <td tal:content="item/display_fullname">Bob</td> 58 </tr> 59 </tbody> 60 </table> 61 </div> 62 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/editscorespage.pt
r10638 r11254 2 2 <br /> 3 3 4 5 <table class="display dataTable"> 4 <table class="kofa-data-table dataTable"> 6 5 <thead> 7 6 <tr> … … 17 16 </thead> 18 17 <tbody> 19 <tr tal:repeat="ticket view/tickets" class="gradeC">18 <tr tal:repeat="ticket view/tickets"> 20 19 <td tal:content="ticket/student/matric_number">MATRIC_NUMBER</td> 21 20 <td tal:condition="ticket/editable_by_lecturer"> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/enterpin.pt
r9952 r11254 8 8 <td> 9 9 <span tal:replace="view/ac_prefix">PIN Prefix</span> - 10 <input name="ac_series" type="text" class="span1"maxlength="3"10 <input name="ac_series" type="text" maxlength="3" 11 11 value="" tal:attributes="value view/ac_series"/> - 12 <input name="ac_number" type="text" class="span3"maxlength="10"12 <input name="ac_number" type="text" maxlength="10" 13 13 value="" tal:attributes="value view/ac_number" /> 14 14 <font color="red"><span tal:replace="view/notice">Notice</span> … … 24 24 <tr> 25 25 <td colspan="2"> 26 <input type="submit" name="SUBMIT" class="btn primary"26 <input type="submit" name="SUBMIT" class="btn btn-primary" 27 27 tal:attributes="value view/buttonname" /> 28 28 </td> … … 36 36 clicking the button below. 37 37 </p> 38 <input type="submit" name="SUBMIT" class="btn primary"38 <input type="submit" name="SUBMIT" class="btn btn-primary" 39 39 tal:attributes="value view/buttonname" /> 40 40 </span> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig.pt
r10390 r11254 1 <p class="alert -messagewarning" i18n:domain="waeup.kofa"1 <p class="alert alert-warning" i18n:domain="waeup.kofa" 2 2 i18n:translate="student_export_warning"> 3 3 <strong>NOTICE:</strong> … … 12 12 <form i18n:domain="waeup.kofa" method="POST"> 13 13 <label for="mode" i18n:translate=""> 14 Exporter (Data Type) :14 Exporter (Data Type) 15 15 </label> 16 <div class="input"> 17 <select name="exporter"> 18 <option tal:repeat="item view/exporters" 19 tal:attributes="value python:item[1]"> 20 <span tal:replace="python: item[0]">Students</span> 21 </option> 22 </select> 23 </div> 16 <select name="exporter" class="form-control half"> 17 <option tal:repeat="item view/exporters" 18 tal:attributes="value python:item[1]"> 19 <span tal:replace="python: item[0]">Students</span> 20 </option> 21 </select> 24 22 <br /> 25 23 <label for="session" i18n:translate=""> 26 Current Session :24 Current Session 27 25 </label> 28 <div class="input"> 29 <select name="session"> 30 <option tal:repeat="item view/sessions" 31 tal:attributes="value python:item[1]"> 32 <span tal:replace="python: item[0]">2012/2013</span> 33 </option> 34 </select> 35 </div> 26 <select name="session" class="form-control half"> 27 <option tal:repeat="item view/sessions" 28 tal:attributes="value python:item[1]"> 29 <span tal:replace="python: item[0]">2012/2013</span> 30 </option> 31 </select> 36 32 <br /> 37 33 <label for="level" i18n:translate=""> 38 Current Level :34 Current Level 39 35 </label> 40 <div class="input"> 41 <select name="level"> 42 <option tal:repeat="item view/levels" 43 tal:attributes="value python:item[1]"> 44 <span tal:replace="python: item[0]">200</span> 45 </option> 46 </select> 47 </div> 36 <select name="level" class="form-control half"> 37 <option tal:repeat="item view/levels" 38 tal:attributes="value python:item[1]"> 39 <span tal:replace="python: item[0]">200</span> 40 </option> 41 </select> 48 42 <br /> 49 43 <label for="mode" i18n:translate=""> 50 Current Study Mode :44 Current Study Mode 51 45 </label> 52 <div class="input"> 53 <select name="mode"> 54 <option tal:repeat="item view/modes" 55 tal:attributes="value python:item[1]"> 56 <span tal:replace="python: item[0]">ug_ft</span> 57 </option> 58 </select> 59 </div> 46 <select name="mode" class="form-control half"> 47 <option tal:repeat="item view/modes" 48 tal:attributes="value python:item[1]"> 49 <span tal:replace="python: item[0]">ug_ft</span> 50 </option> 51 </select> 60 52 <br /><br /> 61 <div class="input">62 53 <input type="submit" name="START" i18n:translate="" 63 54 value="Create CSV file" 64 class="btn primary" /> 65 </div> 55 class="btn btn-primary" /> 66 56 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig_certificate.pt
r10390 r11254 1 <p class="alert -messagewarning" i18n:domain="waeup.kofa"1 <p class="alert alert-warning" i18n:domain="waeup.kofa" 2 2 i18n:translate="student_export_warning"> 3 3 <strong>NOTICE:</strong> … … 12 12 <form i18n:domain="waeup.kofa" method="POST"> 13 13 <label for="mode" i18n:translate=""> 14 Exporter (Data Type) :14 Exporter (Data Type) 15 15 </label> 16 <div class="input"> 17 <select name="exporter"> 18 <option tal:repeat="item view/exporters" 19 tal:attributes="value python:item[1]"> 20 <span tal:replace="python: item[0]">Students</span> 21 </option> 22 </select> 23 </div> 16 <select name="exporter" class="form-control half"> 17 <option tal:repeat="item view/exporters" 18 tal:attributes="value python:item[1]"> 19 <span tal:replace="python: item[0]">Students</span> 20 </option> 21 </select> 24 22 <br /> 25 23 <label for="session" i18n:translate=""> 26 Current Session :24 Current Session 27 25 </label> 28 <div class="input"> 29 <select name="session"> 30 <option tal:repeat="item view/sessions" 31 tal:attributes="value python:item[1]"> 32 <span tal:replace="python: item[0]">2012/2013</span> 33 </option> 34 </select> 35 </div> 26 <select name="session" class="form-control half"> 27 <option tal:repeat="item view/sessions" 28 tal:attributes="value python:item[1]"> 29 <span tal:replace="python: item[0]">2012/2013</span> 30 </option> 31 </select> 36 32 <br /> 37 33 <label for="level" i18n:translate=""> 38 Current Level :34 Current Level 39 35 </label> 40 <div class="input"> 41 <select name="level"> 42 <option tal:repeat="item view/levels" 43 tal:attributes="value python:item[1]"> 44 <span tal:replace="python: item[0]">200</span> 45 </option> 46 </select> 47 </div> 36 <select name="level" class="form-control half"> 37 <option tal:repeat="item view/levels" 38 tal:attributes="value python:item[1]"> 39 <span tal:replace="python: item[0]">200</span> 40 </option> 41 </select> 48 42 <br /><br /> 49 <div class="input">50 43 <input type="submit" name="START" i18n:translate="" 51 44 value="Create CSV file" 52 class="btn primary" /> 53 </div> 45 class="btn btn-primary" /> 54 46 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig_course.pt
r9843 r11254 1 <p class="alert alert-warning" i18n:domain="waeup.kofa" 2 i18n:translate="student_export_warning"> 3 <strong>NOTICE:</strong> 4 Student data exports are very computation intensive. 5 Depending on the filter selected and the portal traffic load, exports may take 6 longer than 15 minutes. You are advised to export data outside high-traffic 7 time periods. 8 </p> 9 10 <br /> 11 1 12 <form i18n:domain="waeup.kofa" method="POST"> 2 13 <label for="mode" i18n:translate=""> 3 Exporter (Data Type) :14 Exporter (Data Type) 4 15 </label> 5 <div class="input"> 6 <select name="exporter"> 7 <option tal:repeat="item view/exporters" 8 tal:attributes="value python:item[1]"> 9 <span tal:replace="python: item[0]">Students</span> 10 </option> 11 </select> 12 </div> 16 <select name="exporter" class="form-control half"> 17 <option tal:repeat="item view/exporters" 18 tal:attributes="value python:item[1]"> 19 <span tal:replace="python: item[0]">Students</span> 20 </option> 21 </select> 13 22 <br /> 14 23 <label for="session" i18n:translate=""> 15 Level Session :24 Level Session 16 25 </label> 17 <div class="input"> 18 <select name="session"> 19 <option tal:repeat="item view/sessions" 20 tal:attributes="value python:item[1]"> 21 <span tal:replace="python: item[0]">2012/2013</span> 22 </option> 23 </select> 24 </div> 26 <select name="session" class="form-control half"> 27 <option tal:repeat="item view/sessions" 28 tal:attributes="value python:item[1]"> 29 <span tal:replace="python: item[0]">2012/2013</span> 30 </option> 31 </select> 25 32 <br /> 26 33 <label for="level" i18n:translate=""> 27 Level :34 Level 28 35 </label> 29 <div class="input"> 30 <select name="level"> 31 <option tal:repeat="item view/levels" 32 tal:attributes="value python:item[1]"> 33 <span tal:replace="python: item[0]">200</span> 34 </option> 35 </select> 36 </div> 36 <select name="level" class="form-control half"> 37 <option tal:repeat="item view/levels" 38 tal:attributes="value python:item[1]"> 39 <span tal:replace="python: item[0]">200</span> 40 </option> 41 </select> 37 42 <br /><br /> 38 <div class="input">39 43 <input type="submit" name="START" i18n:translate="" 40 44 value="Create CSV file" 41 class="btn primary" /> 42 </div> 45 class="btn btn-primary" /> 43 46 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportjobsindex.pt
r9840 r11254 1 <table i18n:domain="waeup.kofa" >1 <table i18n:domain="waeup.kofa" class="table table-condensed"> 2 2 <thead> 3 3 <tr> … … 25 25 <span tal:replace="job/creator">CREATOR</span> 26 26 </td> 27 <td nowrap>27 <td> 28 28 <span tal:replace="job/start_time">DATETIME</span> 29 29 </td> … … 32 32 </td> 33 33 <td nowrap> 34 <a href="" class="btn " i18n:translate=""34 <a href="" class="btn btn-default" i18n:translate="" 35 35 tal:condition="job/show_refresh_button"> 36 <img tal:attributes="src static/actionicon_reload.png" />36 <img src="/static/img/actionicon_reload.png" /> 37 37 Reload 38 38 </a> 39 39 <form method="POST"> 40 <a href="" class="btn primary small"40 <a href="" class="btn btn-primary btn-xs" 41 41 tal:attributes="href job/download_url" 42 42 tal:condition="job/show_download_button"> … … 45 45 <input type="hidden" name="job_id" 46 46 tal:attributes="value job/job" /> 47 <input type="submit" class="btn small"47 <input type="submit" class="btn btn-default btn-xs" 48 48 name="DISCARD" value="Discard" 49 49 tal:condition="job/show_discard_button" /> … … 53 53 </tbody> 54 54 </table> 55 55 56 <form method="POST" i18n:domain="waeup.kofa"> 56 <div class="span12"> 57 58 </div> 59 <input class="btn primary" type="submit" name="CREATE" 57 <input class="btn btn-primary" type="submit" name="CREATE" 60 58 value="Configure new export" 61 59 /> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/filterstudentspage.pt
r10536 r11254 2 2 <br /> 3 3 <label for="session"> 4 <span tal:replace="view/session_label">SESSION</span> :4 <span tal:replace="view/session_label">SESSION</span> 5 5 </label> 6 <div class="input"> 7 <select name="session"> 8 <span tal:repeat="item view/sessions" tal:omit-tag=""> 9 <option 10 tal:define="name python: item[1]; 11 title python: item[0]; 12 selected python: view.session_default == name" 13 tal:attributes="value name; selected selected"> 14 <span tal:replace="title">TITLE</span> 15 </option> 16 </span> 17 </select> 18 </div> 6 <select name="session" class="form-control half"> 7 <span tal:repeat="item view/sessions" tal:omit-tag=""> 8 <option 9 tal:define="name python: item[1]; 10 title python: item[0]; 11 selected python: view.session_default == name" 12 tal:attributes="value name; selected selected"> 13 <span tal:replace="title">TITLE</span> 14 </option> 15 </span> 16 </select> 19 17 <br /> 20 18 <label for="levels"> 21 <span tal:replace="view/level_label">LEVEL</span> :19 <span tal:replace="view/level_label">LEVEL</span> 22 20 </label> 23 <div class="input"> 24 <select name="level"> 21 <select name="level" class="form-control half"> 25 22 <span tal:repeat="item view/levels" tal:omit-tag=""> 26 23 <option … … 33 30 </span> 34 31 </select> 35 </div>36 32 <br /><br /> 37 <div class="input"> 38 <input i18n:translate="" type="submit" class="btn primary" 39 name="SHOW" value="Show" /> 40 <a class="btn secondary" href="" 41 tal:attributes="href view/parent_url">Cancel</a> 42 </div> 33 <input i18n:translate="" type="submit" class="btn btn-primary" 34 name="SHOW" value="Show" /> 35 <a class="btn btn-default" href="" 36 tal:attributes="href view/parent_url">Cancel</a> 43 37 44 38 <br /><br /> … … 51 45 <span tal:replace="view/level_string">LEVEL</span> 52 46 </h3> 53 <table class=" displaydataTable">47 <table class="kofa-data-table dataTable"> 54 48 <thead> 55 49 <tr> … … 65 59 </thead> 66 60 <tbody> 67 <tr tal:repeat="item view/hitlist" class="gradeC">61 <tr tal:repeat="item view/hitlist"> 68 62 <td> <a tal:attributes="href item/url" 69 63 target="_blank"> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/imagedisplay.pt
r7459 r11254 4 4 </td> 5 5 <td> 6 <img height="125px" tal:attributes="src viewlet/download_name" /> 6 <img height="125px" 7 tal:attributes="src python: view.url(context, viewlet.download_name)" /> 7 8 <br /> 8 9 </td> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/imageupload.pt
r7876 r11254 5 5 <td> 6 6 <img align="middle" height="125px" 7 tal:attributes="src viewlet/download_name" />7 tal:attributes="src python: view.url(context, viewlet.download_name)" /> 8 8 <input type="submit" tal:condition="viewlet/file_exists" 9 9 tal:attributes="id python:('delete_%s' % viewlet.input_name); 10 10 name python:('delete_%s' % viewlet.input_name)" 11 value="Delete" class="btn error" />11 value="Delete" class="btn btn-danger" /> 12 12 <br /><br /> 13 13 <input type="file" tal:attributes="name viewlet/input_name"/> … … 17 17 name python:('upload_%s' % viewlet.input_name); 18 18 value viewlet/upload_button" 19 value="Upload" class="btn primary" />19 value="Upload" class="btn btn-primary" /> 20 20 <span i18n:translate=""> 21 21 Max. file size: -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/loginasstep2.pt
r9338 r11254 9 9 <input type="hidden" name="form.login" tal:attributes="value view/context/student_id" /> 10 10 <input type="hidden" name="form.password" tal:attributes="value view/password" /> 11 <input class="btn primary" type="submit" name="SUBMIT"11 <input class="btn btn-primary" type="submit" name="SUBMIT" 12 12 tal:attributes="value view/login_button" /> 13 13 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/mydatadropdowntabs.pt
r7738 r11254 1 <li tal:attributes="class viewlet/active" data-dropdown="dropdown">1 <li tal:attributes="class viewlet/active"> 2 2 <a href="#" class="dropdown-toggle" 3 tal:content="viewlet/tab_title">Tab Title</a> 3 data-toggle="dropdown"> 4 <span tal:replace="viewlet/tab_title">My Data</span> 5 <b class="caret"></b> 6 </a> 4 7 <ul class="dropdown-menu"> 5 8 <li tal:repeat="target viewlet/targets"> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt
r9729 r11254 8 8 </td> 9 9 <td> 10 <select id="form.p_category" name="form.p_category" size="1" > 10 <select id="form.p_category" name="form.p_category" size="1" 11 class="form-control half"> 11 12 <option tal:repeat="item view/selectable_categories" 12 13 tal:attributes="value python:item[0]"> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/paymentsmanagepage.pt
r10232 r11254 2 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <table class=" displaydataTableManage">4 <table class="kofa-data-table dataTableManage"> 5 5 <thead> 6 6 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studycoursemanagepage.pt
r10266 r11254 2 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"> 6 <span i18n:translate="">Study Course Data</span></a> 4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab"> 7 <span i18n:translate="">Study Course Data</span> 8 </a> 7 9 </li> 8 <li tal:attributes="class view/tab2"><a href="#tab-2"> 9 <span i18n:translate="">Study Levels</span></a> 10 <li t> 11 <a href="#tab2" data-toggle="tab"> 12 <span i18n:translate="">Study Levels</span> 13 </a> 10 14 </li> 11 15 </ul> 12 16 13 17 <div class="tab-content"> 14 <div id="tab-1" tal:attributes="class view/tab1"> 18 <div id="tab1" class="active tab-pane"> 19 <br /> 15 20 <table class="form-table"> 16 21 <tbody> … … 27 32 </div> 28 33 29 <div id="tab -2" tal:attributes="class view/tab2">30 < h3 i18n:translate="">Study Levels (Course Lists)</h3>31 <table class=" displaydataTableManage">34 <div id="tab2" class="tab-pane"> 35 <br /> 36 <table class="kofa-data-table dataTableManage"> 32 37 <thead> 33 38 <tr> … … 44 49 tal:attributes="value cl/__name__" /> 45 50 </td> 46 <td> <a tal:attributes="href cl/__name__">51 <td> <a tal:attributes="href python:view.url(cl)"> 47 52 <span tal:content="cl/level">CODE</span></a> 48 53 </td> … … 62 67 </div> 63 68 <br /><br /><br /> 64 <div> 69 70 71 <div class="form-inline"> 65 72 <span tal:condition="view/availableActions"> 66 < spantal:repeat="action view/actions"67 tal:omit-tag="">68 <input tal:condition="python:action.label in view.tabthreeactions"69 tal:replace="structure action/render"/>70 </ span>73 <div tal:repeat="action view/actions" 74 class="form-group"> 75 <input tal:condition="python:action.label in view.tabthreeactions" 76 tal:replace="structure action/render"/> 77 </div> 71 78 </span> 72 <select id="addlevel" name="addlevel" class='span5'> 73 <option tal:attributes="value level/code" tal:repeat="level view/level_dicts"> 74 <span tal:replace="level/title">LEVELTITLE 75 </span> 76 </option> 77 </select> 79 <div class="form-group"> 80 <select id="addlevel" name="addlevel" class="form-control"> 81 <option tal:attributes="value level/code" tal:repeat="level view/level_dicts"> 82 <span tal:replace="level/title">LEVELTITLE 83 </span> 84 </option> 85 </select> 86 </div> 78 87 <span i18n:translate="">in session</span> 79 <select id="level_session" name="level_session" class='span3'> 80 <option tal:attributes="value session/code" tal:repeat="session view/session_dicts"> 81 <span tal:replace="session/title">LEVELSESSION 82 </span> 83 </option> 84 </select> 88 <div class="form-group"> 89 <select id="level_session" name="level_session" class="form-control"> 90 <option tal:attributes="value session/code" tal:repeat="session view/session_dicts"> 91 <span tal:replace="session/title">LEVELSESSION 92 </span> 93 </option> 94 </select> 95 </div> 85 96 </div> 97 86 98 </div> 87 99 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studycoursepage.pt
r10250 r11254 64 64 <h3 i18n:domain="waeup.kofa" i18n:translate="">Study Levels (Course Lists)</h3> 65 65 66 <table i18n:domain="waeup.kofa" >66 <table i18n:domain="waeup.kofa" class="table"> 67 67 <thead> 68 68 <tr> … … 72 72 </thead> 73 73 <tbody> 74 <tr class="gradeC"tal:repeat="value context/values">75 <td> <a tal:attributes="href value/__name__">74 <tr tal:repeat="value context/values"> 75 <td> <a tal:attributes="href python:view.url(value)"> 76 76 <span tal:content="value/level">CODE</span></a></td> 77 77 <td tal:content="value/level_title">TITLE</td> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studyleveleditpage.pt
r10440 r11254 8 8 tal:replace="view/context/total_credits">TOTAL</span>) 9 9 </h3> 10 <table class=" displaydataTableManage">10 <table class="kofa-data-table dataTableManage"> 11 11 <thead> 12 12 <tr> … … 23 23 </thead> 24 24 <tbody> 25 <tr tal:repeat="value view/translated_values" class="gradeC">25 <tr tal:repeat="value view/translated_values"> 26 26 <td> 27 27 <input type="checkbox" name="val_id" … … 30 30 </td> 31 31 <td tal:content="value/semester" nowrap>TERM</td> 32 <td> <a tal:attributes="href value/ __name__">32 <td> <a tal:attributes="href value/url"> 33 33 <span tal:content="value/code">CODE</span> 34 34 </a></td> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelmanagepage.pt
r10440 r11254 2 2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"> 6 <span i18n:translate="">Study Level Data</span></a> 4 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 5 <li class="active"> 6 <a href="#tab1" data-toggle="tab"> 7 <span i18n:translate="">Study Level Data</span> 8 </a> 7 9 </li> 8 <li tal:attributes="class view/tab2"><a href="#tab-2"> 9 <span i18n:translate="">Course Tickets</span> 10 </a></li> 10 <li> 11 <a href="#tab2" data-toggle="tab"> 12 <span i18n:translate="">Course Tickets</span> 13 </a> 14 </li> 11 15 </ul> 12 16 13 17 <div class="tab-content"> 14 <div id="tab-1" tal:attributes="class view/tab1"> 18 <div id="tab1" class="active tab-pane"> 19 <br /> 15 20 <table class="form-table"> 16 21 <tbody> … … 27 32 </div> 28 33 29 <div id="tab -2" tal:attributes="class view/tab2">30 < h3 i18n:translate="">Course Tickets</h3>31 <table class=" displaydataTableManage">32 <thead>33 <tr>34 <th> </th>35 <th i18n:translate="">Term</th>36 <th i18n:translate="">Code</th>37 <th i18n:translate="">Title</th>38 <th i18n:translate="">Dept.</th>39 <th i18n:translate="">Fact.</th>40 <th i18n:translate="">Cred.</th>41 <th i18n:translate="">Requ.</th>42 <th i18n:translate="">Score</th>43 <th i18n:translate="">CO</th>44 <th i18n:translate="">Auto</th>45 </tr>46 </thead>47 <tbody>48 <tr tal:repeat="value view/translated_values" class="gradeC">49 <td>50 <input type="checkbox" name="val_id"51 tal:attributes="value value/__name__" />52 </td>53 <td tal:content="value/semester" nowrap>TERM</td>54 <td> <a tal:attributes="href value/__name__">55 <span tal:content="value/code">CODE</span>56 </a></td>57 <td tal:content="value/title">TITLE</td>58 <td tal:content="value/dcode">DEPARTMENT</td>59 <td tal:content="value/fcode">FACULTY</td>60 <td tal:content="value/credits">CREDITS</td>61 <td tal:content="value/mandatory">MANDATORY</td>62 <td tal:content="value/score|nothing">SCORE</td>63 <td tal:content="value/carry_over">CO</td>64 <td tal:content="value/automatic">AUTO</td>65 </tr>66 </tbody>34 <div id="tab2" class="tab-pane"> 35 <br /><br /> 36 <table class="kofa-data-table dataTableManage"> 37 <thead> 38 <tr> 39 <th> </th> 40 <th i18n:translate="">Term</th> 41 <th i18n:translate="">Code</th> 42 <th i18n:translate="">Title</th> 43 <th i18n:translate="">Dept.</th> 44 <th i18n:translate="">Fact.</th> 45 <th i18n:translate="">Cred.</th> 46 <th i18n:translate="">Requ.</th> 47 <th i18n:translate="">Score</th> 48 <th i18n:translate="">CO</th> 49 <th i18n:translate="">Auto</th> 50 </tr> 51 </thead> 52 <tbody> 53 <tr tal:repeat="value view/translated_values"> 54 <td> 55 <input type="checkbox" name="val_id" 56 tal:attributes="value value/__name__" /> 57 </td> 58 <td tal:content="value/semester" nowrap>TERM</td> 59 <td> <a tal:attributes="href value/url"> 60 <span tal:content="value/code">CODE</span> 61 </a></td> 62 <td tal:content="value/title">TITLE</td> 63 <td tal:content="value/dcode">DEPARTMENT</td> 64 <td tal:content="value/fcode">FACULTY</td> 65 <td tal:content="value/credits">CREDITS</td> 66 <td tal:content="value/mandatory">MANDATORY</td> 67 <td tal:content="value/score|nothing">SCORE</td> 68 <td tal:content="value/carry_over">CO</td> 69 <td tal:content="value/automatic">AUTO</td> 70 </tr> 71 </tbody> 67 72 </table> 68 73 … … 74 79 </span> 75 80 </div> 76 77 81 <br /><br /><br /> 78 <table class="input-table"> 79 <tr> 80 <td> 81 <input class="btn primary" type="submit" name="ADD" 82 <div class="form-inline"> 83 <div class="form-group"> 84 <input class="btn btn-primary" type="submit" name="ADD" 82 85 i18n:translate="" 83 86 value="Add course ticket" /> 84 </td> 85 <td> 86 <input type="text" name="course" /> 87 <div class="hint" i18n:translate=""> 88 Enter valid course code. 89 </div> 90 </td> 91 </tr> 92 </table> 87 </div> 88 <div class="form-group"> 89 <input type="text" name="course" class="form-control" 90 tal:attributes="placeholder view/placeholder" /> 91 </div> 92 </div> 93 <br /> 93 94 <p i18n:translate=""> 94 95 You don't know the course code? Then select a course -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelpage.pt
r10440 r11254 1 1 <table class="form-table" i18n:domain="waeup.kofa"> 2 <thead>3 </thead>4 2 <tbody> 5 3 <tal:block repeat="widget view/widgets"> … … 20 18 <h3 i18n:domain="waeup.kofa" i18n:translate="">Course Tickets</h3> 21 19 22 <table class=" displaydataTable" i18n:domain="waeup.kofa">20 <table class="kofa-data-table dataTable" i18n:domain="waeup.kofa"> 23 21 <thead> 24 22 <tr> … … 37 35 </thead> 38 36 <tbody> 39 <tr tal:repeat="value view/translated_values" class="gradeC">37 <tr tal:repeat="value view/translated_values"> 40 38 <td tal:content="value/semester" nowrap>TERM</td> 41 <td> <a tal:attributes="href value/ __name__">39 <td> <a tal:attributes="href value/url"> 42 40 <span tal:content="value/code">CODE</span> 43 41 </a></td> … … 55 53 </table> 56 54 57 58 55 <div i18n:domain="waeup.kofa" 59 56 tal:condition="python: not len(context.keys())" i18n:translate=""> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcript.pt
r10436 r11254 45 45 <tal:semesters tal:repeat="semester_tickets python:(level['tickets_1'], 46 46 level['tickets_2'], level['tickets_3'])"> 47 <tr tal:repeat="ticket semester_tickets" class="gradeC">47 <tr tal:repeat="ticket semester_tickets"> 48 48 <td tal:content="python: view.level_dict[ticket.level]">LEVEL</td> 49 49 <td tal:content="python: view.session_dict[ticket.level_session]">SESSION</td> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcriptprocess.pt
r10459 r11254 1 1 <form method="POST" i18n:domain="waeup.kofa"> 2 2 3 <ul class="tabs" data-tabs="tabs"> 4 <li tal:attributes="class view/tab1"><a href="#tab-1"> 5 <span i18n:translate="">Process request</span></a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-2"> 7 <span i18n:translate="">View correspondence</span></a></li> 3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 <li class="active"> 5 <a href="#tab1" data-toggle="tab"> 6 <span i18n:translate="">Process request</span> 7 </a> 8 </li> 9 <li> 10 <a href="#tab2" data-toggle="tab"> 11 <span i18n:translate="">View correspondence</span> 12 </a> 13 </li> 8 14 </ul> 9 15 10 16 <div class="tab-content"> 11 <div id="tab -1" tal:attributes="class view/tab1">17 <div id="tab1" class="active tab-pane"> 12 18 13 19 <table class="form-table"> … … 32 38 </div> 33 39 34 <div id="tab -2" tal:attributes="class view/tab2">40 <div id="tab2" class="tab-pane"> 35 41 <p tal:content="structure view/correspondence"></p> 36 42 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcriptrequest.pt
r10472 r11254 1 1 <form method="POST" i18n:domain="waeup.kofa"> 2 2 3 <ul class="tabs" data-tabs="tabs"> 4 <li tal:attributes="class view/tab1"><a href="#tab-1"> 5 <span i18n:translate="">Send new request</span></a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-2"> 7 <span i18n:translate="">View correspondence</span></a></li> 3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 <li class="active"> 5 <a href="#tab1" data-toggle="tab"> 6 <span i18n:translate="">Send new request</span> 7 </a></li> 8 <li> 9 <a href="#tab2" data-toggle="tab"> 10 <span i18n:translate="">View correspondence</span> 11 </a> 12 </li> 8 13 </ul> 9 14 10 15 <div class="tab-content"> 11 <div id="tab -1" tal:attributes="class view/tab1">16 <div id="tab1" class="active tab-pane"> 12 17 13 18 <p i18n:translate="transcript_request"></p> … … 65 70 </div> 66 71 67 <div id="tab -2" tal:attributes="class view/tab2">72 <div id="tab2" class="tab-pane"> 68 73 <p tal:content="structure view/correspondence"></p> 69 74 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/trigtrans.pt
r9273 r11254 4 4 5 5 6 <select id="transition" name="transition" >6 <select id="transition" name="transition" class="form-control half"> 7 7 <option tal:repeat="transition view/getTransitions" 8 8 tal:attributes="value transition/name"> -
main/waeup.kofa/trunk/src/waeup/kofa/students/dynamicroles.py
r10639 r11254 79 79 # Found a Course Adviser role in external attribute or parent 80 80 # thereof. We need a special treatment for Course Advisers. 81 if str(100*(current_level/100)) in role_id:81 if current_level and str(100*(current_level/100)) in role_id: 82 82 # Grant additional role, which allows to validate or reject 83 83 # course lists, only if external role corresponds -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/browser_templates/levelreportgeneratorpage.pt
r10560 r11254 7 7 </p> 8 8 <br /> 9 <div class="clearfix"> 10 <label for="session" i18n:translate="">Department:</label> 11 <div class="input"> 12 <select name="faccode_depcode"> 13 <span tal:repeat="items view/faccode_depcodes" tal:omit-tag=""> 14 <option 15 tal:define="name python: items[1]; title python: items[0]" 16 tal:attributes="value name"> 17 <span tal:replace="title">TITLE</span> 18 </option> 19 </span> 20 </select> 21 <div class="help-inline" i18n:translate=""> 22 Set department filter. 23 </div> 24 </div> 25 <br /> 26 <label for="session">Academic Session:</label> 27 <div class="input"> 28 <select name="session" i18n:translate=""> 29 <span tal:repeat="items view/sessions" tal:omit-tag=""> 30 <option 31 tal:define="name python: items[1]; title python: items[0]" 32 tal:attributes="value name"> 33 <span tal:replace="title">TITLE</span> 34 </option> 35 </span> 36 </select> 37 <div class="help-inline" i18n:translate=""> 38 Select academic session to report. 39 </div> 40 </div> 41 <br /> 42 <label for="session">Level:</label> 43 <div class="input"> 44 <select name="level" i18n:translate=""> 45 <span tal:repeat="items view/levels" tal:omit-tag=""> 46 <option 47 tal:define="name python: items[1]; title python: items[0]" 48 tal:attributes="value name"> 49 <span tal:replace="title">TITLE</span> 50 </option> 51 </span> 52 </select> 53 <div class="help-inline" i18n:translate=""> 54 Select level to report. 55 </div> 56 </div> 57 9 <label for="session" i18n:translate="">Department</label> 10 <select name="faccode_depcode" class="form-control half"> 11 <span tal:repeat="items view/faccode_depcodes" tal:omit-tag=""> 12 <option 13 tal:define="name python: items[1]; title python: items[0]" 14 tal:attributes="value name"> 15 <span tal:replace="title">TITLE</span> 16 </option> 17 </span> 18 </select> 19 <br /> 20 <label for="session">Academic Session</label> 21 <div class="input"> 22 <select name="session" i18n:translate="" class="form-control half"> 23 <span tal:repeat="items view/sessions" tal:omit-tag=""> 24 <option 25 tal:define="name python: items[1]; title python: items[0]" 26 tal:attributes="value name"> 27 <span tal:replace="title">TITLE</span> 28 </option> 29 </span> 30 </select> 58 31 </div> 59 <div class="input"> 60 <input i18n:translate="" type="submit" class="btn primary" 61 name="CREATE" value="Create" /> 62 <a class="btn secondary" href="" 63 tal:attributes="href view/parent_url">Cancel</a> 64 </div> 32 <br /> 33 <label for="session">Level</label> 34 <select name="level" i18n:translate="" class="form-control half"> 35 <span tal:repeat="items view/levels" tal:omit-tag=""> 36 <option 37 tal:define="name python: items[1]; title python: items[0]" 38 tal:attributes="value name"> 39 <span tal:replace="title">TITLE</span> 40 </option> 41 </span> 42 </select> 43 <br /> 44 <input i18n:translate="" type="submit" class="btn btn-primary" 45 name="CREATE" value="Create" /> 46 <a class="btn btn-default" href="" 47 tal:attributes="href view/parent_url">Cancel</a> 65 48 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/browser_templates/studentstatisticsreportgeneratorpage.pt
r10550 r11254 7 7 </p> 8 8 <br /> 9 <div class="clearfix"> 10 <label for="session" i18n:translate="">Study Modes Group:</label> 11 <div class="input"> 12 <select name="mode"> 13 <span tal:repeat="items view/modes" tal:omit-tag=""> 14 <option 15 tal:define="name python: items[1]; title python: items[0]" 16 tal:attributes="value name"> 17 <span tal:replace="title">TITLE</span> 18 </option> 19 </span> 20 </select> 21 <div class="help-inline" i18n:translate=""> 22 Set study modes filter. 23 </div> 24 </div> 25 <br /> 26 <label for="session">Academic Session:</label> 27 <div class="input"> 28 <select name="session" i18n:translate=""> 29 <span tal:repeat="items view/sessions" tal:omit-tag=""> 30 <option 31 tal:define="name python: items[1]; title python: items[0]" 32 tal:attributes="value name"> 33 <span tal:replace="title">TITLE</span> 34 </option> 35 </span> 36 </select> 37 <div class="help-inline" i18n:translate=""> 38 Select academic session to report. 39 </div> 40 </div> 41 42 </div> 43 <div class="input"> 44 <input i18n:translate="" type="submit" class="btn primary" 45 name="CREATE" value="Create" /> 46 <a class="btn secondary" href="" 47 tal:attributes="href view/parent_url">Cancel</a> 48 </div> 9 <label for="session" i18n:translate="">Study Modes Group</label> 10 <select name="mode" class="form-control half"> 11 <span tal:repeat="items view/modes" tal:omit-tag=""> 12 <option 13 tal:define="name python: items[1]; title python: items[0]" 14 tal:attributes="value name"> 15 <span tal:replace="title">TITLE</span> 16 </option> 17 </span> 18 </select> 19 <br /> 20 <label for="session">Academic Session</label> 21 <select name="session" i18n:translate="" class="form-control half"> 22 <span tal:repeat="items view/sessions" tal:omit-tag=""> 23 <option 24 tal:define="name python: items[1]; title python: items[0]" 25 tal:attributes="value name"> 26 <span tal:replace="title">TITLE</span> 27 </option> 28 </span> 29 </select> 30 <br /> 31 <input i18n:translate="" type="submit" class="btn btn-primary" 32 name="CREATE" value="Create" /> 33 <a class="btn btn-default" href="" 34 tal:attributes="href view/parent_url">Cancel</a> 49 35 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
r10650 r11254 208 208 from waeup.kofa.interfaces import academic_sessions_vocab 209 209 from waeup.kofa.reports import get_generators 210 from waeup.kofa.browser.breadcrumbs import Breadcrumb 210 211 grok.templatedir('browser_templates') 211 212 class LevelReportGeneratorPage(KofaPage): … … 291 292 self.context.creation_dt_string) 292 293 294 class LevelReportBreadcrumb(Breadcrumb): 295 """A breadcrumb for reports. 296 """ 297 grok.context(LevelReportGenerator) 298 title = _(u'Level Report') 299 target = None -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py
r10650 r11254 198 198 from waeup.kofa.interfaces import academic_sessions_vocab 199 199 from waeup.kofa.reports import get_generators 200 from waeup.kofa.browser.breadcrumbs import Breadcrumb 200 201 grok.templatedir('browser_templates') 201 202 class SessionResultsPresentationGeneratorPage(LevelReportGeneratorPage): … … 230 231 self.context.sessioncode, self.context.levelcode, 231 232 self.context.creation_dt_string) 233 234 class SessionResultsPresentationBreadcrumb(Breadcrumb): 235 """A breadcrumb for reports. 236 """ 237 grok.context(SessionResultsPresentationGenerator) 238 title = _(u'Session Results Presentation') 239 target = None -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py
r10575 r11254 168 168 from waeup.kofa.interfaces import academic_sessions_vocab 169 169 from waeup.kofa.reports import get_generators 170 from waeup.kofa.browser.breadcrumbs import Breadcrumb 170 171 grok.templatedir('browser_templates') 171 172 class StudentStatisticsReportGeneratorPage(KofaPage): … … 240 241 ob_class, self.context.__name__, filename)) 241 242 return pdf_stream 243 244 class StudentStatsBreadcrumb(Breadcrumb): 245 """A breadcrumb for reports. 246 """ 247 grok.context(StudentStatisticsReportGenerator) 248 title = _(u'Student Statistics') 249 target = None -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10704 r11254 613 613 # There is a correct <img> link included 614 614 self.assertTrue( 615 ' <a target="image" href="birth_certificate">'615 'href="http://localhost/app/students/K1000000/birth_certificate"' 616 616 in self.browser.contents) 617 617 # Browsing the link shows a real image … … 673 673 name='upload_passportuploadmanage').click() 674 674 self.assertTrue( 675 ' <img align="middle" height="125px" src="passport.jpg" />'675 'src="http://localhost/app/students/K1000000/passport.jpg"' 676 676 in self.browser.contents) 677 677 # We remove the passport file again … … 1958 1958 # We are logged in as student and can see the 'My Data' tab 1959 1959 self.assertMatches( 1960 '...<a href="#" class="dropdown-toggle">My Data</a>...', 1960 '...<a href="#" class="dropdown-toggle" data-toggle="dropdown">...', 1961 self.browser.contents) 1962 self.assertMatches( 1963 '...My Data...', 1961 1964 self.browser.contents) 1962 1965 self.browser.getLink("Logout").click() … … 2198 2201 self.browser.getControl("Login").click() 2199 2202 self.assertMatches( 2200 '...<div class="alert -messagewarning">'2203 '...<div class="alert alert-warning">' 2201 2204 'Your account has been deactivated.</div>...', self.browser.contents) 2202 2205 # If suspended_comment is set this message will be flashed instead … … 2206 2209 self.browser.getControl("Login").click() 2207 2210 self.assertMatches( 2208 '...<div class="alert -messagewarning">Aetsch baetsch!</div>...',2211 '...<div class="alert alert-warning">Aetsch baetsch!</div>...', 2209 2212 self.browser.contents) 2210 2213 self.student.suspended = False … … 2265 2268 name='upload_passportuploadedit').click() 2266 2269 self.assertTrue( 2267 ' <img align="middle" height="125px" src="passport.jpg" />'2270 'src="http://localhost/app/students/K1000000/passport.jpg"' 2268 2271 in self.browser.contents) 2269 2272 # Students can open admission letter … … 2323 2326 name='upload_birthcertificateupload').click() 2324 2327 self.assertTrue( 2325 ' <a target="image" href="birth_certificate">Birth Certificate Scan</a>'2328 'href="http://localhost/app/students/K1000000/birth_certificate"' 2326 2329 in self.browser.contents) 2327 2330 # Students can open clearance slip … … 2358 2361 # Now students can add the current study level 2359 2362 self.browser.getLink("Study Course").click() 2363 self.student['studycourse'].current_level = None 2364 self.browser.getLink("Add course list").click() 2365 self.assertMatches('...Your data are incomplete...', 2366 self.browser.contents) 2367 self.student['studycourse'].current_level = 100 2360 2368 self.browser.getLink("Add course list").click() 2361 2369 self.assertMatches('...Add current level 100 (Year 1)...', -
main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
r10816 r11254 825 825 size = file_size(upload) 826 826 if size > max_size: 827 view.flash(_('Uploaded file is too big.') )827 view.flash(_('Uploaded file is too big.'), type="danger") 828 828 return False 829 829 upload.seek(0) # file pointer moved when determining size … … 831 831 upload.seek(0) # same here 832 832 if file_format is None: 833 view.flash(_('Could not determine file type.') )833 view.flash(_('Could not determine file type.'), type="danger") 834 834 return False 835 835 basename, expected_ext = os.path.splitext(download_name) … … 837 837 if '.' + file_format != expected_ext: 838 838 view.flash(_('${a} file extension expected.', 839 mapping = {'a':expected_ext[1:]}) )839 mapping = {'a':expected_ext[1:]}), type="danger") 840 840 return False 841 841 else: … … 843 843 view.flash( 844 844 _('Only the following extensions are allowed: ${a}', 845 mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)})) 845 mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)}), 846 type="danger") 846 847 return False 847 848 download_name += '.' + file_format … … 891 892 template = default_fileupload_template 892 893 grok.require('waeup.uploadStudentFile') 893 tab_redirect = ' ?tab2'894 tab_redirect = '#tab2-top' 894 895 mus = 1024 * 150 895 896 upload_button =_('Upload new file') … … 931 932 self.context, self.view.__name__) + self.tab_redirect) 932 933 else: 933 self.view.flash(_('No local file selected.') )934 self.view.flash(_('No local file selected.'), type="danger") 934 935 self.view.redirect( 935 936 self.view.url( … … 959 960 mus = 1024 * 50 960 961 download_name = u'passport.jpg' 961 tab_redirect = ' ?tab2'962 tab_redirect = '#tab2' 962 963 963 964 class PassportUploadEdit(PassportUploadManage): … … 986 987 mus = 1024 * 150 987 988 download_name = u'birth_certificate' 988 tab_redirect = ' ?tab2'989 tab_redirect = '#tab2-top' 989 990 990 991 class Image(grok.View): -
main/waeup.kofa/trunk/src/waeup/kofa/widgets/phonewidget.py
r8937 r11254 37 37 38 38 subwidget_names = ('country', 'area', 'ext') 39 bootstrap_span = 'span2'39 cssClass = 'phone-input' 40 40 41 41 def _renderPrefixWidget(self, value): … … 51 51 '<option value="%s"%s>%s</option>' % (pval, selected, ptitle)) 52 52 options = '\n'.join(options) 53 return '<select id="%s" name="%s" size="1" class=" span4">\n%s\n</select>' % (53 return '<select id="%s" name="%s" size="1" class="%s">\n%s\n</select>' % ( 54 54 '%s.%s' % (self.name, 'country'), 55 55 '%s.%s' % (self.name, 'country'), 56 self.cssClass, 56 57 options) 57 58 … … 83 84 kwargs.update(name = '%s.%s' % (self.name, subname)) 84 85 kwargs.update(id=kwargs['name']) 85 # kwargs.update(cssClass = '%s %s' % (self.cssClass, 'span1')) 86 kwargs.update(cssClass = '%s %s' % ('', self.bootstrap_span)) 86 kwargs.update(cssClass = '%s %s' % ('', self.cssClass)) 87 87 kwargs.update(value = subvalues[num]) 88 88 fields.append(renderElement(self.tag, **kwargs)) -
main/waeup.kofa/trunk/src/waeup/kofa/widgets/sequencewidget.pt
r7811 r11254 1 <table border="0" class="sequencewidget" 2 i18n:domain="waeup.kofa"> 1 <table i18n:domain="waeup.kofa"> 3 2 <tr tal:repeat="widget view/widgets"> 4 3 <td> … … 19 18 Don't forget to save the form after adding or deleting items. 20 19 </p> 21 <input type="submit" value="Remove selected items" 22 class="btn" 20 <button type="submit" 21 class="btn btn-default" 22 tal:condition="view/need_add" 23 tal:attributes="name string:${view/name}.add" 24 tal:content="view/addButtonLabel" /> 25 <button type="submit" class="btn btn-default" 23 26 tal:condition="view/need_delete" 24 27 tal:attributes="name string:${view/name}.remove" 25 i18n:attributes="value remove-selected-items" /> 26 <input type="submit" value="Add foo" 27 class="btn" 28 tal:condition="view/need_add" 29 tal:attributes="name string:${view/name}.add; 30 value view/addButtonLabel" /> 28 i18n:translate="remove-selected-items">Remove selected items</button> 31 29 </td> 32 30 </tr> -
main/waeup.kofa/trunk/versions.cfg
r11158 r11254 8 8 [versions] 9 9 collective.recipe.sphinxbuilder = 0.7.0 10 collective.recipe.template = 1.10 10 11 hurry.workflow = 0.11 11 12 # Pinned to circumvent breakage in 0.4.x … … 129 130 zope.testrunner = 4.3.3 130 131 131 # Added by buildout at 2014-02-21 11:08:07.165915 132 zc.zodbrecipes = 2.0.0 132 # Added by buildout at 2014-01-13 12:49:22.642212 133 mr.developer = 1.27 134 plone.recipe.command = 1.1 135 z3c.recipe.staticlxml = 0.10 136 137 # Required by: 138 # z3c.recipe.staticlxml==0.10 139 zc.recipe.cmmi = 1.3.5 140 141 # Added by buildout at 2014-02-04 15:17:58.515390 142 zc.zodbrecipes = 0.6.2 143 144 # Added by buildout at 2014-02-13 07:53:24.402989 145 WebOb = 1.3.1 146 diazo = 1.0.5 147 repoze.xmliter = 0.5 148 149 # Required by: 150 # diazo==1.0.5 151 experimental.cssselect = 0.3 152 153 # Required by: 154 # diazo==1.0.5 155 # experimental.cssselect==0.3 156 lxml = 3.3.1
Note: See TracChangeset for help on using the changeset viewer.