Changeset 11254 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 22 Feb 2014, 15:46:03 (11 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk
- Property svn:mergeinfo changed
-
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/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):
Note: See TracChangeset for help on using the changeset viewer.