Changeset 11009 for main/waeup.kofa/branches
- Timestamp:
- 30 Jan 2014, 11:09:15 (11 years ago)
- Location:
- main/waeup.kofa/branches/uli-diazo-themed
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-diazo-themed/layout/static/css/base.css
r11005 r11009 152 152 } 153 153 154 .ordered-selection-field select , .inline-selection-field select { 154 .ordered-selection-field select , .inline-selection-field select, 155 td select { 155 156 width: 100%; 156 157 } -
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/accesscodes/browser.py
r9637 r11009 22 22 from zope.component import getUtility 23 23 from hurry.workflow.interfaces import InvalidTransitionError 24 from waeup.kofa.browser.resources import datatable25 24 from waeup.kofa.browser.layout import KofaPage, KofaAddFormPage, NullValidator 26 25 from waeup.kofa.browser.breadcrumbs import Breadcrumb … … 52 51 return 53 52 if not batches: 54 self.flash(_('No batch selected.') )53 self.flash(_('No batch selected.'), type='warning') 55 54 return 56 55 if isinstance(batches, basestring): … … 102 101 @action(_('Cancel'), validator=NullValidator) 103 102 def cancel(self, *args, **kw): 104 self.flash(_('Batch creation cancelled.') )103 self.flash(_('Batch creation cancelled.'), type='warning') 105 104 self.redirect(self.url(self.context)) 106 105 … … 120 119 def update(self, filenames=None, reimport=None, cancel=None): 121 120 if cancel is not None: 122 self.flash(_('Reimport cancelled.') )121 self.flash(_('Reimport cancelled.'), type='warning') 123 122 self.redirect(self.url(self.context)) 124 123 return … … 126 125 return 127 126 if not filenames: 128 self.flash(_('No file chosen. Action cancelled.') )127 self.flash(_('No file chosen. Action cancelled.'), type='warning') 129 128 self.redirect(self.url(self.context)) 130 129 return … … 137 136 except KeyError: 138 137 self.flash(_('This batch already exists: ${a}', 139 mapping = {'a':filename}) )138 mapping = {'a':filename}), type='warning') 140 139 continue 141 140 self.flash(_('Successfully reimported: ${a}', … … 156 155 disable_button = _('Disable ACs') 157 156 enable_button = _('Enable ACs') 157 cancel_button = _('Cancel Search') 158 158 159 159 def update(self, *args, **kw): 160 datatable.need()161 160 form = self.request.form 161 if 'cancel' in form: 162 self.redirect(self.url(self.context)) 163 return 162 164 self.hitlist = [] 163 165 if 'searchterm' in form and form['searchterm']: … … 187 189 except InvalidTransitionError: 188 190 self.flash(_('${a}: Disable transition not allowed.', 189 mapping = {'a':entry}) )191 mapping = {'a':entry}), type='danger') 190 192 elif 'enable' in form: 191 193 try: … … 196 198 self.context.logger_info(ob_class, message) 197 199 except InvalidTransitionError: 198 self.flash(_('${a}: Re-enable transition not allowed.', mapping = {'a':entry})) 200 self.flash(_('${a}: Re-enable transition not allowed.', 201 mapping = {'a':entry}), type='danger') 199 202 self.hitlist = search(query=self.searchterm, 200 203 searchtype=self.searchtype, view=self) -
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/accesscodes/browser.txt
r10207 r11009 273 273 >>> ctrl.getControl(value='code').selected = True 274 274 >>> browser.getControl(name='searchterm').value = app_1_codes.keys()[0] 275 >>> browser.getControl( 'Search').click()275 >>> browser.getControl(name='search').click() 276 276 277 277 The first access code in the ``APP-1`` batch is displayed: … … 295 295 >>> ctrl.getControl(value='batch_serial').selected = True 296 296 >>> browser.getControl(name='searchterm').value = '1' 297 >>> browser.getControl( 'Search').click()297 >>> browser.getControl(name='search').click() 298 298 >>> print browser.contents 299 299 <!DOCTYPE html ... … … 311 311 >>> ctrl.getControl(value='batch_serial').selected = True 312 312 >>> browser.getControl(name='searchterm').value = 'xyz' 313 >>> browser.getControl( 'Search').click()313 >>> browser.getControl(name='search').click() 314 314 >>> print browser.contents 315 315 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" … … 324 324 >>> ctrl.getControl(value='history').selected = True 325 325 >>> browser.getControl(name='searchterm').value = 'initialized' 326 >>> browser.getControl( 'Search').click()326 >>> browser.getControl(name='search').click() 327 327 >>> print browser.contents 328 328 <!DOCTYPE html ... … … 345 345 >>> ctrl.getControl(value='history').selected = True 346 346 >>> browser.getControl(name='searchterm').value = 'initialized' 347 >>> browser.getControl( 'Search').click()347 >>> browser.getControl(name='search').click() 348 348 349 349 This lists all access codes. We now tick one to disable it and click -
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/accesscodes/browser_templates/batchcontainer.pt
r9267 r11009 3 3 The following batches are available: 4 4 </p> 5 <table> 6 <thead> 7 <tr> 8 <th> </th> 9 <th i18n:translate="">Prefix</th> 10 <th i18n:translate="">Entries</th> 11 <th i18n:translate="">Used</th> 12 <th i18n:translate="">Disabled</th> 13 <th i18n:translate="">Cost</th> 14 <th i18n:translate="">Date of Creation</th> 15 <th i18n:translate="">Creator</th> 16 </tr> 17 </thead> 18 <tbody> 19 <tr tal:repeat="batch context/values"> 20 <td> 21 <input type="checkbox" name="batches" value="batch/prefix" 22 tal:attributes="value batch/__name__" 23 tal:condition="batch/num" /> 24 </td> 25 <td> 26 <span tal:replace="batch/prefix">APP</span> 27 - 28 <span tal:replace="batch/num">10</span> 29 </td> 30 <td> 31 <span tal:replace="batch/entry_num">1012</span> 32 </td> 33 <td> 34 <span tal:replace="batch/used_num">512</span> 35 </td> 36 <td> 37 <span tal:replace="batch/disabled_num">112</span> 38 </td> 39 <td tal:content="batch/cost">12.12</td> 40 <td tal:content="python: batch.creation_date.strftime('%Y-%m-%d %H:%M:%S')"> 41 2011-11-22 18:04:55 42 </td> 43 <td tal:content="batch/creator">SOMEUSER</td> 44 </tr> 45 <tr tal:condition="not: context/values"> 46 <td colspan="5"><b i18n:translate="">No batches yet</b></td> 47 </tr> 48 </tbody> 49 </table> 50 <input type="submit" class="btn" name="archive" 5 <div class="table-responsive"> 6 <table class="table"> 7 <thead> 8 <tr> 9 <th> </th> 10 <th i18n:translate="">Prefix</th> 11 <th i18n:translate="">Entries</th> 12 <th i18n:translate="">Used</th> 13 <th i18n:translate="">Disabled</th> 14 <th i18n:translate="">Cost</th> 15 <th i18n:translate="">Date of Creation</th> 16 <th i18n:translate="">Creator</th> 17 </tr> 18 </thead> 19 <tbody> 20 <tr tal:repeat="batch context/values"> 21 <td> 22 <input type="checkbox" name="batches" value="batch/prefix" 23 tal:attributes="value batch/__name__" 24 tal:condition="batch/num" /> 25 </td> 26 <td> 27 <span tal:replace="batch/prefix">APP</span> 28 - 29 <span tal:replace="batch/num">10</span> 30 </td> 31 <td> 32 <span tal:replace="batch/entry_num">1012</span> 33 </td> 34 <td> 35 <span tal:replace="batch/used_num">512</span> 36 </td> 37 <td> 38 <span tal:replace="batch/disabled_num">112</span> 39 </td> 40 <td tal:content="batch/cost">12.12</td> 41 <td tal:content="python: batch.creation_date.strftime('%Y-%m-%d %H:%M:%S')"> 42 2011-11-22 18:04:55 43 </td> 44 <td tal:content="batch/creator">SOMEUSER</td> 45 </tr> 46 <tr tal:condition="not: context/values"> 47 <td colspan="5"><b i18n:translate="">No batches yet</b></td> 48 </tr> 49 </tbody> 50 </table> 51 </div> 52 <input type="submit" class="btn btn-default" name="archive" 51 53 tal:attributes="value view/archive_button" /> 52 <input type="submit" class="btn " name="delete"54 <input type="submit" class="btn btn-default" name="delete" 53 55 tal:attributes="value view/delete_button" /> 54 56 </form> -
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/accesscodes/browser_templates/reimportbatchpage.pt
r7811 r11009 4 4 </p> 5 5 <form method="POST" i18n:domain="waeup.kofa"> 6 <table >6 <table class="table"> 7 7 <thead> 8 8 <tr> … … 25 25 </tbody> 26 26 </table> 27 <input type="submit" class="btn primary" name="reimport"27 <input type="submit" class="btn btn-primary" name="reimport" 28 28 tal:attributes="value view/reimport_button" /> 29 <input type="submit" class="btn " name="cancel"29 <input type="submit" class="btn btn-default" name="cancel" 30 30 tal:attributes="value view/cancel_button" /> 31 31 </form> -
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/accesscodes/browser_templates/searchpage.pt
r7811 r11009 1 <form method="POST" i18n:domain="waeup.kofa" >1 <form method="POST" i18n:domain="waeup.kofa" class="form-inline"> 2 2 <br /> 3 <input type="submit" class="btn primary" name="search" 4 tal:attributes="value view/search_button" /> 3 <div class="form-group"> 4 <input type="submit" class="btn btn-primary" name="search" 5 tal:attributes="value view/search_button" /> 5 6 <span i18n:translate="">for access codes</span> 6 <select name="searchtype"> 7 <option i18n:translate="" value="code">with PIN</option> 8 <option i18n:translate="" value="batch_serial">with serial</option> 9 <option i18n:translate="" value="history">with message term</option> 10 </select> 11 <input type="text" name="searchterm" /> 7 </div> 8 <div class="form-group"> 9 <select name="searchtype"> 10 <option i18n:translate="" value="code">with PIN</option> 11 <option i18n:translate="" value="batch_serial">with serial</option> 12 <option i18n:translate="" value="history">with message term</option> 13 </select> 14 </div> 15 <div class="form-group"> 16 <input type="text" class="form-control" name="searchterm" /> 17 </div> 12 18 <p> </p> 13 19 <div tal:condition="view/hitlist"> … … 17 23 <input type="hidden" name="old_searchtype" 18 24 tal:attributes="value view/searchtype" /> 19 <table class="d isplay dataTableManage">25 <table class="dataTableManage"> 20 26 <thead> 21 27 <tr> … … 43 49 </table> 44 50 <div> 45 <input type="submit" class="btn " name="disable"51 <input type="submit" class="btn btn-default" name="disable" 46 52 tal:attributes="value view/disable_button" /> 47 <input type="submit" class="btn " name="enable"53 <input type="submit" class="btn btn-default" name="enable" 48 54 tal:attributes="value view/enable_button" /> 55 <input type="submit" class="btn btn-default" name="cancel" 56 tal:attributes="value view/cancel_button" /> 49 57 </div> 50 58 </div> 59 <div tal:condition="not: view/hitlist"> 60 <input type="submit" class="btn btn-default" name="cancel" 61 tal:attributes="value view/cancel_button" /> 51 62 </div> 52 63 </form>
Note: See TracChangeset for help on using the changeset viewer.