Ignore:
Timestamp:
24 Jun 2012, 08:17:57 (12 years ago)
Author:
Henrik Bettermann
Message:

Fix datecenter import step 3. Store header number in first column of preview table instead of original header name. Fix pagetemplate.

We have to improve the browser tests. Setting headerfields is not yet properly tested in datacenter.txt.

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

Legend:

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

    r8777 r8783  
    10911091        if not self.reader:
    10921092            return
    1093         header = self.getPreviewHeader()
     1093        headers = self.getPreviewHeader()
    10941094        num = 0
    10951095        data = []
     
    11001100            data.append(line)
    11011101        result = []
    1102         for name in header:
     1102        field_num = 0
     1103        for name in headers:
    11031104            result_line = []
    1104             result_line.append(name)
     1105            result_line.append(field_num)
     1106            field_num += 1
    11051107            for d in data:
    11061108                result_line.append(d[name])
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport3page.pt

    r8651 r8783  
    4242      <tbody>
    4343        <tr tal:repeat="row prev_table">
    44           <td tal:content="python:row[0]"> value
     44          <td tal:content="python:headers[row[0]]"> value
    4545          </td>
    4646          <td>
    47             <select class="span4" name="python:row[0]">
     47            <select class="span4" name="headerfield">
    4848              <option tal:repeat="opt view/getPossibleHeaders"
    4949                tal:attributes="value opt/value;
    50                   selected python: opt['value']==row[0] and 'selected' or '';"
     50                  selected python: opt['value']==headers[row[0]] and 'selected' or '';"
    5151                tal:content="opt/title">
    5252                new_header_name
Note: See TracChangeset for help on using the changeset viewer.