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:
69 deleted
107 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk

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

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

    r9637 r11254  
    2222from zope.component import getUtility
    2323from hurry.workflow.interfaces import InvalidTransitionError
    24 from waeup.kofa.browser.resources import datatable
    2524from waeup.kofa.browser.layout import KofaPage, KofaAddFormPage, NullValidator
    2625from waeup.kofa.browser.breadcrumbs import Breadcrumb
     
    5251            return
    5352        if not batches:
    54             self.flash(_('No batch selected.'))
     53            self.flash(_('No batch selected.'), type='warning')
    5554            return
    5655        if isinstance(batches, basestring):
     
    102101    @action(_('Cancel'), validator=NullValidator)
    103102    def cancel(self, *args, **kw):
    104         self.flash(_('Batch creation cancelled.'))
     103        self.flash(_('Batch creation cancelled.'), type='warning')
    105104        self.redirect(self.url(self.context))
    106105
     
    120119    def update(self, filenames=None, reimport=None, cancel=None):
    121120        if cancel is not None:
    122             self.flash(_('Reimport cancelled.'))
     121            self.flash(_('Reimport cancelled.'), type='warning')
    123122            self.redirect(self.url(self.context))
    124123            return
     
    126125            return
    127126        if not filenames:
    128             self.flash(_('No file chosen. Action cancelled.'))
     127            self.flash(_('No file chosen. Action cancelled.'), type='warning')
    129128            self.redirect(self.url(self.context))
    130129            return
     
    137136            except KeyError:
    138137                self.flash(_('This batch already exists: ${a}',
    139                     mapping = {'a':filename}))
     138                    mapping = {'a':filename}), type='warning')
    140139                continue
    141140            self.flash(_('Successfully reimported: ${a}',
     
    156155    disable_button = _('Disable ACs')
    157156    enable_button = _('Enable ACs')
     157    cancel_button = _('Cancel Search')
    158158
    159159    def update(self, *args, **kw):
    160         datatable.need()
    161160        form = self.request.form
     161        if 'cancel' in form:
     162            self.redirect(self.url(self.context))
     163            return
    162164        self.hitlist = []
    163165        if 'searchterm' in form and form['searchterm']:
     
    187189                except InvalidTransitionError:
    188190                    self.flash(_('${a}: Disable transition not allowed.',
    189                         mapping = {'a':entry}))
     191                        mapping = {'a':entry}), type='danger')
    190192            elif 'enable' in form:
    191193                try:
     
    196198                    self.context.logger_info(ob_class, message)
    197199                except InvalidTransitionError:
    198                     self.flash(_('${a}: Re-enable transition not allowed.', mapping = {'a':entry}))
     200                    self.flash(_('${a}: Re-enable transition not allowed.',
     201                               mapping = {'a':entry}), type='danger')
    199202        self.hitlist = search(query=self.searchterm,
    200203            searchtype=self.searchtype, view=self)
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.txt

    r10207 r11254  
    273273    >>> ctrl.getControl(value='code').selected = True
    274274    >>> browser.getControl(name='searchterm').value = app_1_codes.keys()[0]
    275     >>> browser.getControl('Search').click()
     275    >>> browser.getControl(name='search').click()
    276276
    277277The first access code in the ``APP-1`` batch is displayed:
     
    295295    >>> ctrl.getControl(value='batch_serial').selected = True
    296296    >>> browser.getControl(name='searchterm').value = '1'
    297     >>> browser.getControl('Search').click()
     297    >>> browser.getControl(name='search').click()
    298298    >>> print browser.contents
    299299    <!DOCTYPE html ...
     
    311311    >>> ctrl.getControl(value='batch_serial').selected = True
    312312    >>> browser.getControl(name='searchterm').value = 'xyz'
    313     >>> browser.getControl('Search').click()
     313    >>> browser.getControl(name='search').click()
    314314    >>> print browser.contents
    315315    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     
    324324    >>> ctrl.getControl(value='history').selected = True
    325325    >>> browser.getControl(name='searchterm').value = 'initialized'
    326     >>> browser.getControl('Search').click()
     326    >>> browser.getControl(name='search').click()
    327327    >>> print browser.contents
    328328    <!DOCTYPE html ...
     
    345345    >>> ctrl.getControl(value='history').selected = True
    346346    >>> browser.getControl(name='searchterm').value = 'initialized'
    347     >>> browser.getControl('Search').click()
     347    >>> browser.getControl(name='search').click()
    348348
    349349This lists all access codes. We now tick one to disable it and click
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/batchcontainer.pt

    r9267 r11254  
    33    The following batches are available:
    44  </p>
    5   <table>
     5  <table class="table">
    66    <thead>
    77      <tr>
     
    4848    </tbody>
    4949  </table>
    50   <input type="submit" class="btn" name="archive"
     50  <input type="submit" class="btn btn-default" name="archive"
    5151      tal:attributes="value view/archive_button" />
    52   <input type="submit" class="btn" name="delete"
     52  <input type="submit" class="btn btn-default" name="delete"
    5353       tal:attributes="value view/delete_button" />
    5454</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/reimportbatchpage.pt

    r7811 r11254  
    44</p>
    55<form method="POST" i18n:domain="waeup.kofa">
    6   <table>
     6  <table class="table">
    77    <thead>
    88      <tr>
     
    2525    </tbody>
    2626  </table>
    27   <input type="submit" class="btn primary" name="reimport"
     27  <input type="submit" class="btn btn-primary" name="reimport"
    2828      tal:attributes="value view/reimport_button" />
    29   <input type="submit" class="btn" name="cancel"
     29  <input type="submit" class="btn btn-default" name="cancel"
    3030      tal:attributes="value view/cancel_button" />
    3131</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/searchpage.pt

    r7811 r11254  
    1 <form method="POST" i18n:domain="waeup.kofa">
     1<form method="POST" i18n:domain="waeup.kofa" class="form-inline">
    22<br />
    3   <input type="submit" class="btn primary" name="search"
    4       tal:attributes="value view/search_button" />
     3  <div class="form-group">
     4    <input type="submit" class="btn btn-primary" name="search"
     5        tal:attributes="value view/search_button" />
    56  <span i18n:translate="">for access codes</span>
    6   <select name="searchtype">
    7     <option i18n:translate="" value="code">with PIN</option>
    8     <option i18n:translate="" value="batch_serial">with serial</option>
    9     <option i18n:translate="" value="history">with message term</option>
    10   </select>
    11   <input type="text" name="searchterm" />
     7  </div>
     8  <div class="form-group">
     9    <select name="searchtype" class="form-control">
     10      <option i18n:translate="" value="code">with PIN</option>
     11      <option i18n:translate="" value="batch_serial">with serial</option>
     12      <option i18n:translate="" value="history">with message term</option>
     13    </select>
     14  </div>
     15  <div class="form-group">
     16    <input type="text" class="form-control" name="searchterm" />
     17  </div>
    1218  <p>&nbsp;</p>
    1319  <div tal:condition="view/hitlist">
     
    1723    <input type="hidden" name="old_searchtype"
    1824         tal:attributes="value view/searchtype" />
    19     <table class="display dataTableManage">
     25    <table class="kofa-data-table dataTableManage">
    2026      <thead>
    2127      <tr>
     
    4349    </table>
    4450    <div>
    45       <input type="submit" class="btn" name="disable"
     51      <input type="submit" class="btn btn-default" name="disable"
    4652          tal:attributes="value view/disable_button" />
    47       <input type="submit" class="btn" name="enable"
     53      <input type="submit" class="btn btn-default" name="enable"
    4854          tal:attributes="value view/enable_button" />
     55      <input type="submit" class="btn btn-default" name="cancel"
     56          tal:attributes="value view/cancel_button" />
    4957    </div>
    50 
     58  </div>
     59  <div tal:condition="not: view/hitlist">
     60    <input type="submit" class="btn btn-default" name="cancel"
     61        tal:attributes="value view/cancel_button" />
    5162  </div>
    5263</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r11253 r11254  
    4646from waeup.kofa.browser.interfaces import ICaptchaManager
    4747from waeup.kofa.browser.breadcrumbs import Breadcrumb
    48 from waeup.kofa.browser.resources import toggleall
    4948from waeup.kofa.browser.layout import (
    5049    NullValidator, jsaction, action, UtilityView, JSAction)
    5150from waeup.kofa.browser.pages import (
    5251    add_local_role, del_local_roles, doll_up, ExportCSVView)
    53 from waeup.kofa.browser.resources import datepicker, tabs, datatable, warning
    5452from waeup.kofa.interfaces import (
    5553    IKofaObject, ILocalRolesAssignable, IExtFileStore, IPDF,
     
    116114
    117115    def update(self, *args, **kw):
    118         datatable.need()
    119116        form = self.request.form
    120117        self.results = []
     
    127124        else:
    128125            if 'search' in form:
    129                 self.flash(_('Empty search string'))
     126                self.flash(_('Empty search string'), type='warning')
    130127            return
    131128        self.results = search(query=self.searchterm,
    132129            searchtype=self.searchtype, view=self)
    133130        if not self.results:
    134             self.flash(_('No applicant found.'))
     131            self.flash(_('No applicant found.'), type='warning')
    135132        return
    136133
     
    149146    subunits = _('Applicants Containers')
    150147
    151     def update(self):
    152         tabs.need()
    153         datatable.need()
    154         warning.need()
    155         self.tab1 = self.tab2 = self.tab3 = ''
    156         qs = self.request.get('QUERY_STRING', '')
    157         if not qs:
    158             qs = 'tab1'
    159         setattr(self, qs, 'active')
    160         return super(ApplicantsRootManageFormPage, self).update()
    161 
    162148    def getLocalRoles(self):
    163149        roles = ILocalRolesAssignable(self.context)
     
    180166            child_id = form['val_id']
    181167        else:
    182             self.flash(_('No container selected!'))
    183             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     168            self.flash(_('No container selected!'), type='warning')
     169            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    184170            return
    185171        if not isinstance(child_id, list):
     
    192178            except:
    193179                self.flash(_('Could not delete:') + ' %s: %s: %s' % (
    194                         id, sys.exc_info()[0], sys.exc_info()[1]))
     180                    id, sys.exc_info()[0], sys.exc_info()[1]), type='danger')
    195181        if len(deleted):
    196182            self.flash(_('Successfully removed: ${a}',
    197183                mapping = {'a':', '.join(deleted)}))
    198         self.redirect(self.url(self.context, '@@manage')+'?tab2')
     184        self.redirect(self.url(self.context, '@@manage')+'#tab2')
    199185        return
    200186
     
    235221    form_fields = grok.AutoFields(
    236222        IApplicantsContainerAdd).omit('code').omit('title')
    237 
    238     def update(self):
    239         datepicker.need() # Enable jQuery datepicker in date fields.
    240         return super(ApplicantsContainerAddFormPage, self).update()
    241223
    242224    @action(_('Add applicants container'))
     
    249231        if code in self.context.keys():
    250232            self.flash(
    251                 _('An applicants container for the same application type and entrance year exists already in the database.'))
     233              _('An applicants container for the same application '
     234                'type and entrance year exists already in the database.'),
     235                type='warning')
    252236            return
    253237        # Add new applicants container...
     
    378362        return False
    379363
    380     def update(self):
    381         datepicker.need() # Enable jQuery datepicker in date fields.
    382         tabs.need()
    383         toggleall.need()
    384         self.tab1 = self.tab2 = self.tab3 = ''
    385         qs = self.request.get('QUERY_STRING', '')
    386         if not qs:
    387             qs = 'tab1'
    388         setattr(self, qs, 'active')
    389         warning.need()
    390         datatable.need()  # Enable jQurey datatables for contents listing
    391         return super(ApplicantsContainerManageFormPage, self).update()
    392 
    393364    def getLocalRoles(self):
    394365        roles = ILocalRolesAssignable(self.context)
     
    436407            child_id = form['val_id']
    437408        else:
    438             self.flash(_('No applicant selected!'))
    439             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     409            self.flash(_('No applicant selected!'), type='warning')
     410            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    440411            return
    441412        if not isinstance(child_id, list):
     
    448419            except:
    449420                self.flash(_('Could not delete:') + ' %s: %s: %s' % (
    450                         id, sys.exc_info()[0], sys.exc_info()[1]))
     421                    id, sys.exc_info()[0], sys.exc_info()[1]), type='danger')
    451422        if len(deleted):
    452423            self.flash(_('Successfully removed: ${a}',
    453424                mapping = {'a':', '.join(deleted)}))
    454         self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     425        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    455426        return
    456427
     
    461432            child_id = form['val_id']
    462433        else:
    463             self.flash(_('No applicant selected!'))
    464             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     434            self.flash(_('No applicant selected!'), type='warning')
     435            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    465436            return
    466437        if not isinstance(child_id, list):
     
    475446                mapping = {'a': len(created)}))
    476447        else:
    477             self.flash(_('No student could be created.'))
    478         self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     448            self.flash(_('No student could be created.'), type='warning')
     449        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    479450        return
    480451
     
    612583    def update(self):
    613584        msg = self.context.createStudent(view=self)[1]
    614         self.flash(msg)
     585        self.flash(msg, type='warning')
    615586        self.redirect(self.url(self.context))
    616587        return
     
    652623                mapping = {'a': len(created)}))
    653624        else:
    654             self.flash(_('No student could be created.'))
     625            self.flash(_('No student could be created.'), type='warning')
    655626        self.redirect(self.url(self.context))
    656627        return
     
    672643            if ticket.p_state == 'paid':
    673644                  self.flash(
    674                       _('This type of payment has already been made.'))
     645                      _('This type of payment has already been made.'),
     646                      type='warning')
    675647                  self.redirect(self.url(self.context))
    676648                  return
     
    678650        container = self.context.__parent__
    679651        payment = createObject(self.factory)
    680         error = applicants_utils.setPaymentDetails(
     652        failure = applicants_utils.setPaymentDetails(
    681653            container, payment, self.context)
    682         if error is not None:
    683             self.flash(error)
     654        if failure is not None:
     655            self.flash(failure[0], type='danger')
    684656            self.redirect(self.url(self.context))
    685657            return
     
    731703                self.context.p_id, self.context.p_category,
    732704                self.context.amount_auth, self.context.r_code))
    733         self.flash(msg)
     705        self.flash(msg, type='warning')
    734706        return
    735707
     
    785757        if self.context.state in ('initialized', 'started', 'paid'):
    786758            self.flash(
    787                 _('Please pay and submit before trying to download the application slip.'))
     759                _('Please pay and submit before trying to download '
     760                  'the application slip.'), type='warning')
    788761            return self.redirect(self.url(self.context))
    789762        return
     
    806779    size = file_size(upload)
    807780    if size > MAX_UPLOAD_SIZE:
    808         view.flash(_('Uploaded image is too big!'))
     781        view.flash(_('Uploaded image is too big!'), type='danger')
    809782        return False
    810783    dummy, ext = os.path.splitext(upload.filename)
    811784    ext.lower()
    812785    if ext != '.jpg':
    813         view.flash(_('jpg file extension expected.'))
     786        view.flash(_('jpg file extension expected.'), type='danger')
    814787        return False
    815788    upload.seek(0) # file pointer moved when determining size
     
    851824
    852825    def update(self):
    853         datepicker.need() # Enable jQuery datepicker in date fields.
    854         warning.need()
    855826        super(ApplicantManageFormPage, self).update()
    856827        self.wf_info = IWorkflowInfo(self.context)
     
    894865            errors = validator.validate_password(password, password_ctl)
    895866            if errors:
    896                 self.flash( ' '.join(errors))
     867                self.flash( ' '.join(errors), type='danger')
    897868                return
    898869        if self.upload_success is False:  # False is not None!
     
    927898            child_id = form['val_id']
    928899        else:
    929             self.flash(_('No payment selected.'))
     900            self.flash(_('No payment selected.'), type='warning')
    930901            self.redirect(self.url(self.context))
    931902            return
     
    941912                except:
    942913                    self.flash(_('Could not delete:') + ' %s: %s: %s' % (
    943                             id, sys.exc_info()[0], sys.exc_info()[1]))
     914                      id, sys.exc_info()[0], sys.exc_info()[1]), type='danger')
    944915        if len(deleted):
    945916            self.flash(_('Successfully removed: ${a}',
     
    1013984
    1014985    def emit_lock_message(self):
    1015         self.flash(_('The requested form is locked (read-only).'))
     986        self.flash(_('The requested form is locked (read-only).'),
     987                   type='warning')
    1016988        self.redirect(self.url(self.context))
    1017989        return
     
    10541026            return
    10551027        if data.get('course1', 1) == data.get('course2', 2):
    1056             self.flash(_('1st and 2nd choice must be different.'))
     1028            self.flash(_('1st and 2nd choice must be different.'),
     1029                       type='warning')
    10571030            return
    10581031        self.applyData(self.context, **data)
     
    10651038            return # error during image upload. Ignore other values
    10661039        if self.dataNotComplete():
    1067             self.flash(self.dataNotComplete())
     1040            self.flash(self.dataNotComplete(), type='danger')
    10681041            return
    10691042        self.applyData(self.context, **data)
     
    10721045        # might have forgotten to lock the form after changing the state
    10731046        if state != self.submit_state:
    1074             self.flash(_('The form cannot be submitted. Wrong state!'))
     1047            self.flash(_('The form cannot be submitted. Wrong state!'),
     1048                       type='danger')
    10751049            return
    10761050        IWorkflowInfo(self.context).fireTransition('submit')
     
    11261100    def update(self):
    11271101        if self.context.expired:
    1128             self.flash(_('Outside application period.'))
     1102            self.flash(_('Outside application period.'), type='warning')
    11291103            self.redirect(self.url(self.context))
    11301104            return
     
    11641138                applicant = results[0]
    11651139                if getattr(applicant,'firstname',None) is None:
    1166                     self.flash(_('An error occurred.'))
     1140                    self.flash(_('An error occurred.'), type='danger')
    11671141                    return
    11681142                elif applicant.firstname.lower() != firstname.lower():
     
    11701144                    # know that a record was found and only the firstname
    11711145                    # verification failed.
    1172                     self.flash(_('No application record found.'))
     1146                    self.flash(_('No application record found.'), type='warning')
    11731147                    return
    11741148                elif applicant.password is not None and \
    11751149                    applicant.state != INITIALIZED:
    11761150                    self.flash(_('Your password has already been set and used. '
    1177                                  'Please proceed to the login page.'))
     1151                                 'Please proceed to the login page.'),
     1152                               type='warning')
    11781153                    return
    11791154                # Store email address but nothing else.
     
    11821157            else:
    11831158                # No record found, this is the truth.
    1184                 self.flash(_('No application record found.'))
     1159                self.flash(_('No application record found.'), type='warning')
    11851160                return
    11861161        else:
     
    12271202    grok.name('index.html')
    12281203    grok.template('exportjobsindex')
    1229     label = _('Applicant Data Exports')
     1204    label = _('Data Exports')
    12301205    pnav = 3
    12311206
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantcontainerstatistics.pt

    r8643 r11254  
    11<tal:statistics define="stats context/statistics" i18n:domain="waeup.kofa">
    22  <h2 i18n:translate="">Container Statistics</h2>
    3   <table class="span8">
     3  <table class="table">
    44    <thead>
    55      <tr>
     
    1717    </tbody>
    1818  </table>
    19   <table class="span8" tal:condition="python: stats[1]">
     19  <table class="table" tal:condition="python: stats[1]">
    2020    <thead>
    2121      <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt

    r10353 r11254  
    4141    Application Fee Payment Tickets
    4242</h3>
    43 <table i18n:domain="waeup.kofa">
     43<table i18n:domain="waeup.kofa" class="table table-condensed">
    4444  <thead>
    4545    <tr>
     
    5454  <tbody>
    5555    <tr tal:repeat="value context/values">
    56       <td> <a tal:attributes="href value/__name__">
     56      <td> <a tal:attributes="href python:view.url(value)">
    5757      <span tal:content="value/p_id">PID</span></a></td>
    5858      <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt

    r10353 r11254  
    3838        <td class="fieldname" i18n:translate="">Password:</td>
    3939        <td>
    40           <input name="password" type="password"  />
     40          <input class="form-control" name="password" type="password"  />
    4141        </td>
    4242      </tr>
     
    4444        <td class="fieldname" i18n:translate="">Retype Password:</td>
    4545        <td>
    46           <input name="control_password" type="password" />
     46          <input class="form-control" name="control_password" type="password" />
    4747        </td>
    4848      </tr>
     
    5050        <td class="fieldname" i18n:translate="">Application Transition:</td>
    5151        <td>
    52           <select id="transition" name="transition">
     52          <select id="transition" name="transition" class="form-control half">
    5353            <option tal:repeat="transition view/getTransitions"
    5454                    tal:attributes="value transition/name">
     
    8484  </h3>
    8585
    86   <table>
     86  <table i18n:domain="waeup.kofa" class="table table-condensed">
    8787    <thead>
    8888    <tr>
     
    104104         tal:condition="python: not view.unremovable(cl)" />
    105105        </td>
    106         <td> <a tal:attributes="href cl/__name__">
     106        <td> <a tal:attributes="href python:view.url(cl)">
    107107        <span tal:content="cl/p_id">PID</span></a></td>
    108108        <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantregemailsent.pt

    r8855 r11254  
    1919<tal:credentials condition = "view/password" i18n:domain="waeup.kofa">
    2020  <h3 i18n:translate="">Your login credentials are:</h3>
    21   <table class="bordered-table span6">
     21  <table class="table-bordered">
    2222    <tr>
    2323      <td i18n:translate="">User Name:</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontaineraddpage.pt

    r7737 r11254  
    11<form action="." tal:attributes="action request/URL" method="post"
    2   class="edit-form" enctype="multipart/form-data">
     2  enctype="multipart/form-data">
    33
    44  <table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontainermanagepage.pt

    r9339 r11254  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   i18n:domain="waeup.kofa" class="edit-form" enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    4   <ul class="tabs" data-tabs="tabs">
    5     <li tal:attributes="class view/tab1">
    6     <a href="#tab-1">
     4 <ul class="tabs nav nav-tabs" data-tabs="tabs">
     5    <li class="active">
     6    <a href="#tab1" data-toggle="tab">
    77      <span i18n:translate="">Settings
    88      </span></a>
    99    </li>
    10     <li tal:attributes="class view/tab2">
    11     <a href="#tab-2">
     10    <li>
     11    <a href="#tab2" data-toggle="tab">
    1212      <span i18n:translate="">Applicants
    1313      </span></a>
    1414    </li>
    15     <li tal:attributes="class view/tab3">
    16     <a href="#tab-3">
     15    <li>
     16    <a href="#tab3" data-toggle="tab">
    1717      <span i18n:translate="">Local Roles
    1818      </span></a>
     
    2020  </ul>
    2121  <div class="tab-content">
    22     <div id="tab-1" tal:attributes="class view/tab1">
     22    <div id="tab1" class="active tab-pane">
     23      <br />
    2324      <table class="form-table">
    2425        <tbody>
     
    3334      </div>
    3435    </div>
    35     <div id="tab-2" tal:attributes="class view/tab2">
     36    <div id="tab2" class="tab-pane">
    3637    <tal:showApplicants  condition="view/showApplicants">
    37     <input type="checkbox" onClick="toggle(this, 'val_id')" />
    38     <span  i18n:translate="">Select all</span>
    39     <br /><br />
    40 
    41       <table class="display dataTableManage">
     38      <br />
     39      <table class="kofa-data-table dataTableManage">
    4240        <thead>
    4341          <tr>
     
    5553        </thead>
    5654        <tbody>
    57           <tr class="gradeC" tal:repeat="appl context/values">
     55          <tr tal:repeat="appl context/values">
    5856            <td>
    5957              <input type="checkbox" name="val_id" tal:attributes="value appl/__name__" />
     
    7876        </tbody>
    7977      </table>
     78      <input type="checkbox" onClick="toggle(this, 'val_id')" />
     79      <span  i18n:translate="">Select all</span>
     80      <br /><br />
    8081      <div tal:condition="view/availableActions">
    8182        <span tal:repeat="action view/actions" tal:omit-tag="">
     
    100101    </tal:showNoApplicants>
    101102    </div>
    102     <div id="tab-3" tal:attributes="class view/tab3"> <br />
    103       <table class="display dataTableManage">
     103    <div id="tab3" class="tab-pane"> <br />
     104      <table class="kofa-data-table dataTableManage">
    104105        <thead>
    105106          <tr>
     
    115116        </thead>
    116117        <tbody>
    117           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
     118          <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td>
    118119              <input type="checkbox" name="role_id"
    119120                tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     
    132133      <table class="form-table">
    133134        <tr> <td>
    134             <select id="user" name="user">
     135            <select id="user" name="user" class="form-control">
    135136              <option tal:repeat="user view/getUsers"
    136137                      tal:attributes="value user/name">
     
    139140              </option>
    140141            </select> </td> <td>
    141             <select id="local_role" name="local_role">
     142            <select id="local_role" name="local_role" class="form-control">
    142143              <option tal:repeat="localrole view/getLocalRoles"
    143144                      tal:attributes="value localrole/name">
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootmanagepage.pt

    r8547 r11254  
    11<form action="." tal:attributes="action request/URL"
    22  i18n:domain="waeup.kofa" method="POST"  enctype="multipart/form-data">
    3   <ul class="tabs" data-tabs="tabs">
    4     <li tal:attributes="class view/tab1">
    5     <a href="#tab-1">
     3  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     4    <li class="active">
     5    <a href="#tab1" data-toggle="tab">
    66      <span i18n:translate="">Introduction
    77      </span></a>
    88    </li>
    9     <li tal:attributes="class view/tab2">
    10     <a href="#tab-2">
     9    <li>
     10    <a href="#tab2" data-toggle="tab">
    1111      <span tal:content="view/subunits">Contents
    1212      </span></a>
    1313    </li>
    14     <li tal:attributes="class view/tab3">
    15     <a href="#tab-3">
     14    <li>
     15    <a href="#tab3" data-toggle="tab">
    1616      <span i18n:translate="">Local Roles
    1717      </span></a>
     
    1919  </ul>
    2020  <div class="tab-content">
    21     <div id="tab-1" tal:attributes="class view/tab1">
     21    <div id="tab1" class="active tab-pane">
     22     <br />
    2223      <table class="form-table">
    2324        <tbody>
     
    2526        </tbody>
    2627      </table>
    27 
    2828      <div tal:condition="view/availableActions">
    2929        <span tal:repeat="action view/actions" tal:omit-tag="">
     
    3333      </div>
    3434    </div>
    35     <div id="tab-2" tal:attributes="class view/tab2">
    36       <h3 tal:content="view/subunits">SUBUNITS</h3>
    37 
     35    <div id="tab2" class="tab-pane">
     36      <br />
    3837      <p i18n:translate="note_armp">
    3938        Please note that containers will be opened in manage mode here.
     
    4241        Please be patient until all records have been loaded.
    4342      </p>
    44 
    45       <table class="display dataTableManage">
     43      <table class="kofa-data-table dataTableManage">
    4644        <thead>
    4745          <tr>
     
    5957        </thead>
    6058        <tbody>
    61           <tr tal:repeat="entry context/values"         class="gradeC"> <td>
     59          <tr tal:repeat="entry context/values"> <td>
    6260              <input type="checkbox" name="val_id"
    6361                tal:attributes="value entry/__name__" /> </td>
     
    7876      </div>
    7977    </div>
    80     <div id="tab-3" tal:attributes="class view/tab3">
     78    <div id="tab3" class="tab-pane">
    8179      <br />
    82       <table class="display dataTableManage">
     80      <table class="kofa-data-table dataTableManage">
    8381        <thead>
    8482          <tr>
     
    9492        </thead>
    9593        <tbody>
    96           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC">
     94          <tr tal:repeat="entry view/getUsersWithLocalRoles">
    9795            <td> <input type="checkbox" name="role_id"
    9896                    tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" />  </td>
     
    109107        </span>
    110108      </div> <br /><br />
    111       <table class="form-table">
    112         <tr> <td>
    113             <select id="user" name="user">
    114               <option tal:repeat="user view/getUsers"
    115                 tal:attributes="value user/name">
    116               <span tal:replace="user/val/title">USERTITLE
    117               </span>
    118               </option>
    119             </select> </td> <td>
    120             <select id="local_role" name="local_role">
    121               <option tal:repeat="localrole view/getLocalRoles"
    122                 tal:attributes="value localrole/name">
    123               <span tal:replace="localrole/title">LOCALROLETITLE
    124               </span>
    125               </option>
    126             </select> </td> <td>
    127             <div tal:condition="view/availableActions">
    128               <span tal:repeat="action view/actions" tal:omit-tag="">
    129                 <input tal:condition="python:action.label in view.tabthreeactions2"
    130                   tal:replace="structure action/render"/>
    131               </span>
    132             </div> </td>
    133         </tr>
    134       </table>
     109      <div class="form-inline">
     110        <br />
     111        <div class="form-group">
     112          <select id="user" name="user" class="form-control">
     113            <option tal:repeat="user view/getUsers"
     114                    tal:attributes="value user/name">
     115            <span tal:replace="user/val/title">USERTITLE
     116            </span>
     117            </option>
     118          </select>
     119        </div>
     120        <div class="form-group">
     121          <select id="local_role" name="local_role" class="form-control">
     122            <option tal:repeat="localrole view/getLocalRoles"
     123                    tal:attributes="value localrole/name">
     124            <span tal:replace="localrole/title">LOCALROLETITLE
     125            </span>
     126            </option>
     127          </select>
     128        </div>
     129        <div class="form-group" tal:condition="view/availableActions">
     130          <span tal:repeat="action view/actions" tal:omit-tag="">
     131            <input tal:condition="python:action.label in view.tabthreeactions2"
     132                   tal:replace="structure action/render"/>
     133          </span>
     134        </div>
     135      </div>
    135136    </div>
    136137  </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootpage.pt

    r10097 r11254  
    44</span>
    55
    6 <table i18n:domain="waeup.kofa">
     6<table i18n:domain="waeup.kofa" class="table table-hover">
    77  <thead>
    88    <tr>
     
    1414  </thead>
    1515  <tbody>
    16     <tr tal:repeat="entry view/containers" class="gradeC">
     16    <tr tal:repeat="entry view/containers">
    1717      <td tal:content="entry/year">Year
    1818      </td>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantssearchpage.pt

    r10645 r11254  
    1 <form method="POST" i18n:domain="waeup.kofa">
     1<form method="POST" i18n:domain="waeup.kofa" class="form-inline">
    22<br />
    3   <input class="btn primary" type="submit" name="search"
    4     tal:attributes="value view/search_button" />
     3  <div class="form-group">
     4    <input class="btn btn-primary" type="submit" name="search"
     5      tal:attributes="value view/search_button" />
     6  </div>
     7  <div class="form-group">
     8    <select name="searchtype" class="form-control">
     9      <option i18n:translate="" value="applicant_id">with id</option>
     10      <option i18n:translate="" value="fullname">with name</option>
     11      <option i18n:translate="" value="reg_number">with registration number</option>
     12      <option i18n:translate="" value="email">with email address</option>
     13    </select>
     14  </div>
     15  <div class="form-group">
     16    <input type="text" class="form-control" name="searchterm" />
     17  </div>
    518
    6   <select name="searchtype">
    7     <option i18n:translate="" value="applicant_id">with id</option>
    8     <option i18n:translate="" value="fullname">with name</option>
    9     <option i18n:translate="" value="reg_number">with registration number</option>
    10     <option i18n:translate="" value="email">with email address</option>
    11   </select>
    12 
    13   <input type="text" name="searchterm" />
    14 
    15   <p>&nbsp;</p>
     19  <br /><br />
    1620  <div tal:condition="view/results">
    1721    <h3 i18n:translate="">Search Results</h3>
     
    2024    <input type="hidden" name="old_searchtype"
    2125         tal:attributes="value view/searchtype" />
    22     <table class="display dataTable">
     26    <table class="kofa-data-table dataTable">
    2327      <thead>
    2428      <tr>
     
    3034      </thead>
    3135      <tbody>
    32       <tr tal:repeat="item view/results" class="gradeC">
     36      <tr tal:repeat="item view/results">
    3337        <td> <a tal:attributes="href python:view.url(item)">
    3438          <span tal:content="item/applicant_id">XXXX_1234</span></a>
     
    4246      </tbody>
    4347    </table>
    44     <br />
    4548  </div>
    4649</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/exportjobsindex.pt

    r10655 r11254  
    1 <table i18n:domain="waeup.kofa">
     1<table i18n:domain="waeup.kofa" class="table table-condensed table-hover">
    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 btn-xs" 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">
    4343            Download</a>
    44 
    4544          <input type="hidden" name="job_id"
    4645                 tal:attributes="value job/job" />
    47           <input type="submit" class="btn small"
     46          <input type="submit" class="btn btn-default btn-xs"
    4847                 name="DISCARD" value="Discard"
    4948                 tal:condition="job/show_discard_button" />
     
    5352  </tbody>
    5453</table>
     54
    5555<form method="POST" i18n:domain="waeup.kofa">
    56   <div class="span12">
    57 
    58   </div>
    59   <input class="btn primary" type="submit" name="CREATE"
     56  <input class="btn btn-primary" type="submit" name="CREATE"
    6057         value="Start new export"
    6158          />
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r10843 r11254  
    5151            session_config = grok.getSite()['configuration'][session]
    5252        except KeyError:
    53             return _(u'Session configuration object is not available.')
     53            return _(u'Session configuration object is not available.'), None
    5454        payment.p_id = "p%s" % timestamp
    5555        payment.p_item = container.title
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/async.py

    r9217 r11254  
    44from waeup.kofa.async import IJob, IJobManager
    55from waeup.kofa.browser.layout import KofaPage
    6 from waeup.kofa.browser.resources import jquery, loadbar
    76from waeup.kofa.interfaces import IKofaObject, IDataCenter
    87from waeup.kofa.interfaces import MessageFactory as _
     
    5150        self.exports = self.getRunningExports()
    5251        self.uncompleted = [x for x in self.exports if x[0] != 'completed']
    53         loadbar.need()
    5452
    5553    def render(self):
     
    126124
    127125    def update(self, START_NEW=None, REMOVE=None, job_id=None):
    128         jquery.need()
    129126        if REMOVE and job_id:
    130127            self.context.remove(job_id)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt

    r10207 r11254  
    5555    >>> 'Given storage path cannot be used.' in browser.contents
    5656    True
    57     >>> browser.getControl('Cancel').click()
     57    >>> browser.getControl('Back to Data Center').click()
    5858
    5959
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r10540 r11254  
    3030  >>> browser = Browser()
    3131
    32 Let's get the default view of a university and see if the
    33 favicon is properly referenced::
     32Let's get the default view of a university::
    3433
    3534  >>> browser.open('http://localhost/myuniversity')
    3635  >>> print browser.contents
    3736  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    38   ...href="http://localhost/myuniversity/@@/waeup_kofa/favicon.ico"
    3937  ...Welcome to WAeUP.Kofa...
    4038  ...
     
    102100
    103101  >>> 'Sample University' in browser.contents
    104   True
    105 
    106 The edit form contains the default value for the portal skin::
    107 
    108   >>> 'waeup-base.css' in browser.contents
    109102  True
    110103
     
    311304  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    312305  ...<h1 class="kofa-content-label">Academic Section</h1>
    313   ...<td> <a href="TF"> <span>TF</span></a></td>
     306  ...<td> <a href="http://localhost/myuniversity/faculties/TF"> <span>TF</span></a></td>
    314307  ...
    315308
     
    355348  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    356349  ...<h1 class="kofa-content-label">Academic Section</h1>
    357   ...<td> <a href="TF"> <span>TF</span></a></td>
     350  ...<td> <a href="http://localhost/myuniversity/faculties/TF"> <span>TF</span></a></td>
    358351  ...<td>Faculty of My renamed faculty (TF)</td>
    359352  ...
     
    481474  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    482475  ...<h1 class="kofa-content-label">Departments</h1>
    483   ...<td> <a href="TD"> <span>TD</span></a></td>
     476  ...<td> <a href="http://localhost/myuniversity/faculties/TF/TD"> <span>TD</span></a></td>
    484477  ...<td>Department of TestDept (TD)</td>
    485478  ...
     
    514507  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    515508  ...<h1 class="kofa-content-label">Departments</h1>
    516   ...<td> <a href="TD"> <span>TD</span></a></td>
     509  ...<td> <a href="http://localhost/myuniversity/faculties/TF/TD"> <span>TD</span></a></td>
    517510  ...<td>Department of My renamed dept (TD)</td>
    518511  ...
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py

    r9217 r11254  
    2828from zope.interface import Interface
    2929from zope.publisher.interfaces.http import IHTTPRequest
    30 from waeup.kofa.browser import resources
    3130from waeup.kofa.browser.layout import KofaPage
    3231from waeup.kofa.browser.interfaces import (
     
    229228    #: name of challenge field in HTTP request
    230229    chal_field = 'recaptcha_challenge_field'
    231     #: resource to set theme and other options
    232     theme = resources.recaptcha_white
    233230
    234231    # Do not use the following keys in productive environments!  As
     
    294291        form).
    295292        """
    296         if self.theme is not None:
    297             self.theme.need()
    298293        error_param = ''
    299294        if error_code:
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py

    r10685 r11254  
    5959        """Get the list of breadcrumbs as real Python list.
    6060        """
    61 class ITheme(Interface):
    62     """An theme or 'skin'.
    63 
    64     Themes are basically collections of CSS- and/or JavaScript files
    65     stored somewhere. In Grok-contexts these files can be registered
    66     as 'resources' (see :mod:`waeup.kofa.browser.resources`).
    67 
    68     Furthermore, to make themes selectable and distinctable from each
    69     other we assign them short descriptions.
    70 
    71     Themes should be registered as named utilities so that they can be
    72     defined also in third-party packages and be looked up by other
    73     components like theme-selectors.
    74     """
    75     description = schema.TextLine(
    76         title = u'Description',
    77         description = u'Short description of the theme for choice fields',
    78         required = False,
    79         )
    80 
    81     def getResources():
    82         """Get resources of the theme.
    83 
    84         Deliver a list of resources that must be included in a web page to
    85         let it be rendered in the theme's style.
    86 
    87         A resource is normally defined in the `resources` module. If a
    88         theme needs several of them which normally do not depend on
    89         each other then all these resources can be returned by this
    90         method. Normally, you will only return one resource.
    91 
    92         These resources will (if the theme is selected) be `need()`-ed
    93         by the `update()` method of the general site layout.
    94         """
    95 
    9661class ICaptchaRequest(Interface):
    9762    """A set of data required to verify captcha solutions.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r10709 r11254  
    2626from zope.i18n import translate
    2727from zope.i18nmessageid import Message
    28 from hurry.resource import mode
    2928from megrok.layout import Page, Layout, Form, EditForm, DisplayForm, AddForm
    3029from z3c.flashmessage.interfaces import IMessageSource, IMessageReceiver
     
    3736from waeup.kofa.utils.helpers import to_timezone
    3837from waeup.kofa.browser.interfaces import (
    39     ITheme, IStudentNavigationBase, IApplicantBase)
    40 from waeup.kofa.browser.theming import get_all_themes, KofaThemeBase
     38    IStudentNavigationBase, IApplicantBase)
    4139from waeup.kofa.authentication import get_principal_role_manager
    4240
     
    7472        super(KofaAction, self).__init__(label, **options)
    7573        self.style = style
     74        if style == '':
     75            self.style = 'default'
     76       
    7677
    7778    def render(self):
     
    8283            label = translate(self.label, context=self.form.request)
    8384        return ('<input type="submit" id="%s" name="%s" value="%s"'
    84                 ' class="btn %s"/>' %
     85                ' class="btn btn-%s"/>' %
    8586                (self.__name__, self.__name__, escape(label, quote=True),
    8687                self.style))
     
    9697
    9798    msg = _('\'Are you sure?\'')
     99
     100    def __init__(self, label, style='', **options):
     101        super(JSAction, self).__init__(label, **options)
     102        self.style = style
     103        if style == '':
     104            self.style = 'default'
    98105
    99106    def render(self):
     
    105112        msg = translate(self.msg, context=self.form.request)
    106113        return ('<input type="submit" id="%s" name="%s" value="%s"'
    107                 ' class="btn" onclick="return confirmPost(%s)" />' %
    108                 (self.__name__, self.__name__, escape(label, quote=True), msg)
     114                ' class="btn btn-%s" onclick="return window.confirm(%s)" />' %
     115                (self.__name__, self.__name__, escape(label, quote=True),
     116                 self.style, msg)
    109117                )
    110118
     
    151159        return self.url(site, name)
    152160
    153     def flash(self, message, type='alert-message warning'):
     161    def flash(self, message, type='success'):
    154162        """Send a short message to the user.
    155163        """
     164        cssClass = 'alert alert-%s' % type
    156165        source = queryUtility(IMessageSource, name='session')
    157166        if source is None:
    158167            return None
    159         source.send(message, type)
     168        source.send(message, cssClass)
    160169        return True
    161170
     
    174183        # Width parameters will be overridden by Bootstrap
    175184        # so we have to set the css class
    176         if self.widgets.get('subject'):
    177             self.widgets['subject'].cssClass = 'span9'
    178185        if self.widgets.get('body'):
    179186            self.widgets['body'].height = 10
    180         if self.widgets.get('body'):
    181             self.widgets['body'].cssClass = 'span9'
    182187
    183188class KofaPage(UtilityView,Page):
     
    202207        super(KofaEditFormPage,self).setUpWidgets(ignore_request)
    203208        for widget in self.widgets:
    204             if widget.__class__.__name__ == 'TextWidget':
    205                 widget.cssClass = 'span8'
    206             elif widget.__class__.__name__ == 'IntWidget':
    207                 widget.cssClass = 'span2'
    208209            if 'address' in widget.name or \
    209210                'comment' in widget.name or \
    210211                'notice' in widget.name:
    211                 widget.cssClass = 'span8'
    212212                widget.height = 6
    213         if self.widgets.get('title'):
    214             self.widgets['title'].cssClass = 'span12'
    215         if self.widgets.get('frontpage'):
    216             self.widgets['frontpage'].cssClass = 'span12'
    217         if self.widgets.get('phone'):
    218             self.widgets['phone'].cssClass = 'span4'
    219213        if self.widgets.get('transcript_comment'):
    220             self.widgets['transcript_comment'].cssClass = 'span12'
    221214            self.widgets['transcript_comment'].height = 12
    222215        if self.widgets.get('jamb_subjects'):
    223             self.widgets['jamb_subjects'].cssClass = 'span8'
    224216            self.widgets['jamb_subjects'].height = 6
    225         if self.widgets.get('description'):
    226             self.widgets['description'].cssClass = 'span12'
    227217
    228218class KofaAddFormPage(UtilityView,AddForm):
     
    238228
    239229    #: An instance of the default theme to use for the site layout
    240     default_theme = KofaThemeBase()
    241230    stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt')
    242231    studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt')
     
    318307            return None         
    319308
    320     def update(self):
    321         """Include the resources required by the chosen skin/theme.
    322 
    323         University instances provide a 'skin' attribute, that should
    324         hold the internal name of a theme.
    325 
    326         A theme in the waeup.kofa sense consists of a list of
    327         CSS/JavaScript resources defined in the
    328         :mod:`waeup.kofa.browser.resources` module.
    329 
    330         If the context University object has no such attribute or the
    331         set value is not a valid theme name, we pick 'gray waeup
    332         theme' as default.
    333         """
    334         mode('minified')
    335         theme_name = getattr(grok.getSite()['configuration'], 'skin', '')
    336         theme = queryUtility(ITheme, name=theme_name,
    337                              default=self.default_theme)
    338         for resource in theme.getResources():
    339             resource.need()
    340         return
    341 
    342309    def render(self):
    343310        if self.isStudent() or self.isApplicant() or not self.isAuthenticated():
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r10685 r11254  
    5151    ICaptchaManager, IChangePassword)
    5252from waeup.kofa.browser.layout import jsaction, action, UtilityView
    53 from waeup.kofa.browser.resources import (
    54     warning, tabs, datatable)
    5553from waeup.kofa.interfaces import MessageFactory as _
    5654from waeup.kofa.interfaces import(
     
    8583    user = view.request.form.get('user', None)
    8684    if user is None or localrole is None:
    87         view.flash('No user selected.')
    88         view.redirect(view.url(view.context, '@@manage')+'?tab%s' % tab)
     85        view.flash('No user selected.', type='danger')
     86        view.redirect(view.url(view.context, '@@manage')+'#tab%s' % tab)
    8987        return
    9088    role_manager = IPrincipalRoleManager(view.context)
     
    9492    grok.getSite().logger.info(
    9593        '%s - added: %s|%s' % (ob_class, user, localrole))
    96     view.redirect(view.url(view.context, u'@@manage')+'?tab%s' % tab)
     94    view.redirect(view.url(view.context, u'@@manage')+'#tab%s' % tab)
    9795    return
    9896
     
    10098    child_ids = view.request.form.get('role_id', None)
    10199    if child_ids is None:
    102         view.flash(_('No local role selected.'))
    103         view.redirect(view.url(view.context, '@@manage')+'?tab%s' % tab)
     100        view.flash(_('No local role selected.'), type='danger')
     101        view.redirect(view.url(view.context, '@@manage')+'#tab%s' % tab)
    104102        return
    105103    if not isinstance(child_ids, list):
     
    117115        except:
    118116            view.flash('Could not remove %s: %s: %s' % (
    119                     child_id, sys.exc_info()[0], sys.exc_info()[1]))
     117                    child_id, sys.exc_info()[0], sys.exc_info()[1]),
     118                    type='danger')
    120119    if len(deleted):
    121120        view.flash(
     
    125124        grok.getSite().logger.info(
    126125            '%s - removed: %s' % (ob_class, ', '.join(deleted)))
    127     view.redirect(view.url(view.context, u'@@manage')+'?tab%s' % tab)
     126    view.redirect(view.url(view.context, u'@@manage')+'#tab%s' % tab)
    128127    return
    129128
     
    133132        child_id = form['val_id']
    134133    else:
    135         view.flash(_('No item selected.'))
     134        view.flash(_('No item selected.'), type='danger')
    136135        if tab:
    137             view.redirect(view.url(view.context, redirect)+'?tab%s' % tab)
     136            view.redirect(view.url(view.context, redirect)+'#tab%s' % tab)
    138137        else:
    139138            view.redirect(view.url(view.context, redirect))
     
    152151        except:
    153152            view.flash('Could not delete %s: %s: %s' % (
    154                     id, sys.exc_info()[0], sys.exc_info()[1]))
     153                    id, sys.exc_info()[0], sys.exc_info()[1]), type='danger')
    155154    if len(deleted):
    156155        view.flash(_('Successfully removed: ${a}',
     
    160159            '%s - removed: %s' % (ob_class, ', '.join(deleted)))
    161160    if tab:
    162         view.redirect(view.url(view.context, redirect)+'?tab%s' % tab)
     161        view.redirect(view.url(view.context, redirect)+'#tab%s' % tab)
    163162    else:
    164163        view.redirect(view.url(view.context, redirect))
     
    282281                            self.request.principal.id)
    283282                        self.flash(
    284                           _('Your personal data record is outdated. Please update.'))
     283                          _('Your personal data record is outdated. Please update.'),
     284                          type='warning')
    285285                    self.redirect(self.application_url() + rel_link)
    286286                    return
     
    316316                        now < temp_password_dict.get('timestamp', now) + delta:
    317317                        self.flash(
    318                             _('Your account has been temporarily deactivated.'))
     318                            _('Your account has been temporarily deactivated.'),
     319                            type='warning')
    319320                        return
    320321                    # Now we know that the student is suspended.
    321322                    comment = self._comment(student)
    322323                    if comment:
    323                         self.flash(comment)
     324                        self.flash(comment, type='warning')
    324325                    else:
    325                         self.flash(_('Your account has been deactivated.'))
     326                        self.flash(_('Your account has been deactivated.'),
     327                                   type='warning')
    326328                    return
    327             self.flash(_('You entered invalid credentials.'))
     329            self.flash(_('You entered invalid credentials.'), type='danger')
    328330            return
    329331
     
    441443            self.flash(_('Your message has been sent.'))
    442444        else:
    443             self.flash(_('A smtp server error occurred.'))
     445            self.flash(_('A smtp server error occurred.'), type='danger')
    444446        return
    445447
     
    528530
    529531    def update(self, userid=None, adduser=None, manage=None, delete=None):
    530         datatable.need()
    531532        if manage is not None and userid is not None:
    532533            self.redirect(self.url(userid) + '/@@manage')
     
    588589            errors = validator.validate_password(password, password_ctl)
    589590            if errors:
    590                 self.flash( ' '.join(errors))
     591                self.flash( ' '.join(errors), type='danger')
    591592                return
    592593        try:
     
    601602        except KeyError:
    602603            self.status = self.flash('The userid chosen already exists '
    603                                   'in the database.')
     604                                  'in the database.', type='danger')
    604605            return
    605606        self.redirect(self.url(self.context))
     
    632633            errors = validator.validate_password(password, password_ctl)
    633634            if errors:
    634                 self.flash( ' '.join(errors))
     635                self.flash( ' '.join(errors), type='danger')
    635636                return
    636637        changed_fields = self.applyData(self.context, **data)
     
    744745
    745746    def update(self, *args, **kw):
    746         datatable.need()
    747747        form = self.request.form
    748748        self.hitlist = []
     
    769769    form_fields = grok.AutoFields(IConfigurationContainer)
    770770    form_fields['frontpage'].custom_widget = HTMLDisplayWidget
     771
    771772
    772773class ConfigurationContainerManageFormPage(KofaEditFormPage):
     
    784785        _('Add session configuration'),
    785786        _('Remove selected')]
    786     form_fields = grok.AutoFields(IConfigurationContainer).omit('frontpage_dict')
    787 
    788     def update(self):
    789         tabs.need()
    790         self.tab1 = self.tab2 = ''
    791         qs = self.request.get('QUERY_STRING', '')
    792         if not qs:
    793             qs = 'tab1'
    794         setattr(self, qs, 'active')
    795         datatable.need()
    796         warning.need()
    797         return super(ConfigurationContainerManageFormPage, self).update()
     787    form_fields = grok.AutoFields(IConfigurationContainer).omit(
     788        'frontpage_dict')
    798789
    799790    def _frontpage(self):
     
    857848                ob_class, sessionconfiguration.academic_session))
    858849        except KeyError:
    859             self.flash(_('The session chosen already exists.'))
    860             return
    861         self.redirect(self.url(self.context, '@@index')+'?tab2')
     850            self.flash(_('The session chosen already exists.'), type='danger')
     851            return
     852        self.redirect(self.url(self.context, '@@index')+'#tab2')
    862853        return
    863854
    864855    @action(_('Cancel'), validator=NullValidator)
    865856    def cancel(self):
    866         self.redirect(self.url(self.context, '@@index')+'?tab2')
     857        self.redirect(self.url(self.context, '@@index')+'#tab2')
    867858        return
    868859
     
    885876    def save(self, **data):
    886877        msave(self, **data)
    887         self.redirect(self.url(self.context.__parent__, '@@index')+'?tab2')
     878        self.redirect(self.url(self.context.__parent__, '@@index')+'#tab2')
    888879        return
    889880
    890881    @action(_('Cancel'), validator=NullValidator)
    891882    def cancel(self):
    892         self.redirect(self.url(self.context.__parent__, '@@index')+'?tab2')
     883        self.redirect(self.url(self.context.__parent__, '@@index')+'#tab2')
    893884        return
    894885
     
    904895    pnav = 0
    905896
    906     def update(self):
    907         datatable.need()
    908         warning.need()
    909         return super(DatacenterPage, self).update()
    910 
    911897    @jsaction(_('Remove selected'))
    912898    def delFiles(self, **data):
     
    915901            child_id = form['val_id']
    916902        else:
    917             self.flash(_('No item selected.'))
     903            self.flash(_('No item selected.'), type='danger')
    918904            return
    919905        if not isinstance(child_id, list):
     
    926912                deleted.append(id)
    927913            except OSError:
    928                 self.flash(_('OSError: The file could not be deleted.'))
     914                self.flash(_('OSError: The file could not be deleted.'),
     915                           type='danger')
    929916                return
    930917        if len(deleted):
     
    942929    label = _(u'Processed Files')
    943930    pnav = 0
    944 
    945     def update(self):
    946         datatable.need()
     931    cancel_button =_('Back to Data Center')
     932
     933    def update(self, CANCEL=None):
     934        if CANCEL is not None:
     935            self.redirect(self.url(self.context))
     936            return
    947937        return super(DatacenterFinishedPage, self).update()
    948938
     
    955945    max_files = 20
    956946    upload_button =_(u'Upload')
    957     cancel_button =_(u'Cancel')
     947    cancel_button =_(u'Back to Data Center')
    958948
    959949    def getPreviewHeader(self):
     
    10271017                    _('All import managers have been notified by email.'))
    10281018            else:
    1029                 self.flash(_('An smtp server error occurred.'))
     1019                self.flash(_('An smtp server error occurred.'), type='danger')
    10301020            return
    10311021
     
    10351025        if number_of_pendings > self.max_files:
    10361026            self.flash(
    1037                 _('Maximum number of files in the data center exceeded.'))
     1027                _('Maximum number of files in the data center exceeded.'),
     1028                  type='danger')
    10381029            self.redirect(self.url(self.context))
    10391030            return
     
    10461037            filename = uploadfile.filename
    10471038            #if 'pending' in filename:
    1048             #    self.flash(_("You can't re-upload pending data files."))
     1039            #    self.flash(_("You can't re-upload pending data files."), type='danger')
    10491040            #    return
    10501041            if not filename.endswith('.csv'):
    1051                 self.flash(_("Only csv files are allowed."))
     1042                self.flash(_("Only csv files are allowed."), type='danger')
    10521043                return
    10531044            normalized_filename = self.getNormalizedFileName(filename)
     
    10571048                self.context.storage, 'unfinished', normalized_filename)
    10581049            if os.path.exists(finished_file) or os.path.exists(unfinished_file):
    1059                 self.flash(_("File with same name was uploaded earlier."))
     1050                self.flash(_("File with same name was uploaded earlier."),
     1051                           type='danger')
    10601052                return
    10611053            target = os.path.join(self.context.storage, normalized_filename)
     
    10711063                    "has invalid CSV format. "
    10721064                    "First problematic line detected: line %s. "
    1073                     "Please replace." % invalid_line))
     1065                    "Please replace." % invalid_line), type='danger')
    10741066                logger.info('%s - invalid file uploaded: %s' %
    10751067                            (ob_class, target))
     
    10831075
    10841076        except IOError:
    1085             self.flash('Error while uploading file. Please retry.')
    1086             self.flash('I/O error: %s' % sys.exc_info()[1])
     1077            self.flash('Error while uploading file. Please retry.', type='danger')
     1078            self.flash('I/O error: %s' % sys.exc_info()[1], type='danger')
    10871079            return
    10881080        self.redirect(self.url(self.context))
     
    11811173    label = _(u'Process CSV file')
    11821174    pnav = 0
    1183     cancel_button =_(u'Cancel')
     1175    cancel_button =_(u'Back to Data Center')
    11841176
    11851177    def getFiles(self):
     
    11931185    def update(self, filename=None, select=None, cancel=None):
    11941186        if cancel is not None:
    1195             self.flash(_('Import aborted.'))
    11961187            self.redirect(self.url(self.context))
    11971188            return
     
    12771268            return
    12781269        if cancel is not None:
    1279             self.flash(_('Import aborted.'))
     1270            self.flash(_('Import aborted.'), type='warning')
    12801271            self.redirect(self.url(self.context))
    12811272            return
     
    12891280        if self.importer and 'update' in self.importer:
    12901281            if self.mode != 'update':
    1291                 self.flash(_('Update mode only!'))
     1282                self.flash(_('Update mode only!'), type='warning')
    12921283                self.mode_locked = True
    12931284                self.mode = 'update'
     
    13031294        else:
    13041295            self.reader = ()
    1305             self.flash(warnings)
     1296            self.flash(warnings, type='warning')
    13061297
    13071298class DatacenterImportStep3(KofaPage):
     
    13881379
    13891380    def update(self, headerfield=None, back2=None, cancel=None, proceed=None):
    1390         datatable.need()
    13911381        session = ISession(self.request)['waeup.kofa']
    13921382        self.filename = session.get('import_filename', None)
     
    14011391            return
    14021392        if cancel is not None:
    1403             self.flash(_('Import aborted.'))
     1393            self.flash(_('Import aborted.'), type='warning')
    14041394            self.redirect(self.url(self.context))
    14051395            return
     
    14161406        warnings = self.getWarnings()
    14171407        if warnings:
    1418             self.flash(warnings)
     1408            self.flash(warnings, type='warning')
    14191409
    14201410class DatacenterImportStep4(KofaPage):
     
    14781468        if self.warn_num:
    14791469            self.flash(_('Processing of ${a} rows failed.',
    1480                 mapping = {'a':self.warn_num}))
     1470                mapping = {'a':self.warn_num}), type='warning')
    14811471        self.flash(_('Successfully processed ${a} rows.',
    14821472            mapping = {'a':linenum - self.warn_num}))
     
    15061496    pnav = 0
    15071497    search_button = _('Search')
    1508     back_button = _('Back')
     1498    back_button = _('Back to Data Center')
    15091499    placeholder = _('Enter a regular expression here...')
    15101500
     
    15161506            self.flash(
    15171507                _('Log files can only be searched ' +
    1518                   'on Unix-based operating systems.'))
     1508                  'on Unix-based operating systems.'), type='danger')
    15191509            self.redirect(self.url(self.context, '@@logs'))
    15201510            return
     
    15301520                self.context.queryLogfiles(logname, query))
    15311521        except ValueError:
    1532             self.flash(_('Invalid search expression.'))
     1522            self.flash(_('Invalid search expression.'), type='danger')
    15331523            return
    15341524        if not self.result:
    1535             self.flash(_('No search results found.'))
     1525            self.flash(_('No search results found.'), type='warning')
    15361526        return
    15371527
     
    15451535    save_button =_(u'Save')
    15461536    reset_button =_(u'Reset')
    1547     cancel_button =_(u'Cancel')
     1537    cancel_button =_(u'Back to Data Center')
    15481538
    15491539    def update(self, newpath=None, move=False, overwrite=False,
     
    15621552            for name in not_copied:
    15631553                self.flash(_('File already existed (not copied): ${a}',
    1564                     mapping = {'a':name}))
     1554                    mapping = {'a':name}), type='danger')
    15651555        except:
    1566             self.flash(_('Given storage path cannot be used.'))
    1567             self.flash(_('Error: ${a}', mapping = {'a':sys.exc_info()[1]}))
     1556            self.flash(_('Given storage path cannot be used. ${a}',
     1557                        mapping = {'a':sys.exc_info()[1]}), type='danger')
    15681558            return
    15691559        if newpath:
     
    15831573    pnav = 0
    15841574    export_button = _(u'Create CSV file')
     1575    cancel_button =_(u'Back to Data Center')
    15851576
    15861577    def getExporters(self):
     
    15941585        return sorted(title_name_tuples)
    15951586
    1596     def update(self, CREATE=None, DISCARD=None, exporter=None, job_id=None):
     1587    def update(self, CREATE=None, DISCARD=None, exporter=None,
     1588               job_id=None, CANCEL=None):
     1589        if CANCEL is not None:
     1590            self.redirect(self.url(self.context))
     1591            return
    15971592        if CREATE:
    15981593            job_id = self.context.start_export_job(
     
    17181713        return _('Manage academic section')
    17191714
    1720     def update(self):
    1721         warning.need()
    1722         return super(FacultiesContainerManageFormPage, self).update()
    1723 
    17241715    @jsaction(_('Remove selected'))
    17251716    def delFaculties(self, **data):
    17261717        if not checkPermission('waeup.managePortal', self.context):
    1727             self.flash(_('You are not allowed to remove entire faculties.'))
     1718            self.flash(_('You are not allowed to remove entire faculties.'),
     1719                       type='warning')
    17281720            return
    17291721        delSubobjects(self, redirect='@@manage', tab='1')
     
    17581750            self.context.addFaculty(faculty)
    17591751        except KeyError:
    1760             self.flash(_('The faculty code chosen already exists.'))
     1752            self.flash(_('The faculty code chosen already exists.'),
     1753                       type='danger')
    17611754            return
    17621755        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    17631756        self.context.__parent__.logger.info(
    17641757            '%s - added: %s' % (ob_class, faculty.code))
    1765         self.redirect(self.url(self.context, u'@@manage')+'?tab1')
     1758        self.redirect(self.url(self.context, u'@@manage')+'#tab1')
    17661759        return
    17671760
     
    18061799        return _('Manage faculty')
    18071800
    1808     def update(self):
    1809         tabs.need()
    1810         self.tab1 = self.tab2 = self.tab3 = ''
    1811         qs = self.request.get('QUERY_STRING', '')
    1812         if not qs:
    1813             qs = 'tab1'
    1814         setattr(self, qs, 'active')
    1815         warning.need()
    1816         datatable.need()
    1817         return super(FacultyManageFormPage, self).update()
    1818 
    18191801    @jsaction(_('Remove selected'))
    18201802    def delDepartments(self, **data):
    18211803        if not checkPermission('waeup.managePortal', self.context):
    1822             self.flash(_('You are not allowed to remove entire departments.'))
     1804            self.flash(_('You are not allowed to remove entire departments.'),
     1805                       type='danger')
    18231806            return
    18241807        delSubobjects(self, redirect='@@manage', tab='2')
     
    18411824    @action(_('Add local role'), validator=NullValidator)
    18421825    def addLocalRole(self, **data):
    1843         return add_local_role(self, '3', **data)
     1826        return add_local_role(self,3,**data)
    18441827
    18451828    @action(_('Remove selected local roles'))
     
    18781861
    18791862    def update(self, *args, **kw):
    1880         datatable.need()
    18811863        form = self.request.form
    18821864        self.hitlist = []
     
    18891871        else:
    18901872            if 'search' in form:
    1891                 self.flash(_('Empty search string'))
     1873                self.flash(_('Empty search string'), type='warning')
    18921874            return
    18931875        self.hitlist = self._find_students(query=self.searchterm,
    18941876            searchtype=self.searchtype, view=self)
    18951877        if not self.hitlist:
    1896             self.flash(_('No student found.'))
     1878            self.flash(_('No student found.'), type='warning')
    18971879        return
    18981880
     
    19141896            self.context.addDepartment(department)
    19151897        except KeyError:
    1916             self.flash(_('The code chosen already exists in this faculty.'))
     1898            self.flash(_('The code chosen already exists in this faculty.'),
     1899                       type='danger')
    19171900            return
    19181901        self.status = self.flash(
     
    19211904        self.context.__parent__.__parent__.logger.info(
    19221905            '%s - added: %s' % (ob_class, data['code']))
    1923         self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     1906        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    19241907        return
    19251908
     
    19421925
    19431926    def update(self):
    1944         tabs.need()
    1945         datatable.need()
    19461927        super(DepartmentPage, self).update()
    19471928        return
     
    19971978            yield(dict(url=url, name=key, container=val))
    19981979
    1999     def update(self):
    2000         tabs.need()
    2001         self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''
    2002         qs = self.request.get('QUERY_STRING', '')
    2003         if not qs:
    2004             qs = 'tab1'
    2005         setattr(self, qs, 'active')
    2006         warning.need()
    2007         datatable.need()
    2008         super(DepartmentManageFormPage, self).update()
    2009         return
    2010 
    20111980    @action(_('Save'), style='primary')
    20121981    def save(self, **data):
     
    20221991    def delCertificates(self, **data):
    20231992        if not checkPermission('waeup.managePortal', self.context):
    2024             self.flash(_('You are not allowed to remove certificates.'))
     1993            self.flash(_('You are not allowed to remove certificates.'),
     1994                       type='warning')
    20251995            return
    20261996        delSubobjects(
     
    20452015    @action(_('Add local role'), validator=NullValidator)
    20462016    def addLocalRole(self, **data):
    2047         return add_local_role(self, 4, **data)
     2017        return add_local_role(self,4,**data)
    20482018
    20492019    @action(_('Remove selected local roles'))
     
    20762046                message += '<a href="%s">%s</a>' % (
    20772047                    self.url(entry), getattr(entry, '__name__', u'Unnamed'))
    2078                 self.flash(message)
     2048                self.flash(message, type='warning')
    20792049            self.redirect(self.url(self.context, u'@@addcourse'))
    20802050            return
     
    20842054        self.context.__parent__.__parent__.__parent__.logger.info(
    20852055            '%s - added: %s' % (ob_class, data['code']))
    2086         self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     2056        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    20872057        return
    20882058
     
    21172087                message += '<a href="%s">%s</a>' % (
    21182088                    self.url(entry), getattr(entry, '__name__', u'Unnamed'))
    2119                 self.flash(message)
     2089                self.flash(message, type='warning')
    21202090            self.redirect(self.url(self.context, u'@@addcertificate'))
    21212091            return
     
    21252095        self.context.__parent__.__parent__.__parent__.logger.info(
    21262096            '%s - added: %s' % (ob_class, data['code']))
    2127         self.redirect(self.url(self.context, u'@@manage')+'?tab3')
     2097        self.redirect(self.url(self.context, u'@@manage')+'#tab3')
    21282098        return
    21292099
     
    21652135    form_fields = grok.AutoFields(ICourse).omit('code')
    21662136
    2167     def update(self):
    2168         tabs.need()
    2169         self.tab1 = self.tab2 = ''
    2170         qs = self.request.get('QUERY_STRING', '')
    2171         if not qs:
    2172             qs = 'tab1'
    2173         setattr(self, qs, 'active')
    2174         warning.need()
    2175         datatable.need()
    2176         return super(CourseManageFormPage, self).update()
    2177 
    21782137    @action(_('Save'), style='primary')
    21792138    def save(self, **data):
     
    21872146    @action(_('Add local role'), validator=NullValidator)
    21882147    def addLocalRole(self, **data):
    2189         return add_local_role(self, 2, **data)
     2148        return add_local_role(self,2,**data)
    21902149
    21912150    @action(_('Remove selected local roles'))
     
    22112170
    22122171    def update(self):
    2213         datatable.need()
    22142172        return super(CertificatePage, self).update()
    22152173
     
    22382196        return _('Manage certificate')
    22392197
    2240     def update(self):
    2241         tabs.need()
    2242         self.tab1 = self.tab2 = self.tab3 = ''
    2243         qs = self.request.get('QUERY_STRING', '')
    2244         if not qs:
    2245             qs = 'tab1'
    2246         setattr(self, qs, 'active')
    2247         warning.need()
    2248         datatable.need()
    2249         return super(CertificateManageFormPage, self).update()
    2250 
    22512198    @action(_('Save'), style='primary')
    22522199    def save(self, **data):
     
    22702217    @action(_('Add local role'), validator=NullValidator)
    22712218    def addLocalRole(self, **data):
    2272         return add_local_role(self, 3, **data)
     2219        return add_local_role(self,3,**data)
    22732220
    22742221    @action(_('Remove selected local roles'))
     
    22932240        except KeyError:
    22942241            self.status = self.flash(_('The chosen certificate course is already '
    2295                                   'part of this certificate.'))
     2242                                  'part of this certificate.'), type='warning')
    22962243            return
    22972244        self.status = self.flash(
     
    23012248        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    23022249        grok.getSite().logger.info('%s - added: %s' % (ob_class, code))
    2303         self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     2250        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
    23042251        return
    23052252
     
    24212368        user = self._searchUser(identifier, email)
    24222369        if user is None:
    2423             self.flash(_('No record found.'))
     2370            self.flash(_('No record found.'), type='warning')
    24242371            return
    24252372        # Change password
     
    24422389                'has been sent to ${a}.', mapping = {'a':email}))
    24432390        else:
    2444             self.flash(_('An smtp server error occurred.'))
     2391            self.flash(_('An smtp server error occurred.'), type='danger')
    24452392        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    24462393        self.context.logger.info(
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/actionbutton.pt

    r9145 r11254  
    1 <a class="btn actionbar" tal:condition="viewlet/target_url"
     1<a class="btn btn-default" tal:condition="viewlet/target_url"
    22   tal:attributes="href viewlet/target_url; onclick viewlet/onclick">
    33  <img src="" alt="edit"
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/breadcrumbs.pt

    r7459 r11254  
    1 <span tal:repeat="item viewlet/getEntries">
    2   <li>
    3     <a href="#" tal:attributes="href item/url">
    4       <span tal:content="item/title">Entry</span>
    5     </a>
    6     <span tal:condition="not: repeat/item/end" class="divider">/</span>
    7   </li>
    8 </span>
     1<li tal:repeat="item viewlet/getEntries">
     2  <a href="#" tal:attributes="href item/url">
     3    <span tal:replace="item/title">Entry</span>
     4  </a>
     5</li>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatemanagepage.pt

    r9320 r11254  
    22      enctype="multipart/form-data" i18n:domain="waeup.kofa">
    33
    4   <ul class="tabs" data-tabs="tabs">
    5     <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li>
    6     <li tal:attributes="class view/tab2"><a href="#tab-2" i18n:translate="">Certificate Courses</a></li>
    7     <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li>
     4  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     5    <li class="active">
     6      <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a>
     7    </li>
     8    <li>
     9      <a href="#tab2" data-toggle="tab"
     10         i18n:translate="">Certificate Courses</a>
     11    </li>
     12    <li>
     13      <a href="#tab3" data-toggle="tab" i18n:translate="">Local Roles</a>
     14    </li>
    815  </ul>
    916
    1017  <div class="tab-content">
    11     <div id="tab-1" tal:attributes="class view/tab1">
    12     <table class="form-table">
    13       <tbody>
    14         <tal:widgets content="structure provider:widgets" />
    15       </tbody>
    16     </table>
    17     <div tal:condition="view/availableActions">
    18       <span tal:repeat="action view/actions"
    19             tal:omit-tag="">
    20         <input tal:condition="python:action.label in view.taboneactions"
    21                tal:replace="structure action/render"/>
    22       </span>
     18    <div id="tab1" class="active tab-pane">
     19      <table class="form-table">
     20        <tbody>
     21          <tal:widgets content="structure provider:widgets" />
     22        </tbody>
     23      </table>
     24      <div tal:condition="view/availableActions">
     25        <span tal:repeat="action view/actions"
     26              tal:omit-tag="">
     27          <input tal:condition="python:action.label in view.taboneactions"
     28                 tal:replace="structure action/render"/>
     29        </span>
     30      </div>
    2331    </div>
    24     </div>
    25     <div id="tab-2" tal:attributes="class view/tab2">
    26       <h3>
    27         <span tal:content="context/__name__">Code</span>
    28         <span i18n:domain="waeup.kofa" i18n:translate="">Courses</span>
    29       </h3>
    30       <table class="display dataTableManage">
     32    <div id="tab2" class="tab-pane">
     33      <br />
     34      <table class="kofa-data-table dataTableManage">
    3135        <thead>
    3236          <tr>
     
    4145        </thead>
    4246        <tbody>
    43           <tr tal:repeat="cc context/values" class="gradeC">
    44              <td>
     47          <tr tal:repeat="cc context/values">
     48            <td>
    4549              <input type="checkbox" name="val_id"
    46                         tal:attributes="value cc/__name__" />
     50                    tal:attributes="value cc/__name__" />
    4751            </td>
    48              <td>
     52            <td>
    4953              <span tal:content="cc/level">
    50                    LEVEL
     54                LEVEL
    5155              </span>
    5256            </td>
     
    5458            <td>
    5559              <a tal:attributes="href python: view.url(cc)"
    56                      tal:content="cc/__name__">
     60                 tal:content="cc/__name__">
    5761                REFERRER CODE
    5862              </a>
     
    6064            <td>
    6165              <a tal:attributes="href python:view.url(cc.course)"
    62                      tal:content="cc/course/code">
     66                 tal:content="cc/course/code">
    6367                COURSE CODE
    6468              </a>
     
    6670            <td>
    6771              <span tal:content="cc/course/title">
    68                    COURSE TITLE
     72                COURSE TITLE
    6973              </span>
    7074            </td>
    7175            <td>
    7276              <span tal:content="cc/mandatory">
    73                    REQUIRED
     77                REQUIRED
    7478              </span>
    7579            </td>
     
    8589      </div>
    8690    </div>
    87     <div id="tab-3" tal:attributes="class view/tab3"> <br />
    88       <table class="display dataTableManage">
     91    <div id="tab3" class="tab-pane">
     92      <br />
     93      <table class="kofa-data-table dataTableManage">
    8994        <thead>
    9095          <tr>
     
    100105        </thead>
    101106        <tbody>
    102           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
    103               <input type="checkbox" name="role_id"
    104                 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     107          <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td>
     108            <input type="checkbox" name="role_id"
     109                   tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
    105110            <td tal:content="entry/user_name"> USERNAME </td>
    106111            <td tal:content="entry/user_title"> USERTITLE </td>
     
    112117        <span tal:repeat="action view/actions" tal:omit-tag="">
    113118          <input tal:condition="python:action.label in view.tabthreeactions1"
    114             tal:replace="structure action/render"/>
     119                 tal:replace="structure action/render"/>
    115120        </span>
    116121      </div><br /><br />
    117       <table class="form-table">
    118         <tr> <td>
    119             <select id="user" name="user">
    120               <option tal:repeat="user view/getUsers"
    121                 tal:attributes="value user/name">
    122               <span tal:replace="user/val/title">USERTITLE
    123               </span>
    124               </option>
    125             </select> </td> <td>
    126             <select id="local_role" name="local_role">
    127               <option tal:repeat="localrole view/getLocalRoles"
    128                 tal:attributes="value localrole/name">
    129               <span tal:replace="localrole/title">LOCALROLETITLE
    130               </span>
    131               </option>
    132             </select> </td> <td>
    133             <div tal:condition="view/availableActions">
    134               <span tal:repeat="action view/actions" tal:omit-tag="">
    135                 <input tal:condition="python:action.label in view.tabthreeactions2"
    136                   tal:replace="structure action/render"/>
    137               </span>
    138             </div> </td>
    139         </tr>
    140       </table>
     122      <div class="form-inline">
     123        <br />
     124        <div class="form-group">
     125          <select id="user" name="user" class="form-control">
     126            <option tal:repeat="user view/getUsers"
     127                    tal:attributes="value user/name">
     128            <span tal:replace="user/val/title">USERTITLE
     129            </span>
     130            </option>
     131          </select>
     132        </div>
     133        <div class="form-group">
     134          <select id="local_role" name="local_role" class="form-control">
     135            <option tal:repeat="localrole view/getLocalRoles"
     136                    tal:attributes="value localrole/name">
     137            <span tal:replace="localrole/title">LOCALROLETITLE
     138            </span>
     139            </option>
     140          </select>
     141        </div>
     142        <div class="form-group">
     143          <div tal:condition="view/availableActions">
     144            <span tal:repeat="action view/actions" tal:omit-tag="">
     145              <input tal:condition="python:action.label in view.tabthreeactions2"
     146                     tal:replace="structure action/render"/>
     147            </span>
     148          </div>
     149        </div>
     150      </div>
    141151    </div>
    142152  </div>
    143153</form>
    144 
    145 
    146 
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatepage.pt

    r9320 r11254  
    2323</h3>
    2424<br />
    25 <table i18n:domain="waeup.kofa" class="display dataTable">
     25<table i18n:domain="waeup.kofa" class="kofa-data-table dataTable">
    2626<thead>
    2727  <tr>
     
    3535</thead>
    3636<tbody>
    37   <tr tal:repeat="cc context/values" class="gradeC">
     37  <tr tal:repeat="cc context/values">
    3838     <td>
    3939      <span tal:content="cc/level">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/configurationmanagepage.pt

    r7811 r11254  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   enctype="multipart/form-data" i18n:domain="waeup.kofa">
    3     <ul class="tabs" data-tabs="tabs">
    4       <li tal:attributes="class view/tab1">
    5       <a href="#tab-1" i18n:translate="">Site Settings</a>
    6       </li>
    7       <li tal:attributes="class view/tab2">
    8       <a href="#tab-2" i18n:translate="">Session Configurations</a>
    9       </li>
    10     </ul>
    11     <div class="tab-content">
    12     <div id="tab-1" tal:attributes="class view/tab1">
     2      enctype="multipart/form-data" i18n:domain="waeup.kofa">
     3  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     4    <li class="active">
     5      <a href="#tab1" data-toggle="tab"
     6         i18n:translate="">Site Settings</a>
     7    </li>
     8    <li>
     9      <a href="#tab2"  data-toggle="tab"
     10         i18n:translate="">Session Configurations</a>
     11    </li>
     12  </ul>
     13  <div class="tab-content">
     14    <div id="tab1" class="active tab-pane">
    1315      <table class="form-table">
    1416        <tbody>
     
    2325      </div>
    2426    </div>
    25     <div id="tab-2" tal:attributes="class view/tab2"> <br />
    26       <table class="display dataTableManage">
     27    <div id="tab2" class="tab-pane">
     28      <br />
     29      <table class="kofa-data-table dataTableManage">
    2730        <thead>
    2831          <tr>
     
    3437        </thead>
    3538        <tbody>
    36           <tr tal:repeat="entry view/getSessionConfigurations" class="gradeC"> <td>
    37               <input type="checkbox" name="val_id" tal:attributes="value entry/name" /> </td> <td>
    38               <a href="" tal:attributes="href entry/url" tal:content="entry/title">Name</a> </td>
     39          <tr tal:repeat="entry view/getSessionConfigurations">
     40            <td>
     41            <input type="checkbox" name="val_id"
     42                   tal:attributes="value entry/name" /> </td> <td>
     43            <a href="" tal:attributes="href entry/url"
     44               tal:content="entry/title">Name</a> </td>
    3945          </tr>
    4046        </tbody>
     
    4349        <span tal:repeat="action view/actions" tal:omit-tag="">
    4450          <input tal:condition="python:action.label in view.tabtwoactions"
    45             tal:replace="structure action/render"/>
     51                 tal:replace="structure action/render"/>
    4652        </span>
    4753      </div>
    48     </div>
    49   </div>
     54    </div><!-- /tab2 -->
     55  </div><!-- /tab-content -->
    5056</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/coursemanagepage.pt

    r10540 r11254  
    22      enctype="multipart/form-data" i18n:domain="waeup.kofa">
    33
    4   <ul class="tabs" data-tabs="tabs">
    5     <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li>
    6     <li tal:attributes="class view/tab2"><a href="#tab-3" i18n:translate="">Local Roles</a></li>
     4  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     5    <li class="active">
     6      <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a>
     7    </li>
     8    <li>
     9      <a href="#tab3" data-toggle="tab" i18n:translate="">Local Roles</a>
     10    </li>
    711  </ul>
    812
    913  <div class="tab-content">
    10     <div id="tab-1" tal:attributes="class view/tab1">
    11     <table class="form-table">
    12       <tbody>
    13         <tal:widgets content="structure provider:widgets" />
    14       </tbody>
    15     </table>
    16     <div tal:condition="view/availableActions">
    17       <span tal:repeat="action view/actions"
    18             tal:omit-tag="">
    19         <input tal:condition="python:action.label in view.taboneactions"
    20                tal:replace="structure action/render"/>
    21       </span>
     14    <div id="tab1" class="tab-pane active">
     15      <table class="form-table">
     16        <tbody>
     17          <tal:widgets content="structure provider:widgets" />
     18        </tbody>
     19      </table>
     20      <div tal:condition="view/availableActions">
     21        <span tal:repeat="action view/actions"
     22              tal:omit-tag="">
     23          <input tal:condition="python:action.label in view.taboneactions"
     24                 tal:replace="structure action/render"/>
     25        </span>
     26      </div>
    2227    </div>
    23     </div>
    24     <div id="tab-3" tal:attributes="class view/tab2"> <br />
    25       <table class="display dataTableManage">
     28    <div id="tab3" class="tab-pane">
     29      <br />
     30      <table class="kofa-data-table dataTableManage">
    2631        <thead>
    2732          <tr>
     
    3742        </thead>
    3843        <tbody>
    39           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
    40               <input type="checkbox" name="role_id"
    41                 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     44          <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td>
     45            <input type="checkbox" name="role_id"
     46                   tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
    4247            <td tal:content="entry/user_name"> USERNAME </td>
    4348            <td tal:content="entry/user_title"> USERTITLE </td>
     
    4954        <span tal:repeat="action view/actions" tal:omit-tag="">
    5055          <input tal:condition="python:action.label in view.tabtwoactions1"
    51             tal:replace="structure action/render"/>
     56                 tal:replace="structure action/render"/>
    5257        </span>
    5358      </div><br /><br />
    54       <table class="form-table">
    55         <tr> <td>
    56             <select id="user" name="user">
    57               <option tal:repeat="user view/getUsers"
    58                 tal:attributes="value user/name">
    59               <span tal:replace="user/val/title">USERTITLE
    60               </span>
    61               </option>
    62             </select> </td> <td>
    63             <select id="local_role" name="local_role">
    64               <option tal:repeat="localrole view/getLocalRoles"
    65                 tal:attributes="value localrole/name">
    66               <span tal:replace="localrole/title">LOCALROLETITLE
    67               </span>
    68               </option>
    69             </select> </td> <td>
    70             <div tal:condition="view/availableActions">
    71               <span tal:repeat="action view/actions" tal:omit-tag="">
    72                 <input tal:condition="python:action.label in view.tabtwoactions2"
    73                   tal:replace="structure action/render"/>
    74               </span>
    75             </div> </td>
    76         </tr>
    77       </table>
     59      <div class="form-inline">
     60        <br />
     61        <div class="form-group">
     62          <select id="user" name="user" class="form-control">
     63            <option tal:repeat="user view/getUsers"
     64                    tal:attributes="value user/name">
     65            <span tal:replace="user/val/title">USERTITLE
     66            </span>
     67            </option>
     68          </select>
     69        </div>
     70        <div class="form-group">
     71          <select id="local_role" name="local_role" class="form-control">
     72            <option tal:repeat="localrole view/getLocalRoles"
     73                    tal:attributes="value localrole/name">
     74            <span tal:replace="localrole/title">LOCALROLETITLE
     75            </span>
     76            </option>
     77          </select>
     78        </div>
     79        <div class="form-group">
     80          <div tal:condition="view/availableActions">
     81                <span tal:repeat="action view/actions" tal:omit-tag="">
     82                  <input tal:condition="python:action.label in view.tabtwoactions2"
     83                         tal:replace="structure action/render"/>
     84                </span>
     85          </div>
     86        </div>
     87      </div>
    7888    </div>
    7989  </div>
    8090</form>
    81 
    82 
    83 
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterexportpage.pt

    r9841 r11254  
    88<br />
    99
    10 <form  method="POST">
     10<form  method="POST" class="form-inline">
    1111  <label for="exporter">
    1212    Exporter (Data Type):
    1313  </label>
    14   <div class="input">
    15     <select name="exporter">
     14  <div class="form-group">
     15    <select name="exporter" class="form-control half">
    1616      <span tal:repeat="items view/getExporters" tal:omit-tag="">
    1717        <option tal:define="name python: items[1]; title python: items[0]"
     
    2323    </select>
    2424  </div>
    25   <br />
    26   <div class="input">
    27     <input i18n:translate="" type="submit" class="btn primary"
     25  <div class="form-group">
     26    <input i18n:translate="" type="submit" class="btn btn-primary"
    2827      name="CREATE" tal:attributes="value view/export_button" />
     28  </div>
     29  <div class="form-group">
     30  <input type="submit" name="CANCEL" class="btn btn-default"
     31      tal:attributes="value view/cancel_button" />
    2932  </div>
    3033</form>
     
    3942<br /><br />
    4043
    41 <table i18n:domain="waeup.kofa">
     44<table i18n:domain="waeup.kofa" class="table table-condensed table-hover">
    4245  <thead>
    4346    <tr>
     
    6568        <span tal:replace="job/creator">CREATOR</span>
    6669      </td>
    67       <td nowrap>
     70      <td>
    6871        <span tal:replace="job/start_time">DATETIME</span>
    6972      </td>
     
    7275      </td>
    7376      <td nowrap>
    74         <a href="" class="btn small" i18n:translate=""
     77        <a href="" class="btn btn-default btn-xs" i18n:translate=""
    7578           tal:condition="job/show_refresh_button">
    76           <img tal:attributes="src static/actionicon_reload.png" />
     79          <img src="/static/img/actionicon_reload.png" />
    7780          Reload
    7881        </a>
    7982        <form method="POST">
    80           <a href="" class="btn primary small"
     83          <a href="" class="btn btn-primary btn-xs"
    8184                 tal:attributes="href job/download_url"
    8285                 tal:condition="job/show_download_button">
    8386            Download</a>
    84 
    8587          <input type="hidden" name="job_id"
    8688                 tal:attributes="value job/job" />
    87           <input type="submit" class="btn small"
     89          <input type="submit" class="btn btn-default btn-xs"
    8890                 name="DISCARD" value="Discard"
    8991                 tal:condition="job/show_discard_button" />
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterfinishedpage.pt

    r9592 r11254  
    44  imports. The files contain the imported datasets.
    55</p>
    6 <table i18n:domain="waeup.kofa" class="display dataTableFiles">
     6<table i18n:domain="waeup.kofa" class="kofa-data-table dataTableFiles">
    77  <thead>
    88    <tr>
     
    1313  </thead>
    1414  <tbody>
    15     <tr tal:repeat="file context/getFinishedFiles" class="gradeC">
     15    <tr tal:repeat="file context/getFinishedFiles">
    1616      <td><a tal:attributes="href python: 'download?filename=' + file.rel_path"
    1717             tal:content="file/name">FILENAME</a></td>
     
    2121  </tbody>
    2222</table>
     23<form method="POST">
     24  <input i18n:translate="" type="submit" class="btn btn-default" name="CANCEL"
     25      tal:attributes="value view/cancel_button"/>
     26</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport1page.pt

    r7811 r11254  
    88</p>
    99<form i18n:domain="waeup.kofa" method="POST">
    10   <table>
     10  <table class="table">
    1111    <thead>
    1212      <th />
     
    2020        <td>
    2121          <button i18n:translate=""
    22             type="submit" name="select" class="btn primary"
     22            type="submit" name="select" class="btn btn-primary"
    2323            tal:attributes="value file/name">Select</button>
    2424        </td>
     
    3030    </tbody>
    3131  </table>
    32   <input type="submit" name="cancel" class="btn"
     32  <input type="submit" name="cancel" class="btn btn-default"
    3333      tal:attributes="value view/cancel_button" />
    3434</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport2page.pt

    r8651 r11254  
    99    Please select a file-processor and a processing-mode from the selections below.
    1010  </p>
    11   <div>
    12     <table tal:define="prev_table view/getPreviewTable;">
    13       <thead>
    14         <tr>
    15           <th i18n:translate="">Header</th>
    16           <th i18n:translate="">Sample Record 1</th>
    17           <th i18n:translate="">Sample Record 2</th>
    18           <th i18n:translate="">Sample Record 3</th>
    19         </tr>
    20       </thead>
    21       <tbody>
    22         <tr tal:repeat="row prev_table">
    23           <td tal:repeat="value row"
    24               tal:content="value"> value
    25           </td>
    26         </tr>
    27       </tbody>
    28     </table>
    29   </div>
     11  <table tal:define="prev_table view/getPreviewTable;" class="table table-condensed">
     12    <thead>
     13      <tr>
     14        <th i18n:translate="">Header</th>
     15        <th i18n:translate="">Sample Record 1</th>
     16        <th i18n:translate="">Sample Record 2</th>
     17        <th i18n:translate="">Sample Record 3</th>
     18      </tr>
     19    </thead>
     20    <tbody>
     21      <tr tal:repeat="row prev_table">
     22        <td tal:repeat="value row"
     23            tal:content="value"> value
     24        </td>
     25      </tr>
     26    </tbody>
     27  </table>
    3028  <div> <b i18n:translate="">Processor:</b>
    31     <select name="importer">
     29    <select name="importer" class="form-control">
    3230      <option tal:repeat="importer view/getImporters"
    3331          tal:attributes="value importer/name;
     
    5553    </p>
    5654  </div>
    57   <input class="btn" type="submit" name="cancel" tal:attributes="value view/cancel_button" />
    58   <input class="btn danger" type="submit" name="back1" tal:attributes="value view/back_button" />
    59   <input class="btn primary"
     55  <input class="btn btn-default" type="submit" name="cancel" tal:attributes="value view/cancel_button" />
     56  <input class="btn btn-danger" type="submit" name="back1" tal:attributes="value view/back_button" />
     57  <input class="btn btn-primary"
    6058    tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button"
    6159    type="submit" name="proceed" />
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport3page.pt

    r8783 r11254  
    11<div i18n:domain="waeup.kofa" i18n:translate=""
    2   class="alert-message success" tal:condition="not: view/getWarnings">
     2  class="alert alert-success" tal:condition="not: view/getWarnings">
    33  Header fields OK
    44</div>
     
    2929
    3030  <div>
    31 
    32 
    3331    <table tal:define="prev_table view/getPreviewTable;
    34                        headers view/headerfields;">
     32                       headers view/headerfields;"
     33            class="table">
    3534      <thead>
    3635        <tr>
     
    4544          </td>
    4645          <td>
    47             <select class="span4" name="headerfield">
     46            <select name="headerfield" class="form-control">
    4847              <option tal:repeat="opt view/getPossibleHeaders"
    4948                tal:attributes="value opt/value;
     
    6261  </div>
    6362
    64   <input class="btn" type="submit" name="cancel"
     63  <input class="btn btn-default" type="submit" name="cancel"
    6564    tal:attributes="value view/cancel_button" />
    66   <input class="btn" type="reset" name="reset"
     65  <input class="btn btn-default" type="reset" name="reset"
    6766    tal:attributes="value view/reset_button" />
    68   <input class="btn" type="submit" name="update"
     67  <input class="btn btn-default" type="submit" name="update"
    6968    tal:attributes="value view/update_button" />
    7069  <br /><br />
    71   <input class="btn danger" type="submit" name="back2"
     70  <input class="btn btn-danger" type="submit" name="back2"
    7271    tal:attributes="value view/back_button" />
    73   <input class="btn primary"
     72  <input class="btn btn-primary"
    7473    tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button"
    7574    type="submit" name="proceed"/>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport4page.pt

    r10099 r11254  
    1515</p>
    1616<form method="POST" i18n:domain="waeup.kofa">
    17   <input class="btn primary" type="submit" name="finish"
     17  <input class="btn btn-primary" type="submit" name="finish"
    1818    tal:attributes="value view/back_button" />
    1919</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogspage.pt

    r9641 r11254  
    33  Currently no log files are available.
    44  </p>
    5   <table tal:condition="files" class="table condensed-table">
     5  <table tal:condition="files" class="table">
    66    <thead>
    77      <tr>
     
    1717    </thead>
    1818    <tbody>
    19       <tr tal:repeat="file files"
    20           tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'">
    21         <td class="text-center">
     19      <tr tal:repeat="file files">
     20        <td>
    2221          <form method="POST" action="@@show">
    23             <input i18n:translate="" type="submit" class="btn primary"
    24                    name="show" tal:attributes="value view/show_button" />
     22            <input i18n:translate="" type="submit" class="btn btn-primary"
     23                   name="show" tal:attributes="value view/show_button" />
    2524            <input type="hidden" name="logname"
    26                    tal:attributes="value file/name" />
     25                   tal:attributes="value file/name" />
    2726          </form></td>
    2827        <td tal:content="file/name">file.name</td>
     
    3332  </table>
    3433  <form method="POST">
    35     <button class="btn primary">
    36       <span i18n:translate="">Reload page</span>
    37     </button>
    38     <input i18n:translate="" type="submit" class="btn" name="back"
     34    <input i18n:translate="" type="submit" class="btn btn-default" name="back"
    3935        tal:attributes="value view/back_button"/>
    4036  </form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogsshowfilepage.pt

    r8529 r11254  
    11<form method="post" class="form-horizontal">
    2   <input type="text" name="query"
     2  <input type="text" name="query" class="form-control"
    33         tal:attributes="value view/query; placeholder view/placeholder" />
    4   <input class="btn primary" type="submit" name="search"
     4  <input class="btn btn-primary" type="submit" name="search"
    55         tal:attributes="value view/search_button" />
    6   <input class="btn" type="submit" name="back"
     6  <input class="btn btn-default" type="submit" name="back"
    77         tal:attributes="value view/back_button" />
    88  <input type="hidden" name="logname"
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacentermanagepage.pt

    r7811 r11254  
    11<form  i18n:domain="waeup.kofa" method="POST">
    2   <div>
    3     <span  i18n:translate="">Storage path:</span>
    4     <input type="text" name="newpath"
    5      tal:attributes="value context/storage" />
    6     <br /><br />
    7     <span  i18n:translate="">
    8     Copy existing data to new storage?
    9     </span>&nbsp;&nbsp;
    10     <input type="checkbox" name="move" checked="checked" />
    11     <br /><br />
    12     <span  i18n:translate="">
    13     Overwrite contents in new location?
    14     </span>&nbsp;&nbsp;
    15     <input type="checkbox" name="overwrite" checked="no" />
    16     <br /><br />
    17     <input class="btn primary" type="submit" name="save"
    18         tal:attributes="value view/save_button" />
    19     <input class="btn" type="reset" name="reset"
    20         tal:attributes="value view/reset_button" />
    21     <input class="btn" type="submit" name="cancel"
    22         tal:attributes="value view/cancel_button" />
     2
     3  <br />
     4  <div class="form-group">
     5    <label i18n:translate="">Storage path</label>
     6        <input type="text" name="newpath" class="form-control"
     7               tal:attributes="value context/storage" />
    238  </div>
     9
     10  <div class="checkbox">
     11    <label>
     12      <input type="checkbox" name="move"  checked="checked">
     13      Copy existing data to new storage?
     14    </label>
     15  </div>
     16
     17  <div class="checkbox">
     18    <label>
     19      <input type="checkbox" name="overwrite">
     20      Overwrite contents in new location?
     21    </label>
     22  </div>
     23
     24  <input class="btn btn-primary" type="submit" name="save"
     25      tal:attributes="value view/save_button" />
     26  <input class="btn btn-default" type="reset" name="reset"
     27      tal:attributes="value view/reset_button" />
     28  <input class="btn btn-default" type="submit" name="cancel"
     29      tal:attributes="value view/cancel_button" />
    2430</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt

    r9610 r11254  
    1111<form action="." tal:attributes="action request/URL" method="post"
    1212      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    13     <table i18n:domain="waeup.kofa" class="display dataTableManageFiles">
     13    <table i18n:domain="waeup.kofa" class="kofa-data-table dataTableManageFiles">
    1414      <thead>
    1515        <tr>
     
    2121      </thead>
    2222      <tbody>
    23         <tr tal:repeat="file context/getPendingFiles" class="gradeC">
     23        <tr tal:repeat="file context/getPendingFiles">
    2424          <td>
    2525            <input type="checkbox" name="val_id"
     
    3333      </tbody>
    3434    </table>
    35       <div tal:condition="view/availableActions">
    36         <span tal:repeat="action view/actions" tal:omit-tag="">
    37           <input tal:replace="structure action/render"/>
    38         </span>
    39       </div>
     35    <div tal:condition="view/availableActions">
     36      <span tal:repeat="action view/actions" tal:omit-tag="">
     37        <input tal:replace="structure action/render"/>
     38      </span>
     39    </div>
    4040</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenteruploadpage.pt

    r9930 r11254  
    2424      </td>
    2525      <td>
    26         <select name="importer">
     26        <select name="importer" class="form-control half">
    2727          <option tal:repeat="importer view/getImporters"
    2828              tal:attributes="value importer/title"
     
    3737      </td>
    3838      <td>
    39         <select name="import_mode">
     39        <select name="import_mode" class="form-control half">
    4040          <option value='Create'>Create</option>
    4141          <option value='Update'>Update</option>
     
    4444      </td>
    4545    </tr>
    46     <tr>
    47       <td>
    48         <input class="btn primary" type="submit" name="SUBMIT"
    49             tal:attributes="value view/upload_button" />
    50         <input class="btn" type="submit" name="CANCEL"
    51             tal:attributes="value view/cancel_button"/>
    52       </td>
    53       <td>
    54       </td>
    55     </tr>
    5646  </table>
     47  <br />
     48  <input class="btn btn-primary" type="submit" name="SUBMIT"
     49      tal:attributes="value view/upload_button" />
     50  <input class="btn btn-default" type="submit" name="CANCEL"
     51      tal:attributes="value view/cancel_button"/>
    5752</form>
    58 
     53<br />
    5954<p i18n:translate="">
    6055    Import managers will be automatically informed by email after file upload.
     
    6762<h2 i18n:translate="">Available Processors (Importers)</h2>
    6863
    69 <table i18n:domain="waeup.kofa">
     64<table i18n:domain="waeup.kofa" class="table table-condensed">
    7065  <thead>
    7166    <tr>
     
    7469      <th i18n:translate="">Optional Schema Fields</th>
    7570      <th i18n:translate="">Non-Schema Fields</th>
    76       <th i18n:translate="">CSV Skeleton File</th>
    7771    </tr>
    7872  </thead>
    7973  <tr tal:repeat="importer view/getImporters">
    80     <td tal:content="importer/title"></td>
     74    <td>
     75      <span tal:content="importer/title">TITLE</span><br /><br />
     76      <a i18n:translate="" class="btn btn-primary btn-xs"
     77         tal:attributes="href python: 'skeleton?name=' + importer['name']">
     78         Download CSV Skeleton File
     79      </a>
     80    </td>
    8181    <td nowrap>
    8282      <span tal:repeat="field importer/fields">
     
    110110    </td>
    111111
    112     <td>
    113       <a i18n:translate=""
    114          tal:attributes="href python: 'skeleton?name=' + importer['name']">Download</a>
    115     </td>
    116112  </tr>
    117113</table>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentmanagepage.pt

    r7811 r11254  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   i18n:domain="waeup.kofa" enctype="multipart/form-data">
    3   <ul class="tabs" data-tabs="tabs">
    4     <li tal:attributes="class view/tab1">
    5     <a href="#tab-1">
    6       <span i18n:translate="">Settings
    7       </span></a>
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
     3  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     4    <li class="active">
     5      <a href="#tab1" data-toggle="tab">
     6      <span i18n:translate="">Settings</span></a>
    87    </li>
    9     <li tal:attributes="class view/tab2">
    10     <a href="#tab-2" i18n:translate="">Courses</a>
     8    <li>
     9      <a href="#tab2"  data-toggle="tab" i18n:translate="">Courses</a>
    1110    </li>
    12     <li tal:attributes="class view/tab3">
    13     <a href="#tab-3" i18n:translate="">Certificates</a>
     11    <li>
     12      <a href="#tab3"  data-toggle="tab" i18n:translate="">Certificates</a>
    1413    </li>
    15     <li tal:attributes="class view/tab4">
    16     <a href="#tab-4" i18n:translate="">Local Roles</a>
     14    <li>
     15      <a href="#tab4"  data-toggle="tab" i18n:translate="">Local Roles</a>
    1716    </li>
    1817  </ul>
    1918  <div class="tab-content">
    20     <div id="tab-1" tal:attributes="class view/tab1">
     19    <div id="tab1" class="active tab-pane">
    2120      <table class="form-table">
    2221        <tbody>
     
    2726        <span tal:repeat="action view/actions" tal:omit-tag="">
    2827          <input tal:condition="python:action.label in view.taboneactions"
    29             tal:replace="structure action/render"/>
     28                 tal:replace="structure action/render"/>
    3029        </span>
    3130      </div>
    3231    </div>
    33     <div id="tab-2" tal:attributes="class view/tab2"> <br />
    34       <table class="display dataTableManage">
     32    <div id="tab2" class="tab-pane">
     33      <br />
     34      <table class="kofa-data-table dataTableManage">
    3535        <thead>
    3636          <tr>
     
    4444        </thead>
    4545        <tbody>
    46           <tr tal:repeat="entry view/getCourses" class="gradeC"> <td>
    47               <input type="checkbox" name="val_id"
    48                 tal:attributes="value entry/name" /> </td> <td>
    49               <a href="" tal:attributes="href entry/url"
    50                 tal:content="entry/name">Name</a> </td>
     46          <tr tal:repeat="entry view/getCourses"> <td>
     47            <input type="checkbox" name="val_id"
     48                   tal:attributes="value entry/name" /> </td> <td>
     49            <a href="" tal:attributes="href entry/url"
     50               tal:content="entry/name">Name</a> </td>
    5151            <td tal:content="entry/container/title"> Title </td>
    5252          </tr>
     
    5656        <span tal:repeat="action view/actions" tal:omit-tag="">
    5757          <input tal:condition="python:action.label in view.tabtwoactions"
    58             tal:replace="structure action/render"/>
     58                 tal:replace="structure action/render"/>
    5959        </span>
    6060      </div>
    6161    </div>
    62     <div id="tab-3" tal:attributes="class view/tab3"> <br />
    63       <table class="display dataTableManage">
     62    <div id="tab3" class="tab-pane">
     63      <br />
     64      <table class="kofa-data-table dataTableManage">
    6465        <thead>
    6566          <tr>
     
    7374        </thead>
    7475        <tbody>
    75           <tr tal:repeat="entry view/getCertificates" class="gradeC"> <td>
    76               <input type="checkbox" name="val_id"
    77                 tal:attributes="value entry/name" /> </td> <td>
    78               <a href="" tal:attributes="href entry/url"
    79                 tal:content="entry/name">Name</a> </td>
     76          <tr tal:repeat="entry view/getCertificates"> <td>
     77            <input type="checkbox" name="val_id"
     78                   tal:attributes="value entry/name" /> </td> <td>
     79            <a href="" tal:attributes="href entry/url"
     80               tal:content="entry/name">Name</a> </td>
    8081            <td tal:content="entry/container/title"> Title  </td>
    8182          </tr>
     
    8586        <span tal:repeat="action view/actions" tal:omit-tag="">
    8687          <input tal:condition="python:action.label in view.tabthreeactions"
    87             tal:replace="structure action/render"/>
     88                 tal:replace="structure action/render"/>
    8889        </span>
    8990      </div>
    9091    </div>
    91     <div id="tab-4" tal:attributes="class view/tab4"> <br />
    92       <table class="display dataTableManage">
     92    <div id="tab4" class="tab-pane"> <br />
     93      <table class="kofa-data-table dataTableManage">
    9394        <thead>
    9495          <tr>
     
    104105        </thead>
    105106        <tbody>
    106           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC">
     107          <tr tal:repeat="entry view/getUsersWithLocalRoles">
    107108            <td> <input type="checkbox" name="role_id"
    108                 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     109            tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
    109110            <td tal:content="entry/user_name"> USERNAME </td>
    110111            <td tal:content="entry/user_title"> USERTITLE </td>
     
    116117        <span tal:repeat="action view/actions" tal:omit-tag="">
    117118          <input tal:condition="python:action.label in view.tabfouractions1"
    118             tal:replace="structure action/render"/>
     119                 tal:replace="structure action/render"/>
    119120        </span>
    120121      </div> <br /><br />
    121       <table class="form-table">
    122         <tr> <td>
    123             <select id="user" name="user">
    124               <option tal:attributes="value user/name" tal:repeat="user view/getUsers">
    125               <span tal:replace="user/val/title">USERTITLE
    126               </span>
    127               </option>
    128             </select> </td> <td>
    129             <select id="local_role" name="local_role">
    130               <option tal:attributes="value localrole/name"
    131                 tal:repeat="localrole view/getLocalRoles">
    132               <span tal:replace="localrole/title">LOCALROLETITLE
    133               </span>
    134               </option>
    135             </select> </td> <td>
    136             <div tal:condition="view/availableActions">
    137               <span tal:repeat="action view/actions" tal:omit-tag="">
    138                 <input tal:condition="python:action.label in view.tabfouractions2"
    139                   tal:replace="structure action/render"/>
    140               </span>
    141             </div> </td>
    142         </tr>
    143       </table>
     122      <div class="form-inline">
     123        <br />
     124        <div class="form-group">
     125          <select class="form-control" id="user" name="user">
     126            <option tal:repeat="user view/getUsers"
     127                    tal:attributes="value user/name">
     128            <span tal:replace="user/val/title">USERTITLE
     129            </span>
     130            </option>
     131          </select>
     132        </div>
     133        <div class="form-group">
     134          <select class="form-control" id="local_role" name="local_role">
     135            <option tal:repeat="localrole view/getLocalRoles"
     136                    tal:attributes="value localrole/name">
     137            <span tal:replace="localrole/title">LOCALROLETITLE
     138            </span>
     139            </option>
     140          </select>
     141        </div>
     142        <div class="form-group">
     143          <div tal:condition="view/availableActions">
     144            <span tal:repeat="action view/actions" tal:omit-tag="">
     145              <input tal:condition="python:action.label in view.tabfouractions2"
     146                     tal:replace="structure action/render"/>
     147            </span>
     148          </div>
     149        </div>
     150      </div>
    144151    </div>
    145152  </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentpage.pt

    r8481 r11254  
    1 <ul i18n:domain="waeup.kofa" class="tabs" data-tabs="tabs">
    2   <li class="active"><a href="#tab-1">
    3    <span i18n:translate="">Courses</span></a>
     1<ul i18n:domain="waeup.kofa" class="tabs nav nav-tabs" data-tabs="tabs">
     2  <li class="active"><a href="#tab1" data-toggle="tab">
     3    <span i18n:translate="">Courses</span></a>
    44  </li>
    5   <li><a href="#tab-2">
     5  <li><a href="#tab2" data-toggle="tab">
    66    <span i18n:translate="">Certificates</span></a>
    77  </li>
    88</ul>
    9 <div  i18n:domain="waeup.kofa" class="tab-content">
    10     <div id="tab-1" class="active">
     9<div i18n:domain="waeup.kofa" class="tab-content">
     10  <div id="tab1" class="active tab-pane">
    1111    <br />
    12     <table class="display dataTable">
     12    <table class="kofa-data-table dataTable">
    1313      <thead>
    1414        <tr>
     
    1818      </thead>
    1919      <tbody>
    20         <tr tal:repeat="entry view/getCourses" class="gradeC">
     20        <tr tal:repeat="entry view/getCourses">
    2121          <td>
    22                 <a href=""
    23                    tal:attributes="href entry/url"
    24                    tal:content="entry/name">Name</a>
     22            <a href=""
     23               tal:attributes="href entry/url"
     24               tal:content="entry/name">Name</a>
    2525          </td>
    2626          <td tal:content="entry/container/title">
    27                Title
     27            Title
    2828          </td>
    2929        </tr>
    3030      </tbody>
    3131    </table>
    32     </div>
    33     <div id="tab-2">
     32  </div>
     33  <div id="tab2" class="tab-pane">
    3434    <br />
    35     <table class="display dataTable">
     35    <table class="kofa-data-table dataTable">
    3636      <thead>
    3737        <tr>
     
    4141      </thead>
    4242      <tbody>
    43         <tr tal:repeat="entry view/getCertificates" class="gradeC">
     43        <tr tal:repeat="entry view/getCertificates">
    4444          <td>
    45                 <a href=""
    46                    tal:attributes="href entry/url"
    47                    tal:content="entry/name">Name</a>
     45            <a href=""
     46               tal:attributes="href entry/url"
     47               tal:content="entry/name">Name</a>
    4848          </td>
    4949          <td tal:content="entry/container/title">
    50                Title
     50            Title
    5151          </td>
    5252        </tr>
    5353      </tbody>
    5454    </table>
    55     </div>
     55  </div>
    5656</div>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultiescontainermanagepage.pt

    r7464 r11254  
    22      enctype="multipart/form-data">
    33
    4   <table>
     4  <table class="table table-hover">
    55    <thead>
    66      <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultymanagepage.pt

    r7811 r11254  
    11<form action="." tal:attributes="action request/URL"
    22  i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data">
    3   <ul class="tabs" data-tabs="tabs">
    4     <li tal:attributes="class view/tab1">
    5     <a href="#tab-1">
     3  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     4    <li class="active">
     5    <a href="#tab1" data-toggle="tab">
    66      <span i18n:translate="">Settings
    77      </span></a>
    88    </li>
    9     <li tal:attributes="class view/tab2">
    10     <a href="#tab-2">
     9    <li>
     10    <a href="#tab2" data-toggle="tab">
    1111      <span tal:content="view/subunits">CONTENTS
    1212      </span> </a>
    1313    </li>
    14     <li tal:attributes="class view/tab3">
    15     <a href="#tab-3">
     14    <li>
     15    <a href="#tab3" data-toggle="tab">
    1616      <span i18n:translate="">Local Roles
    1717      </span></a>
     
    1919  </ul>
    2020  <div class="tab-content">
    21     <div id="tab-1" tal:attributes="class view/tab1">
     21    <div id="tab1" class="active tab-pane">
    2222      <table class="form-table">
    2323        <tbody>
     
    3232      </div>
    3333    </div>
    34     <div id="tab-2" tal:attributes="class view/tab2">
     34    <div id="tab2" class="tab-pane">
    3535      <h3 tal:content="view/subunits">DEPARTMENTS</h3>
    36       <table>
     36      <table class="table table-hover">
    3737        <thead>
    3838          <tr>
     
    6363      </div>
    6464    </div>
    65     <div id="tab-3" tal:attributes="class view/tab3"> <br />
    66       <table class="display dataTableManage">
     65    <div id="tab3" class="tab-pane"> <br />
     66      <table class="kofa-data-table dataTableManage">
    6767        <thead>
    6868          <tr>
     
    7878        </thead>
    7979        <tbody>
    80           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
     80          <tr tal:repeat="entry view/getUsersWithLocalRoles">
     81            <td>
    8182              <input type="checkbox" name="role_id"
    8283              tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     
    9394        </span>
    9495      </div><br /><br />
    95       <table class="form-table">
    96         <tr> <td>
    97             <select id="user" name="user">
    98               <option tal:repeat="user view/getUsers" tal:attributes="value user/name">
    99               <span tal:replace="user/val/title">USERTITLE
    100               </span>
    101               </option>
    102             </select> </td> <td>
    103             <select id="local_role" name="local_role">
    104               <option tal:repeat="localrole view/getLocalRoles"
    105                       tal:attributes="value localrole/name">
    106               <span tal:replace="localrole/title">LOCALROLETITLE
    107               </span>
    108               </option>
    109             </select> </td> <td>
    110             <div tal:condition="view/availableActions">
    111               <span tal:repeat="action view/actions" tal:omit-tag="">
    112                 <input tal:condition="python:action.label in view.tabthreeactions2"
    113                        tal:replace="structure action/render"/>
    114               </span>
    115             </div> </td>
    116         </tr>
    117       </table>
     96      <div class="form-inline">
     97        <br />
     98        <div class="form-group">
     99          <select id="user" name="user" class="form-control">
     100            <option tal:repeat="user view/getUsers"
     101                    tal:attributes="value user/name">
     102            <span tal:replace="user/val/title">USERTITLE
     103            </span>
     104            </option>
     105          </select>
     106        </div>
     107        <div class="form-group">
     108          <select id="local_role" name="local_role" class="form-control">
     109            <option tal:repeat="localrole view/getLocalRoles"
     110                    tal:attributes="value localrole/name">
     111            <span tal:replace="localrole/title">LOCALROLETITLE
     112            </span>
     113            </option>
     114          </select>
     115        </div>
     116        <div class="form-group" tal:condition="view/availableActions">
     117          <span tal:repeat="action view/actions" tal:omit-tag="">
     118            <input tal:condition="python:action.label in view.tabthreeactions2"
     119                   tal:replace="structure action/render"/>
     120          </span>
     121        </div>
     122      </div>
     123
    118124    </div>
    119125  </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultypage.pt

    r8024 r11254  
    33</div>
    44
    5 <table i18n:domain="waeup.kofa">
     5<table class="table table-hover" i18n:domain="waeup.kofa">
    66  <thead>
    77    <tr>
     
    1212  <tbody>
    1313    <tr tal:repeat="value context/values">
    14       <td> <a tal:attributes="href value/__name__">
     14      <td> <a tal:attributes="href python: view.url(value)">
    1515          <span tal:content="value/code">Name</span></a></td>
    1616      <td tal:content="value/longtitle">Title</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/filedisplay.pt

    r8106 r11254  
    44  </td>
    55  <td>
    6     <a tal:attributes="href viewlet/download_name"
     6    <a tal:attributes="href python: view.url(context, viewlet.download_name)"
    77       tal:content="viewlet/download_name"
    88       target="image">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/fileupload.pt

    r8135 r11254  
    55  <td>
    66    <tal:file tal:condition="viewlet/file_exists">
    7       <a tal:attributes="href viewlet/download_name"
     7      <a tal:attributes="href python: view.url(context, viewlet.download_name)"
    88         tal:content="viewlet/title"
    99         target="image">
     
    1111      </a>
    1212    </tal:file>
     13    <input type="file" tal:attributes="name viewlet/input_name"/>
    1314    <br />
    14     <input type="file" tal:attributes="name viewlet/input_name"/>
    15     <br /><br />
    1615    <input type="submit" tal:condition="viewlet/file_exists"
    1716           tal:attributes="id python:('delete_%s' % viewlet.input_name);
    1817              name python:('delete_%s' % viewlet.input_name);
    1918              value viewlet/delete_button"
    20            class="btn error" />
     19           class="btn btn-danger" />
    2120    <input type="submit"
    2221             tal:attributes="id python:('upload_%s' % viewlet.input_name);
    2322                name python:('upload_%s' % viewlet.input_name);
    2423                value viewlet/upload_button"
    25              class="btn primary" />
     24             class="btn btn-primary" />
    2625    <span i18n:translate="">
    2726      Max. file size:
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/findstudentspage.pt

    r10646 r11254  
    1 <form method="POST" i18n:domain="waeup.kofa">
     1<form method="POST" i18n:domain="waeup.kofa" class="form-inline">
    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   </select>
    12 
    13   <input type="text" name="searchterm" />
    14 
    15   <p>&nbsp;</p>
    16   <div tal:condition="view/hitlist">
    17     <h3 i18n:translate="">Search Results</h3>
    18     <input type="hidden" name="old_searchterm"
    19          tal:attributes="value view/searchterm" />
    20     <input type="hidden" name="old_searchtype"
    21          tal:attributes="value view/searchtype" />
    22     <table class="display dataTable">
    23       <thead>
    24       <tr>
    25         <th i18n:translate="">Student Id</th>
    26         <th i18n:translate="">Reg. Number</th>
    27         <th i18n:translate="">Matric. Number</th>
    28         <th i18n:translate="">State</th>
    29         <th i18n:translate="">Full Name</th>
    30       </tr>
    31       </thead>
    32       <tbody>
    33       <tr tal:repeat="item view/hitlist" class="gradeC">
    34         <td> <a tal:attributes="href item/url">
    35           <span tal:content="item/student_id">A123456</span></a>
    36         </td>
    37         <td class="center"> <a tal:attributes="href item/url">
    38           <span tal:content="item/reg_number">9999999</span></a>
    39         </td>
    40         <td class="center"> <a tal:attributes="href item/url">
    41           <span tal:content="item/matric_number">9999999</span></a>
    42         </td>
    43         <td tal:content="item/state">admitted</td>
    44         <td tal:content="item/display_fullname">Bob</td>
    45       </tr>
    46       </tbody>
    47     </table>
    48     <br />
     3  <div class="form-group">
     4    <input class="btn btn-primary" type="submit" name="search"
     5      tal:attributes="value view/search_button" />
     6  </div>
     7  <div class="form-group">
     8    <select name="searchtype" class="form-control">
     9      <option i18n:translate="" value="student_id">with id</option>
     10      <option i18n:translate="" value="fullname">with name</option>
     11      <option i18n:translate="" value="reg_number">with registration number</option>
     12      <option i18n:translate="" value="matric_number">with matriculation number</option>
     13    </select>
     14  </div>
     15  <div class="form-group">
     16    <input type="text" class="form-control" name="searchterm" />
    4917  </div>
    5018</form>
     19
     20<p>&nbsp;</p>
     21<div tal:condition="view/hitlist">
     22  <h3 i18n:translate="">Search Results</h3>
     23  <input type="hidden" name="old_searchterm"
     24       tal:attributes="value view/searchterm" />
     25  <input type="hidden" name="old_searchtype"
     26       tal:attributes="value view/searchtype" />
     27  <table class="kofa-data-table dataTable">
     28    <thead>
     29    <tr>
     30      <th i18n:translate="">Student Id</th>
     31      <th i18n:translate="">Reg. Number</th>
     32      <th i18n:translate="">Matric. Number</th>
     33      <th i18n:translate="">State</th>
     34      <th i18n:translate="">Full Name</th>
     35    </tr>
     36    </thead>
     37    <tbody>
     38    <tr tal:repeat="item view/hitlist">
     39      <td> <a tal:attributes="href item/url">
     40        <span tal:content="item/student_id">A123456</span></a>
     41      </td>
     42      <td class="center"> <a tal:attributes="href item/url">
     43        <span tal:content="item/reg_number">9999999</span></a>
     44      </td>
     45      <td class="center"> <a tal:attributes="href item/url">
     46        <span tal:content="item/matric_number">9999999</span></a>
     47      </td>
     48      <td tal:content="item/state">admitted</td>
     49      <td tal:content="item/display_fullname">Bob</td>
     50    </tr>
     51    </tbody>
     52  </table>
     53</div>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt

    r8853 r11254  
    1 <form i18n:domain="waeup.kofa" method="post">
    2   <table id="login" class="form-table" summary="Table for entering login information">
    3     <tbody>
    4       <tr>
    5         <td i18n:translate="" class="fieldname">
    6           User Name or Id:
    7         </td>
    8         <td>
    9           <input type="text" id="login" name="form.login" size="20" />
    10         </td>
    11       </tr>
    12       <tr>
    13         <td i18n:translate="" class="fieldname">
    14           Password:
    15         </td>
    16         <td>
    17           <input type="password" id="password" name="form.password"  size="20" value="" />
    18           &nbsp;&nbsp;
    19           </td>
    20       </tr>
    21       <tr>
    22         <td>&nbsp;</td>
    23         <td>
    24           <font  i18n:translate="" color="red"> Notice: User names, Ids and passwords are case sensitive.</font>
    25         </td>
    26       </tr>
    27     </tbody>
    28   </table>
     1<form i18n:domain="waeup.kofa" method="post" class="form-horizontal">
     2  <br />
     3  <div class="form-group">
     4    <label i18n:translate="" class="col-sm-2 control-label">User Name or Id</label>
     5    <div class="col-sm-10">
     6      <input name="form.login" type="text" class="form-control" id="login">
     7    </div>
     8  </div>
     9  <div class="form-group">
     10    <label i18n:translate="" class="col-sm-2 control-label">Password</label>
     11    <div class="col-sm-10">
     12      <input name="form.password" type="password" class="form-control" id="password">
     13      <font  i18n:translate="" color="red"> Notice: User names, Ids and passwords are case sensitive.</font>
     14    </div>
     15  </div>
    2916  <input type="hidden" name="camefrom"   tal:attributes="value view/camefrom" />
    30   <input class="btn primary" type="submit" name="SUBMIT"
     17  <input class="btn btn-primary" type="submit" name="SUBMIT"
    3118    tal:attributes="value view/login_button" />
    32 
    33 
    3419  <br /><br /><br />
    35 
    3620  <p  i18n:translate="login_trouble1">Don't forget to logout or exit your browser when you're done.
    3721    If you are having trouble logging in, make sure to enable  cookies in your web browser.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/reportscontainercreate.pt

    r9643 r11254  
    88  </p>
    99  <br />
    10   <div class="clearfix">
    11     <label for="generator">Report Type:</label>
    12     <div class="input">
    13       <select name="generator">
    14         <span tal:repeat="items view/creators" tal:omit-tag="">
    15           <option
    16               tal:define="name python: items[1]; title python: items[0]"
    17               tal:attributes="value name">
    18             <span tal:replace="title">TITLE</span>
    19           </option>
    20         </span>
    21       </select>
    22       <div class="help-inline" i18n:translate="">
    23         Type of report to create
    24       </div>
    25     </div>
     10  <div class="form-group">
     11    <label for="generator">Report Type</label>
     12    <select name="generator" class="form-control half">
     13      <span tal:repeat="items view/creators" tal:omit-tag="">
     14        <option
     15            tal:define="name python: items[1]; title python: items[0]"
     16            tal:attributes="value name">
     17          <span tal:replace="title">TITLE</span>
     18        </option>
     19      </span>
     20    </select>
    2621  </div>
    27   <div class="input">
    28     <input i18n:translate="" type="submit" class="btn primary"
     22  <div class="form-group">
     23    <input i18n:translate="" type="submit" class="btn btn-primary"
    2924           name="START_GENERATOR" value="Configure" />
    30     <a class="btn secondary" href=""
     25    <a class="btn btn-default" href=""
    3126       tal:attributes="href python:view.url(context)">Cancel</a>
    3227  </div>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/reportscontainerpage.pt

    r9840 r11254  
    1 <table i18n:domain="waeup.kofa">
     1<table i18n:domain="waeup.kofa" class="table">
    22  <thead>
    33    <tr>
     
    3131          <input type="hidden" name="job_id"
    3232                 tal:attributes="value python: entry[0]" />
    33           <input type="submit" class="btn small primary"
     33          <input type="submit" class="btn btn-sm btn-primary"
    3434                 name="DOWNLOAD" value="Download"
    3535                 tal:condition="python: entry[4]" />
    36           <input type="submit" class="btn small secondary"
     36          <input type="submit" class="btn btn-sm btn-default"
    3737                 name="DISCARD" value="Discard"
    3838                 tal:condition="python: entry[3]" />
    39           <a href="" class="btn" i18n:translate=""
     39          <a href="" class="btn btn-sm btn-default" i18n:translate=""
    4040             tal:condition="python: entry[5]">
    41             <img tal:attributes="src static/actionicon_reload.png" />
     41            <img src="/static/img/actionicon_reload.png" />
    4242            Reload
    4343          </a>
     
    4848</table>
    4949<form method="POST" i18n:domain="waeup.kofa">
    50   <div class="span12">
    51     <a href="create" class="btn primary" i18n:translate="">
    52       Create new report
    53     </a>
    54   </div>
     50  <a tal:attributes="href python:view.url(context, 'create')"
     51     class="btn btn-primary" i18n:translate="">
     52    Create new report
     53  </a>
    5554</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/searchpage.pt

    r9631 r11254  
    1 <form method="post">
    2   <input type="text" name="query"
    3          tal:attributes="value view/query" />
    4     <input class="btn primary" type="submit" name="SUBMIT"
     1<form method="POST" class="form-inline">
     2<br />
     3  <div class="form-group">
     4      <input type="text" name="query" class="form-control"
     5         tal:attributes="value view/query" />
     6  </div>
     7  <div class="form-group">
     8    <input class="btn btn-primary" type="submit" name="SUBMIT"
    59      tal:attributes="value view/search_button"/>
     10  </div>
    611</form>
    712<br />
    813<span  i18n:domain="waeup.kofa" tal:condition="view/hitlist">
    914    <h3 i18n:translate="">Search Results</h3>
    10     <table class="display dataTable">
     15    <table class="kofa-data-table dataTable">
    1116        <thead>
    1217            <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt

    r10900 r11254  
    22<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.kofa">
    33  <head>
     4
     5    <!-- Diazo element-->
    46    <title i18n:translate="">
    57      WAeUP.Kofa - Student Management System
    6     </title>
     8    </title> 
     9    <!-- /Diazo element-->
     10
    711    <!--base href="http://localhost:8080/app/@@page"
    812     tal:attributes="href python: view.url(layout.site)" / -->
     
    1418            href python: view.url(layout.site, 'feed.rss')" />
    1519  </head>
    16   <body>
    17     <div class="topbar" data-scrollspy="scrollspy" >
    18       <div class="topbar-inner">
    19         <div class="container-fluid">
    20           <a class="brand" href="#"
    21               tal:attributes="href python: view.url(layout.site)"
    22               tal:content="layout/getAppAcronym">ACRONYM</a>
    23           <ul class="nav kofa-navbar-left">
    24             <tal:primary_nav content="structure provider:primary_nav" />
    25           </ul>
    26           <ul class="nav secondary-nav kofa-navbar-right">
    27             <li tal:condition="not: layout/isAuthenticated">
    28             <a href="#" i18n:translate=""
    29                 tal:attributes="href python: view.url(layout.site, 'login')">
    30                 Login
    31             </a>
    32             </li>
    33             <li tal:condition="layout/isAuthenticated">
    34             <a href="#" i18n:translate=""
    35                tal:attributes="href python: view.url(layout.site, '@@contactadmin')">
    36                Contact
    37             </a>
    38             </li>
    39             <li tal:condition="layout/isAuthenticated">
    40             <a href="#" i18n:translate=""
    41                tal:attributes="href python: view.url(context, '@@logout')">
    42                Logout
    43             </a>
    44             </li>
    45           </ul>
    46           <span class="language"
    47                 tal:define="langs provider:languages"
    48                 tal:condition="langs">
    49             <tal:languages
    50                   tal:content="structure langs" /> |
    51           </span>
    52         </div>
    53       </div>
    54     </div>
    5520
     21  <!-- Diazo element-->
     22  <body class="kofa-body">
     23
     24    <!-- Diazo element-->
     25    <a class="kofa-brand-link" href="#"
     26        tal:attributes="href python: view.url(layout.site)"
     27        tal:content="layout/getAppAcronym">ACRONYM
     28    </a>
     29    <!-- /Diazo element-->
     30
     31    <!-- Diazo element-->
     32    <ul class="nav kofa-navbar-left">
     33      <tal:primary_nav content="structure provider:primary_nav" />
     34    </ul>
     35    <!-- /Diazo element-->
     36
     37    <!-- Diazo element-->
     38    <ul class="nav secondary-nav kofa-navbar-right">
     39      <li tal:condition="not: layout/isAuthenticated">
     40      <a href="#" i18n:translate=""
     41          tal:attributes="href python: view.url(layout.site, 'login')">
     42          Login
     43      </a>
     44      </li>
     45      <li tal:condition="layout/isAuthenticated">
     46      <a href="#" i18n:translate=""
     47         tal:attributes="href python: view.url(layout.site, '@@contactadmin')">
     48         Contact
     49      </a>
     50      </li>
     51      <li tal:condition="layout/isAuthenticated">
     52      <a href="#" i18n:translate=""
     53         tal:attributes="href python: view.url(context, '@@logout')">
     54         Logout
     55      </a>
     56      </li>
     57    </ul>
     58    <!-- /Diazo element-->
     59
     60    <span tal:define="langs provider:languages"
     61          tal:condition="langs"
     62          class="language">
     63      <tal:languages tal:content="structure langs" /> |
     64    </span>
     65
     66    <!-- Diazo element-->
    5667    <ul class="breadcrumb">
    5768      <tal:breadcrumbs
    5869            tal:condition="python: layout.isAuthenticated()"
    5970            tal:content="structure provider:breadcrumbs" />
    60       <span
    61         tal:condition="layout/getStudentName" class="wfstatus">
    62           <span i18n:translate="">Student Id:</span>
    63           <span tal:replace="python:context.student.student_id">
    64             ID
    65           </span>&nbsp;&nbsp;
    66           <span i18n:translate="">State:</span>
    67           <span tal:replace="python:context.student.translated_state">
    68             STATE
    69           </span>
    70       </span>
    7171    </ul>
     72    <!-- /Diazo element-->
    7273
    73     <div class="container-fluid">
    74       <div class="sidebar">
    75         <div class="well">
    76           <div tal:condition="layout/getStudentName">
    77             <h5 tal:content="layout/getStudentName">STUDENTNAME</h5>
    78             <ul>
    79               <tal:left content="structure provider:left_studentmanage" />
    80             </ul>
    81           </div>
    82           <div tal:condition="layout/isAuthenticated">
    83             <h5 tal:content="layout/getUserTitle">USERNAME</h5>
    84             <ul>
    85               <tal:left content="structure provider:left_manage" />
    86             </ul>
    87           </div>
     74    <!-- Diazo element-->
     75    <span tal:condition="layout/getStudentName">
     76      <div class="wfstatus">
     77            <span tal:replace="python:context.student.student_id">
     78              Id
     79            </span>
     80            &bull;
     81            <span tal:replace="python:context.student.translated_state">
     82              State
     83            </span>
     84      </div>
     85    </span>
     86    <!-- /Diazo element-->
     87
     88    <!-- Diazo element-->
     89    <div class="sidebar well">
     90        <div tal:condition="layout/getStudentName">
     91          <div class="kofa-sidebar-title" tal:content="layout/getStudentName">STUDENTNAME</div>
     92          <ul class="nav">
     93            <tal:left content="structure provider:left_studentmanage" />
     94          </ul>
     95        </div>
     96        <div tal:condition="layout/isAuthenticated">
     97          <div class="kofa-sidebar-title" tal:content="layout/getUserTitle">USERNAME</div>
     98          <ul class="nav">
     99            <tal:left content="structure provider:left_manage" />
     100          </ul>
     101      </div>
     102    </div>
     103    <!-- /Diazo element-->
     104
     105    <!-- Diazo element-->
     106    <div class="kofa-content">
     107      <div class="actionbar" tal:condition="provider:actionbar">
     108        <tal:actionbar content="structure provider:actionbar" />&nbsp;
     109      </div>
     110      <div
     111          tal:define="message context/@@messages"
     112          tal:condition="python: len(message)>11">
     113        <div tal:content="structure message">
    88114        </div>
    89115      </div>
    90       <div class="span13 content">
    91         <div class="actionbar" tal:condition="provider:actionbar">
    92           <tal:actionbar content="structure provider:actionbar" />&nbsp;
    93         </div>
    94         <div
    95             tal:define="message context/@@messages"
    96             tal:condition="python: len(message)>11">
    97           <div tal:content="structure message">
    98           </div>
    99         </div>
    100         <div class="alert-message error"
    101           tal:define="status view/status|nothing"
    102           tal:condition="status">
    103           <span tal:content="view/status">
    104             FORM STATUS SUMMARY
    105           </span>:
    106           <ul id="alert-error" tal:condition="view/errors">
    107             <li tal:repeat="error view/error_views">
    108                <span tal:replace="structure error">Error Type</span>
    109             </li>
    110           </ul>
    111         </div>
    112         <div class="pull-right">
    113           <a i18n:translate="" href="#footer">Back to bottom</a>
    114         </div>
    115         <h1 class="kofa-content-label"
    116             tal:condition="view/label|nothing"
    117             tal:content="structure view/label">LABEL</h1>
    118         <div tal:content="structure view/content"> THE CONTENT
    119         </div>
    120         <div id="footer" class="footer">
    121           <div class="pull-right">
    122             <a i18n:translate="" href="#">Back to top</a>
    123           </div>
    124           <div i18n:translate="">
    125             Kofa - Student Management System
    126           </div>
    127           <div i18n:translate="">
    128             Copyright &copy; WAeUP Group 2008-2014
    129           </div>
    130         </div>
     116      <div class="alert alert-danger"
     117        tal:define="status view/status|nothing"
     118        tal:condition="status">
     119        <span tal:content="view/status">
     120          FORM STATUS SUMMARY
     121        </span>:
     122        <ul id="alert-error" tal:condition="view/errors">
     123          <li tal:repeat="error view/error_views">
     124             <span tal:replace="structure error">Error Type</span>
     125          </li>
     126        </ul>
    131127      </div>
     128      <div class="pull-right">
     129        <a i18n:translate="" href="#bottom">Back to bottom</a>
     130      </div>
     131      <h1 class="kofa-content-label"
     132          tal:condition="view/label|nothing"
     133          tal:content="structure view/label">LABEL</h1>
     134      <div tal:content="structure view/content"> THE CONTENT
     135      </div>
     136      <div id="bottom" class="pull-right">
     137        <a i18n:translate="" href="#">Back to top</a>
     138      </div>
     139      <br />
     140
    132141    </div>
     142    <!-- /Diazo element-->
     143
    133144  </body>
     145  <!-- /Diazo element-->
     146
    134147</html>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt

    r10900 r11254  
    1717            href python: view.url(layout.site, 'feed.rss')" />
    1818  </head>
    19   <body>
    20     <div class="topbar" data-scrollspy="scrollspy" >
    21       <div class="topbar-inner">
    22         <div  class="container">
    23           <a class="brand" href="#"
    24               tal:attributes="href python: view.url(layout.site)"
    25               tal:content="layout/getAppAcronym">ACRONYM</a>
    26           <ul class="nav kofa-navbar-left">
    27               <tal:primary_nav content="structure provider:primary_nav" />
    28               <tal:primary_nav content="structure provider:primary_nav_student" />
    29           </ul>
    30           <ul class="nav secondary-nav kofa-navbar-right">
    31             <li tal:condition="not: layout/isAuthenticated">
    32             <a href="#" i18n:translate=""
    33                tal:attributes="href python: view.url(layout.site, 'login')">
    34                 Login
    35             </a>
    36             </li>
    37             <li tal:condition="layout/isAuthenticated">
    38             <a href="#" i18n:translate=""
    39                tal:attributes="href python: view.url(layout.site, '@@contactadmin')">
    40                 Contact
    41             </a>
    42             </li>
    43             <li tal:condition="layout/isAuthenticated">
    44             <a href="#" i18n:translate=""
    45                tal:attributes="href python: view.url(context, '@@logout')">
    46                Logout
    47             </a>
    48             </li>
    49           </ul>
    50           <span class="language"
    51                 tal:define="langs provider:languages"
    52                 tal:condition="langs">
    53             <tal:languages
    54                   tal:content="structure langs" /> |
    55           </span>
    56         </div>
    57       </div>
    58     </div>
    5919
    60     <div class="container">
    61       <ul class="student-info-bar" tal:condition="layout/isAuthenticated">
    62         <tal:breadcrumbs
    63               tal:condition="python: layout.isAuthenticated()"
    64               tal:content="structure provider:breadcrumbs" />
    65         <span tal:condition="layout/getStudentName" class="wfstatus">
     20  <!-- Diazo element-->
     21  <body class="kofa-body">
     22
     23    <!-- Diazo element-->
     24    <a class="kofa-brand-link" href="#"
     25        tal:attributes="href python: view.url(layout.site)"
     26        tal:content="layout/getAppAcronym">ACRONYM</a>
     27    <!-- /Diazo element-->
     28
     29    <!-- Diazo element-->
     30    <ul class="nav kofa-navbar-left">
     31        <tal:primary_nav content="structure provider:primary_nav" />
     32        <tal:primary_nav content="structure provider:primary_nav_student" />
     33    </ul>
     34    <!-- /Diazo element-->
     35
     36    <!-- Diazo element-->
     37    <ul class="nav secondary-nav kofa-navbar-right">
     38      <li tal:condition="not: layout/isAuthenticated">
     39      <a href="#" i18n:translate=""
     40         tal:attributes="href python: view.url(layout.site, 'login')">
     41          Login
     42      </a>
     43      </li>
     44      <li tal:condition="layout/isAuthenticated">
     45      <a href="#" i18n:translate=""
     46         tal:attributes="href python: view.url(layout.site, '@@contactadmin')">
     47          Contact
     48      </a>
     49      </li>
     50      <li tal:condition="layout/isAuthenticated">
     51      <a href="#" i18n:translate=""
     52         tal:attributes="href python: view.url(context, '@@logout')">
     53         Logout
     54      </a>
     55      </li>
     56    </ul>
     57    <!-- Diazo element-->
     58
     59    <span tal:define="langs provider:languages"
     60          tal:condition="langs"
     61          class="language">
     62      <tal:languages tal:content="structure langs" /> |
     63    </span>
     64
     65    <!-- Diazo element-->
     66    <ul class="breadcrumb" tal:condition="layout/isAuthenticated">
     67      <tal:breadcrumbs
     68            tal:condition="python: layout.isAuthenticated()"
     69            tal:content="structure provider:breadcrumbs" />
     70    </ul>
     71    <!-- /Diazo element-->
     72
     73    <!-- Diazo element-->
     74    <span tal:condition="layout/getStudentName">
     75      <div class="wfstatus">
    6676            <span tal:replace="python:context.student.student_id">
    6777              Id
    6878            </span>
    69             |
     79            &bull;
    7080            <span tal:replace="python:context.student.translated_state">
    7181              State
    7282            </span>
    73         </span>
    74       </ul>
    75       <div class="content">
    76         <div class="actionbar" tal:condition="provider:actionbar">
    77           <tal:actionbar content="structure provider:actionbar" />&nbsp;
    78         </div>
    79         <div tal:define="message context/@@messages"
    80              tal:condition="python: len(message)>11">
    81           <div tal:content="structure message">
    82           </div>
    83         </div>
    84         <div class="alert-message error"
    85           tal:define="status view/status|nothing"
    86           tal:condition="status">
    87           <span tal:content="view/status">
    88             FORM STATUS SUMMARY
    89           </span>:
    90           <ul id="alert-error" tal:condition="view/errors">
    91             <li tal:repeat="error view/error_views">
    92                <span tal:replace="structure error">Error Type</span>
    93             </li>
    94           </ul>
    95         </div>
    96         <div class="pull-right">
    97           <a i18n:translate="" href="#footer">Back to bottom</a>
    98         </div>
    99         <h1 class="kofa-content-label"
    100             tal:condition="view/label|nothing"
    101             tal:content="structure view/label">Label</h1>
    102         <div tal:content="structure view/content">
    103           THE CONTENT
    104         </div>
    105         <div id="footer" class="footer">
    106           <div class="pull-right">
    107             <a i18n:translate="" href="#">Back to top</a>
    108           </div>
    109           <div i18n:translate="">
    110             Kofa - Student Management System
    111           </div>
    112           <div i18n:translate="">
    113             Copyright &copy; WAeUP Group 2008-2014
    114           </div>
     83      </div>
     84    </span>
     85    <!-- /Diazo element-->
     86
     87    <!-- Diazo element-->
     88    <div class="kofa-content">
     89      <div class="actionbar" tal:condition="provider:actionbar">
     90        <tal:actionbar content="structure provider:actionbar" />&nbsp;
     91      </div>
     92      <div tal:define="message context/@@messages"
     93           tal:condition="python: len(message)>11">
     94        <div tal:content="structure message">
    11595        </div>
    11696      </div>
     97      <div class="alert alert-danger"
     98        tal:define="status view/status|nothing"
     99        tal:condition="status">
     100        <span tal:content="view/status">
     101          FORM STATUS SUMMARY
     102        </span>:
     103        <ul id="alert-error" tal:condition="view/errors">
     104          <li tal:repeat="error view/error_views">
     105             <span tal:replace="structure error">Error Type</span>
     106          </li>
     107        </ul>
     108      </div>
     109      <div class="pull-right">
     110        <a i18n:translate="" href="#bottom">Back to bottom</a>
     111      </div>
     112      <h1 class="kofa-content-label"
     113          tal:condition="view/label|nothing"
     114          tal:content="structure view/label">Label</h1>
     115      <div tal:content="structure view/content">
     116        THE CONTENT
     117      </div>
     118      <div id="bottom" class="pull-right">
     119        <a i18n:translate="" href="#">Back to top</a>
     120      </div>
     121      <br />
    117122    </div>
     123    <!-- /Diazo element-->
     124
    118125  </body>
     126  <!-- /Diazo element-->
     127
    119128</html>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/usereditformpage.pt

    r8486 r11254  
    99        <td i18n:translate="" class="fieldname">Password:</td>
    1010        <td>
    11           <input name="password" type="password"  />
     11          <input class="form-control" name="password" type="password"  />
    1212        </td>
    1313      </tr>
     
    1515        <td i18n:translate="" class="fieldname">Retype Password:</td>
    1616        <td>
    17           <input name="control_password" type="password" />
     17          <input class="form-control" name="control_password" type="password" />
    1818        </td>
    1919      </tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/userscontainerpage.pt

    r9495 r11254  
    1 <table i18n:domain="waeup.kofa" class="display dataTable">
     1<table i18n:domain="waeup.kofa" class="kofa-data-table dataTable">
    22  <thead>
    33    <tr>
    4       <th i18n:translate="">User Id</th>
     4      <th i18n:translate="">Id</th>
    55      <th i18n:translate="">Name</th>
    66      <th i18n:translate="">Portal Roles</th>
     
    1919          <input type="hidden" name="userid"
    2020           tal:attributes="value account/name"/>
    21             <input class="btn" type="submit" name="manage"
     21            <input class="btn btn-sm btn-primary" type="submit" name="manage"
    2222              tal:attributes="value view/manage_button" />
    23             <input class="btn" type="submit" name="delete"
     23            <input class="btn btn-sm btn-default" type="submit" name="delete"
    2424              tal:attributes="value view/delete_button" />
    2525        </form>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py

    r10676 r11254  
    374374        self.browser.open(self.datacenter_path)
    375375        self.browser.getLink("Upload data").click()
    376         self.assertTrue(
    377             '<a href="skeleton?name=facultyprocessor">Download</a>'
    378             in self.browser.contents)
    379376        self.browser.getLink(url='skeleton?name=facultyprocessor').click()
    380377        self.assertEqual(self.browser.headers['Status'], '200 Ok')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r10782 r11254  
    124124        """Get the icon URL.
    125125        """
    126         static = self.view.static
    127         if static is None or static.get(self.icon, None) is None:
    128             # In derived classes defined in other modules/packages
    129             # than w.k.browser, ``static`` might refer to a static dir
    130             # local to the derived class' module. As we often like to
    131             # get the icons from here
    132             # (i.e. waeup.kofa.browser/static), we set the directory
    133             # resource appropiately.
    134             #
    135             # XXX: The hardcoding of 'w.k.browser' should be replaced
    136             #      by something smarter.
    137             #
    138             # TODO: notes in here should go to general documentation.
    139             static = queryAdapter(
    140                 self.request, Interface, name='waeup.kofa.browser')
    141         return static[self.icon]()
     126        return '/static/img/%s' % self.icon
    142127
    143128    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/frontpage.html

    r9374 r11254  
    11<h1>Welcome to WAeUP.Kofa
    22<br>
    3 <small>
     3<p class="kofa-content-desc">
    44the Information and Registration Portal
    55for Schools, Colleges and Universities
    6 </small>
     6</p>
    77</h1>
    88
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py

    r10771 r11254  
    2626    NullValidator)
    2727from waeup.kofa.browser.breadcrumbs import Breadcrumb
    28 from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning
    2928from waeup.kofa.browser.layout import default_primary_nav_template
    3029from waeup.kofa.browser.pages import delSubobjects
     
    134133        _('Clear all hostels'),
    135134        _('Remove selected')]
    136 
    137     def update(self):
    138         tabs.need()
    139         self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''
    140         qs = self.request.get('QUERY_STRING', '')
    141         if not qs:
    142             qs = 'tab1'
    143         setattr(self, qs, 'active')
    144         warning.need()
    145         datatable.need()
    146         return super(HostelsContainerManagePage, self).update()
    147135
    148136    # It's quite dangerous to remove entire hostels with its content (beds).
     
    167155        return
    168156
    169     @jsaction(_('Clear all hostels'))
     157    @jsaction(_('Clear all hostels'), style='danger')
    170158    def clearHostels(self, **data):
    171159        self.context.clearAllHostels()
    172160        self.flash(_('All hostels cleared.'))
    173161        write_log_message(self, 'all hostels cleared')
    174         self.redirect(self.url(self.context, '@@manage')+'?tab2')
     162        self.redirect(self.url(self.context, '@@manage')+'#tab2')
    175163        return
    176164
     
    201189            self.context.addHostel(hostel)
    202190        except KeyError:
    203             self.flash(_('The hostel already exists.'))
     191            self.flash(_('The hostel already exists.'), type='warning')
    204192            return
    205193        self.flash(_('Hostel created.'))
     
    251239        return self.url(grok.getSite(),'students')
    252240
    253     def update(self):
    254         datepicker.need() # Enable jQuery datepicker in date fields.
    255         tabs.need()
    256         datatable.need()
    257         warning.need()
    258         self.tab1 = self.tab2 = ''
    259         qs = self.request.get('QUERY_STRING', '')
    260         if not qs:
    261             qs = 'tab1'
    262         setattr(self, qs, 'active')
    263         super(HostelManageFormPage, self).update()
    264         return
    265 
    266     @action(_('Save'))
     241    @action(_('Save'), style='primary')
    267242    def save(self, **data):
    268243        msave(self, **data)
    269244        return
    270245
    271     @action(_('Update all beds'))
     246    @action(_('Update all beds'), style='primary')
    272247    def updateBeds(self, **data):
    273248        removed, added, modified, modified_beds = self.context.updateBeds()
     
    280255        self.flash(flash_message)
    281256        write_log_message(self, message)
    282         self.redirect(self.url(self.context, '@@manage')+'?tab2')
     257        self.redirect(self.url(self.context, '@@manage')+'#tab2')
    283258        return
    284259
     
    289264            child_id = form['val_id']
    290265        else:
    291             self.flash(_('No item selected.'))
    292             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     266            self.flash(_('No item selected.'), type='warning')
     267            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    293268            return
    294269        if not isinstance(child_id, list):
     
    310285                mapping = {'a':m_translated}))
    311286            write_log_message(self, 'switched: %s' % message)
    312             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     287            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    313288        return
    314289
     
    319294            child_id = form['val_id']
    320295        else:
    321             self.flash(_('No item selected.'))
    322             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     296            self.flash(_('No item selected.'), type='warning')
     297            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    323298            return
    324299        if not isinstance(child_id, list):
     
    334309                mapping = {'a':message}))
    335310            write_log_message(self, 'released: %s' % message)
    336             self.redirect(self.url(self.context, '@@manage')+'?tab2')
     311            self.redirect(self.url(self.context, '@@manage')+'#tab2')
    337312        else:
    338             self.flash(_('No allocated bed selected.'))
    339             self.redirect(self.url(self.context, '@@manage')+'?tab2')
    340         return
    341 
    342     @jsaction(_('Clear hostel'))
     313            self.flash(_('No allocated bed selected.'), type='warning')
     314            self.redirect(self.url(self.context, '@@manage')+'#tab2')
     315        return
     316
     317    @jsaction(_('Clear hostel'), style='danger')
    343318    def clearHostel(self, **data):
    344319        self.context.clearHostel()
    345320        self.flash(_('Hostel cleared.'))
    346321        write_log_message(self, 'cleared')
    347         self.redirect(self.url(self.context, '@@manage')+'?tab2')
     322        self.redirect(self.url(self.context, '@@manage')+'#tab2')
    348323        return
    349324
     
    362337    def save(self, **data):
    363338        if data['owner'] == NOT_OCCUPIED:
    364             self.flash(_('No valid student id.'))
     339            self.flash(_('No valid student id.'), type='warning')
    365340            self.redirect(self.url(self.context))
    366341            return
    367342        msave(self, **data)
    368         self.redirect(self.url(self.context.__parent__, '@@manage')+'?tab2')
     343        self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2')
    369344        return
    370345
     
    374349            # Beds must be released first before they can be allocated to
    375350            # other students.
    376             self.redirect(self.url(self.context.__parent__, '@@manage')+'?tab2')
    377         return
     351            self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2')
     352        return
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt

    r8685 r11254  
    44
    55
    6   <ul class="tabs" data-tabs="tabs">
    7     <li tal:attributes="class view/tab1">
    8     <a href="#tab-1">
    9       <span i18n:translate="">Settings
    10       </span></a>
     6  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     7    <li class="active">
     8      <a href="#tab1" data-toggle="tab" i18n:translate="">
     9        Settings
     10      </a>
    1111    </li>
    12     <li tal:attributes="class view/tab2">
    13     <a href="#tab-2" i18n:translate="">Hostels</a>
     12    <li>
     13      <a href="#tab2" data-toggle="tab" i18n:translate="">
     14        Hostels
     15      </a>
    1416    </li>
    1517  </ul>
    1618
    1719  <div class="tab-content">
    18     <div id="tab-1" tal:attributes="class view/tab1">
     20    <div id="tab1" class="active tab-pane">
     21      <br />
    1922      <table class="form-table">
    2023        <tbody>
     
    2932      </div>
    3033    </div>
    31     <div id="tab-2" tal:attributes="class view/tab2"> <br />
    32       <table class="display dataTableManage">
     34    <div id="tab2" class="tab-pane">
     35      <br />
     36      <table class="kofa-data-table dataTableManage">
    3337        <thead>
    3438          <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt

    r10674 r11254  
    1616</table>
    1717
    18 <table i18n:domain="waeup.kofa">
     18<table i18n:domain="waeup.kofa" class="table">
    1919  <thead>
    2020    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt

    r9534 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="">Hostel Data</span></a>
     4  <ul class="tabs nav nav-tabs" data-tabs="tabs">
     5    <li class="active">
     6      <a href="#tab1" data-toggle="tab">
     7        <span i18n:translate="">Hostel Data</span>
     8      </a>
    79    </li>
    8     <li tal:attributes="class view/tab2"><a href="#tab-2">
    9       <span i18n:translate="">Beds</span></a>
     10    <li>
     11      <a href="#tab2" data-toggle="tab">
     12        <span i18n:translate="">Beds</span>
     13      </a>
    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>
     
    3742    </div>
    3843
    39     <div id="tab-2" tal:attributes="class view/tab2">
    40       <h3>Beds</h3>
    41       <table class="display dataTableManage">
    42       <thead>
    43         <tr>
    44           <th>&nbsp;</th>
    45           <th i18n:translate="">Id</th>
    46           <th i18n:translate="">Type</th>
    47           <th i18n:translate="">Number</th>
    48           <th i18n:translate="">Owner</th>
    49         </tr>
    50       </thead>
    51       <tbody>
    52         <tr tal:repeat="value context/values">
    53            <td>
    54             <input type="checkbox" name="val_id"
    55                   tal:attributes="value value/__name__" />
    56           </td>
    57           <td tal:content="value/bed_id">ID</td>
    58           <td tal:content="value/bed_type">TYPE</td>
    59           <td tal:content="value/bed_number">NUMBER</td>
    60           <td>
    61             <a tal:condition="python: value.owner != view.not_occupied"
    62                tal:attributes="href python: '%s/%s/accommodation' %
    63                     (view.students_url,value.owner)">
    64               <span tal:content="value/owner">OWNER</span>
    65             </a>
    66             <a tal:condition="python: value.owner == view.not_occupied"
    67                tal:attributes="href python: view.url(value)"
    68                i18n:translate="">
    69             [allocate student]
    70             </a>
    71           </td>
    72         </tr>
    73       </tbody>
     44    <div id="tab2" class="tab-pane">
     45      <br />
     46      <table class="kofa-data-table dataTableManage">
     47        <thead>
     48          <tr>
     49            <th>&nbsp;</th>
     50            <th i18n:translate="">Id</th>
     51            <th i18n:translate="">Type</th>
     52            <th i18n:translate="">Number</th>
     53            <th i18n:translate="">Owner</th>
     54          </tr>
     55        </thead>
     56        <tbody>
     57          <tr tal:repeat="value context/values">
     58             <td>
     59              <input type="checkbox" name="val_id"
     60                          tal:attributes="value value/__name__" />
     61            </td>
     62            <td tal:content="value/bed_id">ID</td>
     63            <td tal:content="value/bed_type">TYPE</td>
     64            <td tal:content="value/bed_number">NUMBER</td>
     65            <td>
     66              <a tal:condition="python: value.owner != view.not_occupied"
     67                 tal:attributes="href python: '%s/%s/accommodation' %
     68                      (view.students_url,value.owner)">
     69                <span tal:content="value/owner">OWNER</span>
     70              </a>
     71              <a tal:condition="python: value.owner == view.not_occupied"
     72                 tal:attributes="href python: view.url(value)"
     73                 i18n:translate="">
     74              [allocate student]
     75              </a>
     76            </td>
     77          </tr>
     78        </tbody>
    7479      </table>
    7580
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py

    r10683 r11254  
    368368        self.browser.open(self.container_path + '/hall-1/hall-1_A_101_A')
    369369        self.assertEqual(self.browser.url,
    370             self.container_path + '/hall-1/@@manage?tab2')
     370            self.container_path + '/hall-1/@@manage#tab2')
    371371        # Updating the beds again will not affect the allocation and also
    372372        # the bed numbering remains the same
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r10680 r11254  
    585585        )
    586586
    587     skin = schema.Choice(
    588         title = _(u'Skin'),
    589         default = u'gray waeup theme',
    590         vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary',
    591         required = True,
    592         )
    593 
    594587    frontpage = schema.Text(
    595588        title = _(u'Content in HTML format'),
  • 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):
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/phonewidget.py

    r8937 r11254  
    3737
    3838    subwidget_names = ('country', 'area', 'ext')
    39     bootstrap_span = 'span2'
     39    cssClass = 'phone-input'
    4040
    4141    def _renderPrefixWidget(self, value):
     
    5151                '<option value="%s"%s>%s</option>' % (pval, selected, ptitle))
    5252        options = '\n'.join(options)
    53         return '<select id="%s" name="%s" size="1" class="span4">\n%s\n</select>' % (
     53        return '<select id="%s" name="%s" size="1" class="%s">\n%s\n</select>' % (
    5454            '%s.%s' % (self.name, 'country'),
    5555            '%s.%s' % (self.name, 'country'),
     56            self.cssClass,
    5657            options)
    5758
     
    8384            kwargs.update(name = '%s.%s' % (self.name, subname))
    8485            kwargs.update(id=kwargs['name'])
    85             # kwargs.update(cssClass = '%s %s' % (self.cssClass, 'span1'))
    86             kwargs.update(cssClass = '%s %s' % ('', self.bootstrap_span))
     86            kwargs.update(cssClass = '%s %s' % ('', self.cssClass))
    8787            kwargs.update(value = subvalues[num])
    8888            fields.append(renderElement(self.tag, **kwargs))
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/sequencewidget.pt

    r7811 r11254  
    1 <table border="0" class="sequencewidget"
    2   i18n:domain="waeup.kofa">
     1<table i18n:domain="waeup.kofa">
    32  <tr tal:repeat="widget view/widgets">
    43    <td>
     
    1918      Don't forget to save the form after adding or deleting items.
    2019      </p>
    21       <input type="submit" value="Remove selected items"
    22              class="btn"
     20      <button type="submit"
     21             class="btn btn-default"
     22             tal:condition="view/need_add"
     23             tal:attributes="name string:${view/name}.add"
     24             tal:content="view/addButtonLabel" />
     25      <button type="submit" class="btn btn-default"
    2326             tal:condition="view/need_delete"
    2427             tal:attributes="name string:${view/name}.remove"
    25              i18n:attributes="value remove-selected-items" />
    26       <input type="submit" value="Add foo"
    27              class="btn"
    28              tal:condition="view/need_add"
    29              tal:attributes="name string:${view/name}.add;
    30                              value view/addButtonLabel" />
     28             i18n:translate="remove-selected-items">Remove selected items</button>
    3129    </td>
    3230  </tr>
Note: See TracChangeset for help on using the changeset viewer.