Ignore:
Timestamp:
21 Jul 2012, 09:31:09 (12 years ago)
Author:
Henrik Bettermann
Message:

Use different columns for different field types.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenteruploadpage.pt

    r9033 r9034  
    1818    <tr>
    1919      <th i18n:translate="">Processor</th>
    20       <th i18n:translate="">Available Fields</th>
     20      <th i18n:translate="">Required Schema Fields</th>
     21      <th i18n:translate="">Optional Schema Fields</th>
     22      <th i18n:translate="">Non-Schema Fields</th>
    2123      <th i18n:translate="">CSV Skeleton File</th>
    2224    </tr>
     
    2426  <tr tal:repeat="importer view/getImporters">
    2527    <td tal:content="importer/title"></td>
    26     <td>
    27         <span tal:repeat="field importer/fields">
    28             <tal:schemafield condition="field/f_type">
    29               <tal:notrequired condition="not:field/f_required">
    30                 <span tal:replace="field/f_name"></span>
    31                 (<span tal:replace="field/f_type"></span>)
    32               </tal:notrequired>
    33               <tal:required condition="field/f_required">
    34                 <strong>
    35                   <span tal:replace="field/f_name"></span>
    36                   (<span tal:replace="field/f_type"></span>)
    37                 </strong>
    38               </tal:required>
    39             </tal:schemafield>
    40             <tal:extrafield condition="not:field/f_type">
    41               <i tal:content="field/f_name"></i>
    42             </tal:extrafield>,
    43         </span>
     28    <td nowrap>
     29      <span tal:repeat="field importer/fields">
     30          <tal:schemafield condition="field/f_type">
     31            <tal:required condition="field/f_required">
     32              <span tal:replace="field/f_name"></span>
     33              (<span tal:replace="field/f_type"></span>)
     34              <br />
     35            </tal:required>
     36          </tal:schemafield>
     37      </span>
     38    </td>
     39    <td nowrap>
     40      <span tal:repeat="field importer/fields">
     41          <tal:schemafield condition="field/f_type">
     42            <tal:notrequired condition="not:field/f_required">
     43              <span tal:replace="field/f_name"></span>
     44              (<span tal:replace="field/f_type"></span>)
     45              <br />
     46            </tal:notrequired>
     47          </tal:schemafield>
     48      </span>
    4449    </td>
    4550    <td>
    46       <a tal:attributes="href python: 'skeleton?name=' + importer['name']"
    47          tal:content="python: importer['name'].replace('processor', 'import') + '_000.csv'">
    48          FILENAME</a>
     51      <span tal:repeat="field importer/fields">
     52          <tal:extrafield condition="not:field/f_type">
     53            <span tal:replace="field/f_name"></span>
     54            <br />
     55          </tal:extrafield>
     56      </span>
     57    </td>
     58
     59    <td>
     60      <a i18n:translate=""
     61         tal:attributes="href python: 'skeleton?name=' + importer['name']">Download</a>
    4962    </td>
    5063  </tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py

    r9032 r9034  
    177177        self.browser.getLink("Upload data").click()
    178178        self.assertTrue(
    179             '<a href="skeleton?name=facultyprocessor">facultyimport_000.csv</a>'
     179            '<a href="skeleton?name=facultyprocessor">Download</a>'
    180180            in self.browser.contents)
    181         self.browser.getLink('facultyimport_000.csv').click()
     181        self.browser.getLink(url='skeleton?name=facultyprocessor').click()
    182182        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    183183        self.assertEqual(self.browser.headers['Content-Type'],
Note: See TracChangeset for help on using the changeset viewer.