Ignore:
Timestamp:
22 Feb 2014, 15:46:03 (11 years ago)
Author:
uli
Message:

Merge changes from uli-diazo-themed back into trunk. If this works, then a miracle happened.

Location:
main/waeup.kofa/trunk
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk

  • main/waeup.kofa/trunk/src/waeup/kofa

  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r10706 r11254  
    3939from waeup.kofa.browser.breadcrumbs import Breadcrumb
    4040from waeup.kofa.browser.pages import ContactAdminForm, ExportCSVView, doll_up
    41 from waeup.kofa.browser.resources import (
    42     datepicker, datatable, tabs, warning, toggleall)
    4341from waeup.kofa.browser.layout import jsaction, action, UtilityView
    4442from waeup.kofa.browser.interfaces import ICaptchaManager
     
    107105    """Flash a lock message.
    108106    """
    109     view.flash(_('The requested form is locked (read-only).'))
     107    view.flash(_('The requested form is locked (read-only).'), type="warning")
    110108    view.redirect(view.url(view.context))
    111109    return
     
    122120        value._p_activate()
    123121        value_dict = dict([i for i in value.__dict__.items()])
     122        value_dict['url'] = view.url(value)
    124123        value_dict['removable_by_student'] = value.removable_by_student
    125124        value_dict['mandatory'] = translate(str(value.mandatory), 'zope',
     
    155154        view.flash(_(
    156155            'Total credits exceed ${a}.',
    157             mapping = {'a': max_credits}))
     156            mapping = {'a': max_credits}), type="warning")
    158157        return False
    159158    try:
    160159        view.context.addCourseTicket(ticket, course)
    161160    except KeyError:
    162         view.flash(_('The ticket exists.'))
     161        view.flash(_('The ticket exists.'), type="warning")
    163162        return False
    164163    view.flash(_('Successfully added ${a}.',
     
    258257    grok.require('waeup.viewStudentsContainer')
    259258    grok.template('containerpage')
    260     label = _('Student Section')
     259    label = _('Find students')
    261260    search_button = _('Find student(s)')
    262261    pnav = 4
    263262
    264263    def update(self, *args, **kw):
    265         datatable.need()
    266264        form = self.request.form
    267265        self.hitlist = []
     
    280278        else:
    281279            if 'search' in form:
    282                 self.flash(_('Empty search string'))
     280                self.flash(_('Empty search string'), type="warning")
    283281            return
    284282        if self.searchtype == 'current_session':
     
    286284                self.searchterm = int(self.searchterm)
    287285            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")
    289288                return
    290289        self.hitlist = search(query=self.searchterm,
    291290            searchtype=self.searchtype, view=self)
    292291        if not self.hitlist:
    293             self.flash(_('No student found.'))
     292            self.flash(_('No student found.'), type="warning")
    294293        return
    295294
     
    307306
    308307    def update(self, *args, **kw):
    309         datatable.need()
    310         toggleall.need()
    311         warning.need()
    312308        form = self.request.form
    313309        self.hitlist = []
     
    323319        else:
    324320            if 'search' in form:
    325                 self.flash(_('Empty search string'))
     321                self.flash(_('Empty search string'), type="warning")
    326322            return
    327323        if self.searchtype == 'current_session':
     
    329325                self.searchterm = int(self.searchterm)
    330326            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")
    332329                return
    333330        if not 'entries' in form:
     
    335332                searchtype=self.searchtype, view=self)
    336333            if not self.hitlist:
    337                 self.flash(_('No student found.'))
     334                self.flash(_('No student found.'), type="warning")
    338335            if 'remove' in form:
    339                 self.flash(_('No item selected.'))
     336                self.flash(_('No item selected.'), type="warning")
    340337            return
    341338        entries = form['entries']
     
    495492            self.flash(_('Your message has been sent.'))
    496493        else:
    497             self.flash(_('An smtp server error occurred.'))
     494            self.flash(_('An smtp server error occurred.'), type="danger")
    498495        return
    499496
     
    535532
    536533    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')
    544534        super(StudentBaseManageFormPage, self).update()
    545535        self.wf_info = IWorkflowInfo(self.context)
     
    555545            errors = validator.validate_password(password, password_ctl)
    556546            if errors:
    557                 self.flash( ' '.join(errors))
     547                self.flash( ' '.join(errors), type="danger")
    558548                return
    559549        changed_fields = self.applyData(self.context, **data)
     
    764754        return form_fields
    765755
    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 
    776756    @action(_('Save'), style='primary')
    777757    def save(self, **data):
     
    795775            self.flash(_('Student has been cleared.'))
    796776        else:
    797             self.flash(_('Student is in wrong state.'))
     777            self.flash(_('Student is in wrong state.'), type="warning")
    798778        self.redirect(self.url(self.context,'view_clearance'))
    799779        return
     
    814794    def update(self):
    815795        if clearance_disabled_message(self.context):
    816             self.flash(clearance_disabled_message(self.context))
     796            self.flash(clearance_disabled_message(self.context), type="warning")
    817797            self.redirect(self.url(self.context,'view_clearance'))
    818798            return
     
    824804            IWorkflowInfo(self.context).fireTransition('reset4')
    825805            message = _('Clearance has been annulled.')
    826             self.flash(message)
     806            self.flash(message, type="warning")
    827807        elif self.context.state == REQUESTED:
    828808            IWorkflowInfo(self.context).fireTransition('reset3')
    829809            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")
    833813            self.redirect(self.url(self.context,'view_clearance'))
    834814            return
     
    987967            return
    988968        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()
    997969        return
    998970
     
    1003975        except ConstraintNotSatisfied:
    1004976            # 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")
    1006979            return
    1007980        notify(grok.ObjectModifiedEvent(self.context.__parent__))
     
    1023996            yield(dict(code=code, title=title))
    1024997
    1025     @action(_('Add study level'))
     998    @action(_('Add study level'), style='primary')
    1026999    def addStudyLevel(self, **data):
    10271000        level_code = self.request.form.get('addlevel', None)
    10281001        level_session = self.request.form.get('level_session', None)
    10291002        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')
    10321006            return
    10331007        studylevel = createObject(u'waeup.StudentStudyLevel')
     
    10391013            self.flash(_('Study level has been added.'))
    10401014        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')
    10431017        return
    10441018
     
    10491023            child_id = form['val_id']
    10501024        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')
    10531027            return
    10541028        if not isinstance(child_id, list):
     
    10631037            self.context.writeLogMessage(
    10641038                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')
    10661040        return
    10671041
     
    10821056    def update(self, SUBMIT=None):
    10831057        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')
    10901058        if not self.context.state == GRADUATED:
    1091             self.flash(_("Wrong state"))
     1059            self.flash(_("Wrong state"), type="danger")
    10921060            self.redirect(self.url(self.context))
    10931061            return
     
    11061074            code = get_access_code(pin)
    11071075            if not code:
    1108                 self.flash(_('Activation code is invalid.'))
     1076                self.flash(_('Activation code is invalid.'), type="warning")
    11091077                return
    11101078            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")
    11121081                return
    11131082            # Mark pin as used (this also fires a pin related transition)
     
    11171086            # expect an exception, but the owner might be different
    11181087            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")
    11201090                return
    11211091            self.context.clr_code = pin
     
    11571127    def update(self, SUBMIT=None):
    11581128        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')
    11651129        if self.context.state != TRANSCRIPT:
    1166             self.flash(_('Student is in wrong state.'))
     1130            self.flash(_('Student is in wrong state.'), type="warning")
    11671131            self.redirect(self.url(self.context))
    11681132            return
     
    12221186    def update(self):
    12231187        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")
    12251190            self.redirect(self.url(self.context))
    12261191            return
     
    12551220    def update(self):
    12561221        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")
    12581224            self.redirect(self.url(self.context))
    12591225            return
     
    13191285    pnav = 4
    13201286
    1321     def update(self):
    1322         super(StudentTransferFormPage, self).update()
    1323         warning.need()
    1324         return
    1325 
    13261287    @jsaction(_('Transfer'))
    13271288    def transferStudent(self, **data):
    13281289        error = self.context.transfer(**data)
    13291290        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")
    13311293        elif error == -2:
    1332             self.flash(_('Former study course record incomplete.'))
     1294            self.flash(_('Former study course record incomplete.'),
     1295                       type="warning")
    13331296        elif error == -3:
    1334             self.flash(_('Maximum number of transfers exceeded.'))
     1297            self.flash(_('Maximum number of transfers exceeded.'),
     1298                       type="warning")
    13351299        else:
    13361300            self.flash(_('Successfully transferred.'))
     
    13471311
    13481312    def update(self):
    1349         warning.need()
    13501313        if not self.context.has_key('studycourse_1'):
    1351             self.flash(_('No previous transfer.'))
     1314            self.flash(_('No previous transfer.'), type="warning")
    13521315            self.redirect(self.url(self.context))
    13531316            return
     
    13751338    def update(self):
    13761339        super(StudyLevelDisplayFormPage, self).update()
    1377         datatable.need()
    13781340        return
    13791341
     
    14861448    tabtwoactions = [_('Add course ticket'),
    14871449        _('Remove selected tickets'),_('Cancel')]
     1450    placeholder = _('Enter valid course code')
    14881451
    14891452    def update(self, ADD=None, course=None):
     
    14921455            return
    14931456        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()
    15021457        if ADD is not None:
    15031458            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')
    15061461                return
    15071462            cat = queryUtility(ICatalog, name='courses_catalog')
    15081463            result = cat.searchResults(code=(course, course))
    15091464            if len(result) != 1:
    1510                 self.flash(_('Course not found.'))
     1465                self.flash(_('Course not found.'), type="warning")
    15111466            else:
    15121467                course = list(result)[0]
    15131468                addCourseTicket(self, course)
    1514             self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     1469            self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    15151470        return
    15161471
     
    15391494            child_id = form['val_id']
    15401495        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')
    15431498            return
    15441499        if not isinstance(child_id, list):
     
    15541509                self,'removed: %s at %s' %
    15551510                (', '.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')
    15571512        return
    15581513
     
    15691524            return
    15701525        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")
    15721528        elif self.context.student.state == REGISTERED:
    15731529            IWorkflowInfo(self.context.student).fireTransition(
     
    15751531            self.flash(_('Course list has been validated.'))
    15761532        else:
    1577             self.flash(_('Student is in the wrong state.'))
     1533            self.flash(_('Student is in the wrong state.'), type="warning")
    15781534        self.redirect(self.url(self.context))
    15791535        return
     
    15941550            return
    15951551        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")
    15971554            self.redirect(self.url(self.context))
    15981555            return
     
    16061563            self.flash(message)
    16071564        else:
    1608             self.flash(_('Student is in the wrong state.'))
     1565            self.flash(_('Student is in the wrong state.'), type="warning")
    16091566            self.redirect(self.url(self.context))
    16101567            return
     
    16341591        return
    16351592
    1636     @action(_('Add course ticket'))
     1593    @action(_('Add course ticket'), style='primary')
    16371594    def addCourseTicket(self, **data):
    16381595        course = data['course']
    16391596        success = addCourseTicket(self, course)
    16401597        if success:
    1641             self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     1598            self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    16421599        return
    16431600
     
    17191676            mapping = {'a':self.context.__parent__.display_fullname})
    17201677
    1721     def update(self):
    1722         super(PaymentsManageFormPage, self).update()
    1723         datatable.need()
    1724         warning.need()
    1725         return
    1726 
    17271678    @jsaction(_('Remove selected tickets'))
    17281679    def delPaymentTicket(self, **data):
     
    17311682            child_id = form['val_id']
    17321683        else:
    1733             self.flash(_('No payment selected.'))
     1684            self.flash(_('No payment selected.'), type="warning")
    17341685            self.redirect(self.url(self.context))
    17351686            return
     
    17831734                self.flash(
    17841735                    _('Your current session does not match ' + \
    1785                     'accommodation session.'))
     1736                    'accommodation session.'), type="danger")
    17861737                return
    17871738        if 'maintenance' in p_category:
    17881739            current_session = str(student['studycourse'].current_session)
    17891740            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")
    17911743                return
    17921744        students_utils = getUtility(IStudentsUtils)
     
    17941746            p_category, student, previous_session, previous_level)
    17951747        if error is not None:
    1796             self.flash(error)
     1748            self.flash(error, type="danger")
    17971749            return
    17981750        self.context[payment.p_id] = payment
     
    18171769    def update(self):
    18181770        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")
    18201772            self.redirect(self.url(self.context))
    18211773        super(PreviousPaymentAddFormPage, self).update()
     
    18321784            p_category, student, previous_session, previous_level)
    18331785        if error is not None:
    1834             self.flash(error)
     1786            self.flash(error, type="danger")
    18351787            return
    18361788        self.context[payment.p_id] = payment
     
    18651817            balance_level, balance_amount)
    18661818        if error is not None:
    1867             self.flash(error)
     1819            self.flash(error, type="danger")
    18681820            return
    18691821        self.context[payment.p_id] = payment
     
    19891941            mapping = {'a':self.context.__parent__.display_fullname})
    19901942
    1991     def update(self):
    1992         super(AccommodationManageFormPage, self).update()
    1993         datatable.need()
    1994         warning.need()
    1995         return
    1996 
    19971943    @jsaction(_('Remove selected'))
    19981944    def delBedTickets(self, **data):
    19991945        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")
    20011948            self.redirect(self.url(self.context))
    20021949            return
     
    20051952            child_id = form['val_id']
    20061953        else:
    2007             self.flash(_('No bed ticket selected.'))
     1954            self.flash(_('No bed ticket selected.'), type="warning")
    20081955            self.redirect(self.url(self.context))
    20091956            return
     
    20572004                    enddate, tz).strftime("%d/%m/%Y %H:%M:%S")
    20582005                self.flash(_("Outside booking period: ${a} - ${b}",
    2059                     mapping = {'a': startdate, 'b': enddate}))
     2006                    mapping = {'a': startdate, 'b': enddate}), type="warning")
    20602007            else:
    2061                 self.flash(_("Outside booking period."))
     2008                self.flash(_("Outside booking period."), type="warning")
    20622009            self.redirect(self.url(self.context))
    20632010            return
    20642011        if not acc_details:
    2065             self.flash(_("Your data are incomplete."))
     2012            self.flash(_("Your data are incomplete."), type="warning")
    20662013            self.redirect(self.url(self.context))
    20672014            return
    20682015        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")
    20702018            self.redirect(self.url(self.context))
    20712019            return
     
    20732021            'booking_session']:
    20742022            self.flash(
    2075                 _('Your current session does not match accommodation session.'))
     2023                _('Your current session does not match accommodation session.'),
     2024                type="warning")
    20762025            self.redirect(self.url(self.context))
    20772026            return
     
    20792028            self.flash(
    20802029                _('You already booked a bed space in current ' \
    2081                     + 'accommodation session.'))
     2030                    + 'accommodation session.'), type="warning")
    20822031            self.redirect(self.url(self.context))
    20832032            return
     
    20912040            code = get_access_code(pin)
    20922041            if not code:
    2093                 self.flash(_('Activation code is invalid.'))
     2042                self.flash(_('Activation code is invalid.'), type="warning")
    20942043                return
    20952044        # Search and book bed
     
    21032052            # XXX: Can be remove if nobody complains.
    21042053            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")
    21062056                self.context.writeLogMessage(self, 'fatal error: %s' % bed.bed_id)
    21072057                return
     
    21182068                # XXX: Can be remove if nobody complains.
    21192069                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")
    21212072                    self.context.writeLogMessage(self, 'fatal error: %s' % bed.bed_id)
    21222073                    return
     
    21242075            else:
    21252076                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")
    21272078                return
    21282079        if self.with_ac:
    21292080            # Mark pin as used (this also fires a pin related transition)
    21302081            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")
    21322084                return
    21332085            else:
     
    21372089                if not invalidate_accesscode(
    21382090                    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")
    21402093                    return
    21412094        # Create bed ticket
     
    22312184        if self.context.bed != None and \
    22322185              '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")
    22342188            self.redirect(self.url(self.context))
    22352189            return
     
    22372191                self.context.bed != None and \
    22382192                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")
    22402194            self.redirect(self.url(self.context))
    22412195            return
     
    22602214            else:
    22612215                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")
    22632217                self.redirect(self.url(self.context))
    22642218                return
     
    23432297                self.flash(_('Password changed.'))
    23442298            else:
    2345                 self.flash( ' '.join(errors))
     2299                self.flash( ' '.join(errors), type="warning")
    23462300        return
    23472301
     
    23912345    def update(self, SUBMIT=None):
    23922346        if not self.context.state == ADMITTED:
    2393             self.flash(_("Wrong state"))
     2347            self.flash(_("Wrong state"), type="warning")
    23942348            self.redirect(self.url(self.context))
    23952349            return
    23962350        if not self.portrait_uploaded:
    2397             self.flash(_("No portrait uploaded."))
     2351            self.flash(_("No portrait uploaded."), type="warning")
    23982352            self.redirect(self.url(self.context, 'change_portrait'))
    23992353            return
    24002354        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")
    24022356            self.redirect(self.url(self.context, 'edit_base'))
    24032357            return
     
    24112365            code = get_access_code(pin)
    24122366            if not code:
    2413                 self.flash(_('Activation code is invalid.'))
     2367                self.flash(_('Activation code is invalid.'), type="warning")
    24142368                return
    24152369            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")
    24172372                return
    24182373            # Mark pin as used (this also fires a pin related transition)
     
    24222377            # expect an exception, but the owner might be different
    24232378            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")
    24252381                return
    24262382            self.context.clr_code = pin
     
    24692425        self.applyData(self.context, **data)
    24702426        if self.dataNotComplete():
    2471             self.flash(self.dataNotComplete())
     2427            self.flash(self.dataNotComplete(), type="warning")
    24722428            return
    24732429        self.flash(_('Clearance form has been saved.'))
     
    24822438                # This shouldn't happen, but the application officer
    24832439                # 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")
    24852442                return
    24862443            IWorkflowInfo(self.context).fireTransition('request_clearance')
     
    25102467            pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number)
    25112468            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")
    25132470                return
    25142471        state = IWorkflowState(self.context).getState()
     
    25162473            # This shouldn't happen, but the application officer
    25172474            # 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")
    25192477            return
    25202478        IWorkflowInfo(self.context).fireTransition('request_clearance')
     
    25412499        super(StartSessionPage, self).update()
    25422500        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")
    25442503            self.redirect(self.url(self.context))
    25452504            return
     
    25532512            code = get_access_code(pin)
    25542513            if not code:
    2555                 self.flash(_('Activation code is invalid.'))
     2514                self.flash(_('Activation code is invalid.'), type="warning")
    25562515                return
    25572516            # Mark pin as used (this also fires a pin related transition)
    25582517            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")
    25602520                return
    25612521            else:
     
    25652525                if not invalidate_accesscode(
    25662526                    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")
    25682529                    return
    25692530        try:
     
    25782539                    'pay_pg_fee')
    25792540        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")
    25812543            return
    25822544        self.flash(_('Session started.'))
     
    26072569        if self.context.student.state != PAID:
    26082570            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))
    26092576            return
    26102577        super(AddStudyLevelFormPage, self).update()
     
    26202587                self.context.certificate,studylevel)
    26212588        except KeyError:
    2622             self.flash(_('This level exists.'))
     2589            self.flash(_('This level exists.'), type="warning")
    26232590        except RequiredMissing:
    2624             self.flash(_('Your data are incomplete'))
     2591            self.flash(_('Your data are incomplete'), type="danger")
    26252592        self.redirect(self.url(self.context))
    26262593        return
     
    26462613            return
    26472614        super(StudyLevelEditFormPage, self).update()
    2648         datatable.need()
    2649         warning.need()
    26502615        if ADD is not None:
    26512616            if not course:
    2652                 self.flash(_('No valid course code entered.'))
     2617                self.flash(_('No valid course code entered.'), type="warning")
    26532618                return
    26542619            cat = queryUtility(ICatalog, name='courses_catalog')
    26552620            result = cat.searchResults(code=(course, course))
    26562621            if len(result) != 1:
    2657                 self.flash(_('Course not found.'))
     2622                self.flash(_('Course not found.'), type="warning")
    26582623                return
    26592624            course = list(result)[0]
     
    26792644            child_id = form['val_id']
    26802645        else:
    2681             self.flash(_('No ticket selected.'))
     2646            self.flash(_('No ticket selected.'), type="warning")
    26822647            self.redirect(self.url(self.context, '@@edit'))
    26832648            return
     
    27102675            self.flash(_(
    27112676                "You are a postgraduate student, "
    2712                 "your course list can't bee registered."))
     2677                "your course list can't bee registered."), type="warning")
    27132678            self.redirect(self.url(self.context))
    27142679            return
     
    27172682        if self.context.total_credits > max_credits:
    27182683            self.flash(_('Maximum credits of ${a} exceeded.',
    2719                 mapping = {'a':max_credits}))
     2684                mapping = {'a':max_credits}), type="warning")
    27202685            return
    27212686        IWorkflowInfo(self.context.student).fireTransition(
     
    27762741            searchtype='reg_number', view=self)
    27772742        if not hitlist:
    2778             self.flash(_('No student found.'))
     2743            self.flash(_('No student found.'), type="warning")
    27792744            return
    27802745        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")
    27822747            return
    27832748        student = hitlist[0].context
     
    27872752        code = get_access_code(pin)
    27882753        if not code:
    2789             self.flash(_('Access code is invalid.'))
     2754            self.flash(_('Access code is invalid.'), type="warning")
    27902755            return
    27912756        if student_pw and pin == student.adm_code:
     
    27972762            self.flash(
    27982763                _('Password has already been set. You are using the ' +
    2799                 'wrong Access Code.'))
     2764                'wrong Access Code.'), type="warning")
    28002765            return
    28012766        # Mark pin as used (this also fires a pin related transition)
    28022767        # and set student password
    28032768        if code.state == USED:
    2804             self.flash(_('Access code has already been used.'))
     2769            self.flash(_('Access code has already been used.'), type="warning")
    28052770            return
    28062771        else:
     
    28602825            student = results[0]
    28612826            if getattr(student,'firstname',None) is None:
    2862                 self.flash(_('An error occurred.'))
     2827                self.flash(_('An error occurred.'), type="danger")
    28632828                return
    28642829            elif student.firstname.lower() != firstname.lower():
     
    28662831                # know that a record was found and only the firstname
    28672832                # verification failed.
    2868                 self.flash(_('No student record found.'))
     2833                self.flash(_('No student record found.'), type="warning")
    28692834                return
    28702835            elif student.password is not None and self._pw_used:
    28712836                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")
    28732839                return
    28742840            # Store email address but nothing else.
     
    28772843        else:
    28782844            # No record found, this is the truth.
    2879             self.flash(_('No student record found.'))
     2845            self.flash(_('No student record found.'), type="warning")
    28802846            return
    28812847
     
    29652931
    29662932    def update(self, SHOW=None, session=None, level=None):
    2967         datatable.need()
    29682933        self.parent_url = self.url(self.context.__parent__)
    29692934        self._set_session_values()
     
    29882953            self.hitlist = self._searchCatalog(self.session, self.level)
    29892954            if not self.hitlist:
    2990                 self.flash(_('No student found.'))
     2955                self.flash(_('No student found.'), type="warning")
    29912956        return
    29922957
     
    30733038            'configuration'].current_academic_session
    30743039        if self.context.__parent__.__parent__.score_editing_disabled:
    3075             self.flash(_('Score editing disabled.'))
     3040            self.flash(_('Score editing disabled.'), type="warning")
    30763041            self.redirect(self.url(self.context))
    30773042            return
    30783043        if not self.current_academic_session:
    3079             self.flash(_('Current academic session not set.'))
     3044            self.flash(_('Current academic session not set.'), type="warning")
    30803045            self.redirect(self.url(self.context))
    30813046            return
    3082         datatable.need()
    30833047        self.tickets = self._searchCatalog(self.current_academic_session)
    30843048        editable_tickets = [
    30853049            ticket for ticket in self.tickets if ticket.editable_by_lecturer]
    30863050        if not self.tickets:
    3087             self.flash(_('No student found.'))
     3051            self.flash(_('No student found.'), type="warning")
    30883052            self.redirect(self.url(self.context))
    30893053            return
     
    31153079            if error:
    31163080                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")
    31183083        return
    31193084
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/accommodationmanagepage.pt

    r9984 r11254  
    22      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    4   <table class="display dataTableManage">
     4  <table class="kofa-data-table dataTableManage">
    55    <thead>
    66    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/basemanagepage.pt

    r9273 r11254  
    33      autocomplete="off">
    44
    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>
    1015  </ul>
    1116
    1217  <div class="tab-content">
    13     <div id="tab-1" tal:attributes="class view/tab1">
     18    <div id="tab1" class="active tab-pane">
     19      <br />
    1420      <table class="form-table">
    1521        <tbody>
     
    1824            <td class="fieldname" i18n:translate="">Password:</td>
    1925            <td>
    20               <input name="password" type="password"  />
     26              <input name="password" class="form-control" type="password"  />
    2127            </td>
    2228          </tr>
     
    2430            <td class="fieldname" i18n:translate="">Retype Password:</td>
    2531            <td>
    26               <input name="control_password" type="password" />
     32              <input name="control_password" class="form-control" type="password" />
    2733            </td>
    2834          </tr>
     
    3844    </div>
    3945
    40     <div id="tab-2"  tal:attributes="class view/tab2">
     46    <div id="tab2" class="tab-pane">
     47      <br />
    4148      <table class="form-table">
    4249        <tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/change_password.pt

    r8486 r11254  
    1010        <td class="fieldname" i18n:translate="">Password:</td>
    1111        <td>
    12           <input name="change_password" type="password"  />
     12          <input name="change_password" class="form-control" type="password"  />
    1313        </td>
    1414      </tr>
     
    1616        <td class="fieldname" i18n:translate="">Retype Password:</td>
    1717        <td>
    18           <input name="change_password_repeat" type="password" />
     18          <input name="change_password_repeat" class="form-control" type="password" />
    1919        </td>
    2020      </tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/clearanceeditpage.pt

    r7811 r11254  
    22      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    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>
    915  </ul>
    1016  <div class="tab-content">
    11     <div id="tab-1" tal:attributes="class view/tab1">
     17    <div id="tab1" class="active tab-pane">
     18      <br />
    1219      <table class="form-table">
    1320        <tbody>
     
    2330    </div>
    2431
    25     <div id="tab-2" tal:attributes="class view/tab2">
     32    <div id="tab2" class="tab-pane">
     33      <br />
    2634      <table class="form-table">
    2735        <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">
    22<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>
    2027
    2128  <p>&nbsp;</p>
     
    2734         tal:attributes="value view/searchtype" />
    2835
    29     <input type="checkbox" onClick="toggle(this, 'entries')" />
    30     <span  i18n:translate="">Select all</span>
    3136    <br /><br />
    32 
    33     <table class="display dataTableManage">
     37    <table class="kofa-data-table dataTableManage">
    3438      <thead>
    3539        <tr>
     
    4347      </thead>
    4448      <tbody>
    45         <tr tal:repeat="item view/hitlist" class="gradeC">
     49        <tr tal:repeat="item view/hitlist">
    4650          <td><input type="checkbox" name="entries"
    4751                     tal:attributes="value item/context/__name__" /></td>
     
    6064      </tbody>
    6165    </table>
    62    
     66    <input type="checkbox" onClick="toggle(this, 'entries')" />
     67    <span  i18n:translate="">Select all</span>
     68    <br /><br />
    6369    <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"
    6571           onclick="return confirmPost('Are you sure?')"/>
    6672
  • 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">
    22<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>&nbsp;</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" />
    5826  </div>
    5927</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  
    22  <br />
    33
    4 
    5   <table class="display dataTable">
     4  <table class="kofa-data-table dataTable">
    65    <thead>
    76        <tr>
     
    1716    </thead>
    1817    <tbody>
    19         <tr tal:repeat="ticket view/tickets" class="gradeC">
     18        <tr tal:repeat="ticket view/tickets">
    2019      <td tal:content="ticket/student/matric_number">MATRIC_NUMBER</td>
    2120          <td tal:condition="ticket/editable_by_lecturer">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/enterpin.pt

    r9952 r11254  
    88        <td>
    99        <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"
    1111               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"
    1313               value="" tal:attributes="value view/ac_number" />
    1414        <font color="red"><span tal:replace="view/notice">Notice</span>
     
    2424      <tr>
    2525        <td colspan="2">
    26           <input type="submit" name="SUBMIT" class="btn primary"
     26          <input type="submit" name="SUBMIT" class="btn btn-primary"
    2727                 tal:attributes="value view/buttonname" />
    2828        </td>
     
    3636      clicking the button below.
    3737    </p>
    38     <input type="submit" name="SUBMIT" class="btn primary"
     38    <input type="submit" name="SUBMIT" class="btn btn-primary"
    3939           tal:attributes="value view/buttonname" />
    4040  </span>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig.pt

    r10390 r11254  
    1 <p class="alert-message warning"  i18n:domain="waeup.kofa"
     1<p class="alert alert-warning"  i18n:domain="waeup.kofa"
    22   i18n:translate="student_export_warning">
    33  <strong>NOTICE:</strong>
     
    1212<form i18n:domain="waeup.kofa" method="POST">
    1313  <label for="mode" i18n:translate="">
    14     Exporter (Data Type):
     14    Exporter (Data Type)
    1515  </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>
    2422  <br />
    2523  <label for="session" i18n:translate="">
    26     Current Session:
     24    Current Session
    2725  </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>
    3632  <br />
    3733  <label for="level" i18n:translate="">
    38     Current Level:
     34    Current Level
    3935  </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>
    4842  <br />
    4943  <label for="mode" i18n:translate="">
    50     Current Study Mode:
     44    Current Study Mode
    5145  </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>
    6052  <br /><br />
    61   <div class="input">
    6253  <input type="submit" name="START"  i18n:translate=""
    6354    value="Create CSV file"
    64     class="btn primary" />
    65   </div>
     55    class="btn btn-primary" />
    6656</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig_certificate.pt

    r10390 r11254  
    1 <p class="alert-message warning"  i18n:domain="waeup.kofa"
     1<p class="alert alert-warning"  i18n:domain="waeup.kofa"
    22   i18n:translate="student_export_warning">
    33  <strong>NOTICE:</strong>
     
    1212<form i18n:domain="waeup.kofa" method="POST">
    1313  <label for="mode" i18n:translate="">
    14     Exporter (Data Type):
     14    Exporter (Data Type)
    1515  </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>
    2422  <br />
    2523  <label for="session" i18n:translate="">
    26     Current Session:
     24    Current Session
    2725  </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>
    3632  <br />
    3733  <label for="level" i18n:translate="">
    38     Current Level:
     34    Current Level
    3935  </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>
    4842  <br /><br />
    49   <div class="input">
    5043  <input type="submit" name="START"  i18n:translate=""
    5144    value="Create CSV file"
    52     class="btn primary" />
    53   </div>
     45    class="btn btn-primary" />
    5446</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
    112<form i18n:domain="waeup.kofa" method="POST">
    213  <label for="mode" i18n:translate="">
    3     Exporter (Data Type):
     14    Exporter (Data Type)
    415  </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>
    1322  <br />
    1423  <label for="session" i18n:translate="">
    15     Level Session:
     24    Level Session
    1625  </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>
    2532  <br />
    2633  <label for="level" i18n:translate="">
    27     Level:
     34    Level
    2835  </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>
    3742  <br /><br />
    38   <div class="input">
    3943  <input type="submit" name="START"  i18n:translate=""
    4044    value="Create CSV file"
    41     class="btn primary" />
    42   </div>
     45    class="btn btn-primary" />
    4346</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">
    22  <thead>
    33    <tr>
     
    2525        <span tal:replace="job/creator">CREATOR</span>
    2626      </td>
    27       <td nowrap>
     27      <td>
    2828        <span tal:replace="job/start_time">DATETIME</span>
    2929      </td>
     
    3232      </td>
    3333      <td nowrap>
    34         <a href="" class="btn" i18n:translate=""
     34        <a href="" class="btn btn-default" i18n:translate=""
    3535           tal:condition="job/show_refresh_button">
    36           <img tal:attributes="src static/actionicon_reload.png" />
     36          <img src="/static/img/actionicon_reload.png" />
    3737          Reload
    3838        </a>
    3939        <form method="POST">
    40           <a href="" class="btn primary small"
     40          <a href="" class="btn btn-primary btn-xs"
    4141                 tal:attributes="href job/download_url"
    4242                 tal:condition="job/show_download_button">
     
    4545          <input type="hidden" name="job_id"
    4646                 tal:attributes="value job/job" />
    47           <input type="submit" class="btn small"
     47          <input type="submit" class="btn btn-default btn-xs"
    4848                 name="DISCARD" value="Discard"
    4949                 tal:condition="job/show_discard_button" />
     
    5353  </tbody>
    5454</table>
     55
    5556<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"
    6058         value="Configure new export"
    6159          />
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/filterstudentspage.pt

    r10536 r11254  
    22  <br />
    33  <label for="session">
    4     <span tal:replace="view/session_label">SESSION</span>:
     4    <span tal:replace="view/session_label">SESSION</span>
    55  </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>
    1917  <br />
    2018  <label for="levels">
    21     <span tal:replace="view/level_label">LEVEL</span>:
     19    <span tal:replace="view/level_label">LEVEL</span>
    2220  </label>
    23   <div class="input">
    24   <select name="level">
     21  <select name="level" class="form-control half">
    2522    <span tal:repeat="item view/levels" tal:omit-tag="">
    2623      <option
     
    3330    </span>
    3431  </select>
    35   </div>
    3632  <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>
    4337
    4438  <br /><br />
     
    5145      <span tal:replace="view/level_string">LEVEL</span>
    5246    </h3>
    53     <table class="display dataTable">
     47    <table class="kofa-data-table dataTable">
    5448      <thead>
    5549        <tr>
     
    6559      </thead>
    6660      <tbody>
    67         <tr tal:repeat="item view/hitlist" class="gradeC">
     61        <tr tal:repeat="item view/hitlist">
    6862          <td> <a tal:attributes="href item/url"
    6963                target="_blank">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/imagedisplay.pt

    r7459 r11254  
    44  </td>
    55  <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)" />
    78      <br />
    89  </td>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/imageupload.pt

    r7876 r11254  
    55  <td>
    66    <img align="middle" height="125px"
    7          tal:attributes="src viewlet/download_name" />
     7         tal:attributes="src python: view.url(context, viewlet.download_name)" />
    88    <input type="submit" tal:condition="viewlet/file_exists"
    99     tal:attributes="id python:('delete_%s' % viewlet.input_name);
    1010        name python:('delete_%s' % viewlet.input_name)"
    11      value="Delete" class="btn error" />
     11     value="Delete" class="btn btn-danger" />
    1212    <br /><br />
    1313    <input type="file" tal:attributes="name viewlet/input_name"/>
     
    1717                name python:('upload_%s' % viewlet.input_name);
    1818                value viewlet/upload_button"
    19              value="Upload" class="btn primary" />
     19             value="Upload" class="btn btn-primary" />
    2020    <span i18n:translate="">
    2121      Max. file size:
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/loginasstep2.pt

    r9338 r11254  
    99  <input type="hidden" name="form.login" tal:attributes="value view/context/student_id" />
    1010  <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"
    1212    tal:attributes="value view/login_button" />
    1313</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">
    22  <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>
    47  <ul class="dropdown-menu">
    58    <li tal:repeat="target viewlet/targets">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt

    r9729 r11254  
    88        </td>
    99        <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">
    1112            <option tal:repeat="item view/selectable_categories"
    1213                    tal:attributes="value python:item[0]">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/paymentsmanagepage.pt

    r10232 r11254  
    22      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    4   <table class="display dataTableManage">
     4  <table class="kofa-data-table dataTableManage">
    55    <thead>
    66    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studycoursemanagepage.pt

    r10266 r11254  
    22      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    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>
    79    </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>
    1014    </li>
    1115  </ul>
    1216
    1317  <div class="tab-content">
    14     <div id="tab-1" tal:attributes="class view/tab1">
     18    <div id="tab1" class="active tab-pane">
     19      <br />
    1520      <table class="form-table">
    1621      <tbody>
     
    2732    </div>
    2833
    29     <div id="tab-2" tal:attributes="class view/tab2">
    30       <h3 i18n:translate="">Study Levels (Course Lists)</h3>
    31       <table class="display dataTableManage">
     34    <div id="tab2" class="tab-pane">
     35      <br />
     36      <table class="kofa-data-table dataTableManage">
    3237        <thead>
    3338          <tr>
     
    4449                         tal:attributes="value cl/__name__" />
    4550            </td>
    46             <td> <a tal:attributes="href cl/__name__">
     51            <td> <a tal:attributes="href python:view.url(cl)">
    4752              <span tal:content="cl/level">CODE</span></a>
    4853            </td>
     
    6267      </div>
    6368      <br /><br /><br />
    64       <div>
     69
     70
     71      <div class="form-inline">
    6572        <span tal:condition="view/availableActions">
    66           <span tal: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>
    7178        </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>
    7887        &nbsp;&nbsp;<span i18n:translate="">in session</span>&nbsp;&nbsp;
    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>
    8596      </div>
     97
    8698    </div>
    8799  </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studycoursepage.pt

    r10250 r11254  
    6464<h3 i18n:domain="waeup.kofa" i18n:translate="">Study Levels (Course Lists)</h3>
    6565
    66 <table i18n:domain="waeup.kofa">
     66<table i18n:domain="waeup.kofa" class="table">
    6767  <thead>
    6868    <tr>
     
    7272  </thead>
    7373  <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)">
    7676      <span tal:content="value/level">CODE</span></a></td>
    7777      <td tal:content="value/level_title">TITLE</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studyleveleditpage.pt

    r10440 r11254  
    88      tal:replace="view/context/total_credits">TOTAL</span>)
    99  </h3>
    10   <table class="display dataTableManage">
     10  <table class="kofa-data-table dataTableManage">
    1111  <thead>
    1212    <tr>
     
    2323  </thead>
    2424  <tbody>
    25     <tr tal:repeat="value view/translated_values" class="gradeC">
     25    <tr tal:repeat="value view/translated_values">
    2626       <td>
    2727        <input type="checkbox" name="val_id"
     
    3030      </td>
    3131      <td tal:content="value/semester" nowrap>TERM</td>
    32       <td> <a tal:attributes="href value/__name__">
     32      <td> <a tal:attributes="href value/url">
    3333      <span tal:content="value/code">CODE</span>
    3434      </a></td>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelmanagepage.pt

    r10440 r11254  
    22      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    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>
    79    </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>
    1115  </ul>
    1216
    1317  <div class="tab-content">
    14     <div id="tab-1" tal:attributes="class view/tab1">
     18    <div id="tab1" class="active tab-pane">
     19      <br />
    1520      <table class="form-table">
    1621      <tbody>
     
    2732    </div>
    2833
    29     <div id="tab-2" tal:attributes="class view/tab2">
    30       <h3 i18n:translate="">Course Tickets</h3>
    31       <table class="display dataTableManage">
    32       <thead>
    33         <tr>
    34           <th>&nbsp;</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>&nbsp;</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>
    6772      </table>
    6873
     
    7479        </span>
    7580      </div>
    76 
    7781      <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"
    8285                   i18n:translate=""
    8386                   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 />
    9394      <p i18n:translate="">
    9495        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  
    11<table class="form-table" i18n:domain="waeup.kofa">
    2   <thead>
    3   </thead>
    42  <tbody>
    53    <tal:block repeat="widget view/widgets">
     
    2018<h3 i18n:domain="waeup.kofa" i18n:translate="">Course Tickets</h3>
    2119
    22 <table class="display dataTable" i18n:domain="waeup.kofa">
     20<table class="kofa-data-table dataTable" i18n:domain="waeup.kofa">
    2321  <thead>
    2422    <tr>
     
    3735  </thead>
    3836  <tbody>
    39     <tr tal:repeat="value view/translated_values" class="gradeC">
     37    <tr tal:repeat="value view/translated_values">
    4038      <td tal:content="value/semester" nowrap>TERM</td>
    41       <td> <a tal:attributes="href value/__name__">
     39      <td> <a tal:attributes="href value/url">
    4240      <span tal:content="value/code">CODE</span>
    4341      </a></td>
     
    5553</table>
    5654
    57 
    5855<div i18n:domain="waeup.kofa"
    5956  tal:condition="python: not len(context.keys())" i18n:translate="">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcript.pt

    r10436 r11254  
    4545      <tal:semesters tal:repeat="semester_tickets python:(level['tickets_1'],
    4646                                      level['tickets_2'], level['tickets_3'])">
    47       <tr tal:repeat="ticket semester_tickets" class="gradeC">
     47      <tr tal:repeat="ticket semester_tickets">
    4848        <td tal:content="python: view.level_dict[ticket.level]">LEVEL</td>
    4949        <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  
    11<form method="POST" i18n:domain="waeup.kofa">
    22
    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>
    814  </ul>
    915
    1016  <div class="tab-content">
    11     <div id="tab-1" tal:attributes="class view/tab1">
     17    <div id="tab1" class="active tab-pane">
    1218
    1319      <table class="form-table">
     
    3238    </div>
    3339
    34     <div id="tab-2" tal:attributes="class view/tab2">
     40    <div id="tab2" class="tab-pane">
    3541      <p tal:content="structure view/correspondence"></p>
    3642    </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcriptrequest.pt

    r10472 r11254  
    11<form method="POST" i18n:domain="waeup.kofa">
    22
    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>
    813  </ul>
    914
    1015  <div class="tab-content">
    11     <div id="tab-1" tal:attributes="class view/tab1">
     16    <div id="tab1" class="active tab-pane">
    1217
    1318      <p i18n:translate="transcript_request"></p>
     
    6570    </div>
    6671
    67     <div id="tab-2"  tal:attributes="class view/tab2">
     72    <div id="tab2" class="tab-pane">
    6873      <p tal:content="structure view/correspondence"></p>
    6974    </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/trigtrans.pt

    r9273 r11254  
    44
    55
    6     <select id="transition" name="transition">
     6    <select id="transition" name="transition" class="form-control half">
    77      <option tal:repeat="transition view/getTransitions"
    88              tal:attributes="value transition/name">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/dynamicroles.py

    r10639 r11254  
    7979                    # Found a Course Adviser role in external attribute or parent
    8080                    # 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:
    8282                        # Grant additional role, which allows to validate or reject
    8383                        # course lists, only if external role corresponds
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/browser_templates/levelreportgeneratorpage.pt

    r10560 r11254  
    77  </p>
    88  <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>
    5831  </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>
    6548</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/browser_templates/studentstatisticsreportgeneratorpage.pt

    r10550 r11254  
    77  </p>
    88  <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>
    4935</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py

    r10650 r11254  
    208208from waeup.kofa.interfaces import academic_sessions_vocab
    209209from waeup.kofa.reports import get_generators
     210from waeup.kofa.browser.breadcrumbs import Breadcrumb
    210211grok.templatedir('browser_templates')
    211212class LevelReportGeneratorPage(KofaPage):
     
    291292            self.context.creation_dt_string)
    292293
     294class 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  
    198198from waeup.kofa.interfaces import academic_sessions_vocab
    199199from waeup.kofa.reports import get_generators
     200from waeup.kofa.browser.breadcrumbs import Breadcrumb
    200201grok.templatedir('browser_templates')
    201202class SessionResultsPresentationGeneratorPage(LevelReportGeneratorPage):
     
    230231            self.context.sessioncode, self.context.levelcode,
    231232            self.context.creation_dt_string)
     233
     234class 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  
    168168from waeup.kofa.interfaces import academic_sessions_vocab
    169169from waeup.kofa.reports import get_generators
     170from waeup.kofa.browser.breadcrumbs import Breadcrumb
    170171grok.templatedir('browser_templates')
    171172class StudentStatisticsReportGeneratorPage(KofaPage):
     
    240241            ob_class, self.context.__name__, filename))
    241242        return pdf_stream
     243
     244class 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  
    613613        # There is a correct <img> link included
    614614        self.assertTrue(
    615             '<a target="image" href="birth_certificate">'
     615            'href="http://localhost/app/students/K1000000/birth_certificate"'
    616616            in self.browser.contents)
    617617        # Browsing the link shows a real image
     
    673673            name='upload_passportuploadmanage').click()
    674674        self.assertTrue(
    675             '<img align="middle" height="125px" src="passport.jpg" />'
     675            'src="http://localhost/app/students/K1000000/passport.jpg"'
    676676            in self.browser.contents)
    677677        # We remove the passport file again
     
    19581958        # We are logged in as student and can see the 'My Data' tab
    19591959        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...',
    19611964            self.browser.contents)
    19621965        self.browser.getLink("Logout").click()
     
    21982201        self.browser.getControl("Login").click()
    21992202        self.assertMatches(
    2200             '...<div class="alert-message warning">'
     2203            '...<div class="alert alert-warning">'
    22012204            'Your account has been deactivated.</div>...', self.browser.contents)
    22022205        # If suspended_comment is set this message will be flashed instead
     
    22062209        self.browser.getControl("Login").click()
    22072210        self.assertMatches(
    2208             '...<div class="alert-message warning">Aetsch baetsch!</div>...',
     2211            '...<div class="alert alert-warning">Aetsch baetsch!</div>...',
    22092212            self.browser.contents)
    22102213        self.student.suspended = False
     
    22652268            name='upload_passportuploadedit').click()
    22662269        self.assertTrue(
    2267             '<img align="middle" height="125px" src="passport.jpg" />'
     2270            'src="http://localhost/app/students/K1000000/passport.jpg"'
    22682271            in self.browser.contents)
    22692272        # Students can open admission letter
     
    23232326            name='upload_birthcertificateupload').click()
    23242327        self.assertTrue(
    2325             '<a target="image" href="birth_certificate">Birth Certificate Scan</a>'
     2328            'href="http://localhost/app/students/K1000000/birth_certificate"'
    23262329            in self.browser.contents)
    23272330        # Students can open clearance slip
     
    23582361        # Now students can add the current study level
    23592362        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
    23602368        self.browser.getLink("Add course list").click()
    23612369        self.assertMatches('...Add current level 100 (Year 1)...',
  • main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py

    r10816 r11254  
    825825    size = file_size(upload)
    826826    if size > max_size:
    827         view.flash(_('Uploaded file is too big.'))
     827        view.flash(_('Uploaded file is too big.'), type="danger")
    828828        return False
    829829    upload.seek(0) # file pointer moved when determining size
     
    831831    upload.seek(0) # same here
    832832    if file_format is None:
    833         view.flash(_('Could not determine file type.'))
     833        view.flash(_('Could not determine file type.'), type="danger")
    834834        return False
    835835    basename, expected_ext = os.path.splitext(download_name)
     
    837837        if '.' + file_format != expected_ext:
    838838            view.flash(_('${a} file extension expected.',
    839                 mapping = {'a':expected_ext[1:]}))
     839                mapping = {'a':expected_ext[1:]}), type="danger")
    840840            return False
    841841    else:
     
    843843            view.flash(
    844844                _('Only the following extensions are allowed: ${a}',
    845                 mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)}))
     845                mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)}),
     846                type="danger")
    846847            return False
    847848        download_name += '.' + file_format
     
    891892    template = default_fileupload_template
    892893    grok.require('waeup.uploadStudentFile')
    893     tab_redirect = '?tab2'
     894    tab_redirect = '#tab2-top'
    894895    mus = 1024 * 150
    895896    upload_button =_('Upload new file')
     
    931932                        self.context, self.view.__name__) + self.tab_redirect)
    932933            else:
    933                 self.view.flash(_('No local file selected.'))
     934                self.view.flash(_('No local file selected.'), type="danger")
    934935                self.view.redirect(
    935936                    self.view.url(
     
    959960    mus = 1024 * 50
    960961    download_name = u'passport.jpg'
    961     tab_redirect = '?tab2'
     962    tab_redirect = '#tab2'
    962963
    963964class PassportUploadEdit(PassportUploadManage):
     
    986987    mus = 1024 * 150
    987988    download_name = u'birth_certificate'
    988     tab_redirect = '?tab2'
     989    tab_redirect = '#tab2-top'
    989990
    990991class Image(grok.View):
Note: See TracChangeset for help on using the changeset viewer.