Changeset 9819


Ignore:
Timestamp:
21 Dec 2012, 18:10:46 (12 years ago)
Author:
Henrik Bettermann
Message:

Add buttons.

Adjust export job configuration page.

Localize labels and more.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r9818 r9819  
    441441    grok.view(DepartmentPage)
    442442    text = _('Manage department')
     443    grok.order(1)
    443444
    444445class ShowDepartmentStudentsActionButton(ManageActionButton):
     
    451452    text = _('Show students')
    452453    target = 'students'
     454    grok.order(2)
     455
     456class ExportDepartmentStudentsActionButton(ManageActionButton):
     457    """ 'Export student data' button for departments.
     458    """
     459    grok.context(IDepartment)
     460    grok.view(DepartmentPage)
     461    grok.require('waeup.showStudents')
     462    icon = 'actionicon_down.png'
     463    text = _('Export student data')
     464    target = 'exports'
     465    grok.order(3)
    453466
    454467class ManageCourseActionButton(ManageActionButton):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r9817 r9819  
    25352535    grok.template('filterstudentspage')
    25362536    pnav = 1
    2537     session_label = _('in session')
    2538     level_label = _('at level')
     2537    session_label = _('Current Session')
     2538    level_label = _('Current Level')
    25392539
    25402540    def label(self):
    2541         return 'Students in %s ...' % self.context.longtitle()
     2541        return 'Students in %s' % self.context.longtitle()
    25422542
    25432543    def _set_session_values(self):
     
    26052605
    26062606    def label(self):
    2607         return 'Students studying %s ...' % self.context.longtitle()
     2607        return 'Students studying %s' % self.context.longtitle()
    26082608
    26092609    def _searchCatalog(self, session, level):
     
    26302630
    26312631    def label(self):
    2632         return 'Students registered for %s ...' % self.context.longtitle()
     2632        return 'Students registered for %s' % self.context.longtitle()
    26332633
    26342634    def _searchCatalog(self, session, level):
     
    27022702            entry = self.context.entry_from_job_id(job_id)
    27032703            self.context.delete_export_entry(entry)
    2704             self.flash('Discarded export %s' % job_id)
     2704            self.flash(_('Discarded export') + ' %s' % job_id)
    27052705        self.doll_up()
    27062706        return
     
    27132713    grok.name('jobconfig')
    27142714    grok.template('exportjobsjobconfig')
    2715     label = _('Create new export job')
     2715    label = _('Configure local student data export')
    27162716    pnav = 1
    27172717
     
    27202720        self.sessions = sorted(
    27212721            [(x.title, x.token) for x in vocab_terms], reverse=True)
    2722         self.sessions += [('All Sessions', 'all')]
     2722        self.sessions += [(_('All Sessions'), 'all')]
    27232723        return
    27242724
     
    27272727        self.levels = sorted(
    27282728            [(x.title, x.token) for x in vocab_terms])
    2729         self.levels += [('All Levels', 'all')]
     2729        self.levels += [(_('All Levels'), 'all')]
    27302730        return
    27312731
     
    27342734        self.modes = [(value, key) for key, value in
    27352735                      utils.STUDY_MODES_DICT.items()]
    2736         self.modes +=[('All Modes', 'all')]
     2736        self.modes +=[(_('All Modes'), 'all')]
    27372737        return
    27382738
     
    27652765                                      current_mode=mode,
    27662766                                      depcode=code)
    2767         self.flash('Export started for students from %s '
    2768                    '(session=%s, level=%s, mode=%s)' % (
     2767        self.flash(_('Export started for students from') +
     2768                   ' %s (current_session=%s, current_level=%s, study_mode=%s)' % (
    27692769                       code, session, level, mode))
    27702770        self.redirect(self.url(self.context))
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportjobsindex.pt

    r9815 r9819  
    5353  </div>
    5454  <input class="btn primary" type="submit" name="CREATE"
    55          value="Create new export"
     55         value="Configure new export"
    5656          />
    5757</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportjobsjobconfig.pt

    r9804 r9819  
    1 Export students with...
    2 
    3 <form method="POST">
    4   <label for="session" class="span2">
    5     Session
     1<form i18n:domain="waeup.kofa" method="POST">
     2  <label for="mode" i18n:translate="">
     3    Exporter (Data Type):
    64  </label>
    7   &nbsp;
    8   <select name="session">
    9     <option tal:repeat="item view/sessions"
    10             tal:attributes="value python:item[1]">
    11       <span tal:replace="python: item[0]">2012</span>
    12     </option>
    13   </select>
     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>
    1413  <br />
    15   <label for="level" class="span2">
    16     Course Level
     14  <label for="session" i18n:translate="">
     15    Current Session:
    1716  </label>
    18   &nbsp;
    19   <select name="level">
    20     <option tal:repeat="item view/levels"
    21             tal:attributes="value python:item[1]">
    22       <span tal:replace="python: item[0]">200</span>
    23     </option>
    24   </select>
     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>
    2525  <br />
    26   <label for="mode" class="span2">
    27     Study Mode
     26  <label for="level" i18n:translate="">
     27    Current Level:
    2828  </label>
    29   &nbsp;
    30   <select name="mode">
    31     <option tal:repeat="item view/modes"
    32             tal:attributes="value python:item[1]">
    33       <span tal:replace="python: item[0]">ug_ft</span>
    34     </option>
    35   </select>
     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>
    3637  <br />
    37   <label for="mode" class="span2">
    38     Exporter
     38  <label for="mode" i18n:translate="">
     39    Current Study Mode:
    3940  </label>
    40   &nbsp;
    41   <select name="exporter">
    42     <option tal:repeat="item view/exporters"
    43             tal:attributes="value python:item[1]">
    44       <span tal:replace="python: item[0]">Students</span>
    45     </option>
    46   </select>
    47   <br />
    48   <hr />
    49   <input type="submit" name="START" value="Create"
    50          class="btn primary" />
     41  <div class="input">
     42    <select name="mode">
     43      <option tal:repeat="item view/modes"
     44              tal:attributes="value python:item[1]">
     45        <span tal:replace="python: item[0]">ug_ft</span>
     46      </option>
     47    </select>
     48  </div>
     49  <br /><br />
     50  <div class="input">
     51  <input type="submit" name="START"  i18n:translate=""
     52    value="Create export now"
     53    class="btn primary" />
     54  </div>
    5155</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/filterstudentspage.pt

    r9806 r9819  
    1717    </select>
    1818  </div>
    19   <br /><br />
     19  <br />
    2020  <label for="levels">
    2121    <span tal:replace="view/level_label">LEVEL</span>:
Note: See TracChangeset for help on using the changeset viewer.