Ignore:
Timestamp:
29 Sep 2011, 06:40:38 (13 years ago)
Author:
Henrik Bettermann
Message:

Reduce style declarations in page templates.

datacenterimport3page.pt: Do not render warning messages on top of table. We can use the flash slot instead. Only the 'Header fields OK' notification is still displayed on top of table.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport1page.pt

    r6826 r6829  
    1818        <td>
    1919          <button type="submit" name="select"
    20             tal:attributes="value file/name"
    21             >Select</button>
     20            tal:attributes="value file/name">Select</button>
    2221        </td>
    2322        <td tal:content="file/name">Filename.csv</td>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport2page.pt

    r6826 r6829  
    1 <h2>Process CSV file</h2><h3>Step 2</h3>
     1<h2>Process CSV file</h2>
     2<h3>Step 2</h3>
    23<form method="POST">
    3   <p> <b>File:</b>
     4  <p>
     5    <b>File:</b>
    46    <span tal:content="view/filename">Filename.csv
    57    </span>
    68    <input type="hidden" name="filename"  tal:attributes="value view/filename" />
    79  </p>
    8   <p> Please select a file-processor and a processing-mode from the  selections below:
     10  <p> Please select a file-processor and a processing-mode from the selections below:
    911  </p>
    1012  <div>
    11     <table style="border: 1px solid #000;"
    12             tal:define="body view/getPreviewBody;
     13    <table class = "zebra"
     14           tal:define="body view/getPreviewBody;
    1315                        headers view/getPreviewHeader;
    1416                        fieldnum python: len(headers)">
    1517      <thead>
    16         <tr style="border: 1px solid #ccc;">
     18        <tr>
    1719          <th style="border: 1px solid #888;"
    1820              tal:repeat="headerfield headers"
     
    2224      </thead>
    2325      <tbody>
    24         <tr tal:repeat="row body"
    25             tal:attributes="class python: repeat['row'].odd() and 'odd' or 'even'"
    26             style="border: 1px solid #000;">
     26        <tr tal:repeat="row body">
    2727          <td tal:repeat="value row"
    28               tal:content="value"  style="border: 1px solid #000;"> value  </td>
     28              tal:content="value"
     29              style="border: 1px solid #000;"> value
     30          </td>
    2931        </tr>
    3032      </tbody>
     
    6062  <input type="submit" name="cancel" value="Cancel" />
    6163  <input type="submit" name="back1" value="Back to step 1" />
    62   <input type="submit" name="proceed" value="Proceed to step 3..." />
     64  <input tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''"
     65    type="submit" name="proceed" value="Proceed to step 3..." />
    6366</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport3page.pt

    r6826 r6829  
    11<h2>Process CSV file</h2>
    22<h3>Step 3</h3>
    3 <div tal:define="warnings view/getWarnings">
    43<form>
    5 
    64  <p>
    75    Eventually modify headerfields of import file below.
    86  </p>
    9 
    107  <p>
    11     <b>File:</b> <span tal:content="view/filename">Filename.csv</span>
     8    <b>File:</b>
     9    <span tal:content="view/filename">Filename.csv</span>
    1210    <input type="hidden" name="filename"
    1311     tal:attributes="value view/filename" />
     
    2523     tal:attributes="value view/mode" />
    2624  </p>
    27 
     25  <div class="alert notice ui-state-info" tal:condition="not: view/getWarnings">
     26    <span class="ui-icon ui-icon-info">A</span>
     27    Header fields OK
     28  </div>
    2829  <div>
    29     <div class="alert error ui-state-error" tal:condition="warnings">
    30       <span class="ui-icon ui-icon-alert">A</span>
    31       Current settings will give the follwing warnings, when importing:
    32       <div tal:repeat="warning warnings" tal:content="warning">
    33           Warning messages
    34       </div>
    35     </div>
    36 
    37     <div class="alert notice ui-state-info" tal:condition="not: warnings">
    38       <span class="ui-icon ui-icon-info">A</span>
    39       Header fields OK
    40     </div>
    41   </div>
    42 
    43 
    44   <div>
    45     <table style="border: 1px solid #000;"
     30    <table class = "zebra"
    4631     tal:define="body view/getPreviewBody;
    4732           headers view/headerfields;
    4833           fieldnum python: len(headers)">
    4934      <thead>
    50         <tr style="border: 1px solid #ccc;">
     35        <tr>
    5136          <th style="border: 1px solid #888;"
    5237              tal:repeat="headerfield headers"
     
    5540          </th>
    5641        </tr>
    57         <tr style="border: 1px solid #ccc;">
     42        <tr>
    5843          <th style="border: 1px solid #888; text-align=center;"
    5944              tal:repeat="headerfield headers">
     
    6146          </th>
    6247        </tr>
    63         <tr style="border: 1px solid #ccc;">
     48        <tr>
    6449          <th style="border: 1px solid #888;"
    6550              tal:repeat="headerfield headers">
     
    7459          </th>
    7560        </tr>
    76             </thead>
    77             <tbody>
    78         <tr tal:repeat="row body"
    79             tal:attributes="class python: repeat['row'].odd() and 'odd' or 'even'"
    80             style="border: 1px solid #000;">
     61      </thead>
     62      <tbody>
     63        <tr tal:repeat="row body">
    8164          <td tal:repeat="value row"
    8265              tal:content="value"
     
    8972  </div>
    9073
    91 
    9274  <input type="submit" name="cancel" value="Cancel" />
    9375  <input type="reset" name="reset" value="Reset" />
     
    9577  <br />
    9678  <input type="submit" name="back2" value="Back to step 2" />
    97   <input tal:attributes="disabled python: len(warnings) and 'disabled' or ''"
     79  <input tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''"
    9880   type="submit" name="proceed" value="Perform import..." />
    99 
    10081</form>
    101 </div>
Note: See TracChangeset for help on using the changeset viewer.