Ignore:
Timestamp:
22 Feb 2014, 15:46:03 (13 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:
7 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>
Note: See TracChangeset for help on using the changeset viewer.