Changeset 3297


Ignore:
Timestamp:
9 Mar 2008, 16:24:31 (17 years ago)
Author:
Henrik Bettermann
Message:

uploads_index.py: avoid traceback
uploads_form.pt: show instruction
upload.xml: show import_date

Location:
WAeUP_SRP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt

    r3292 r3297  
    2424      </form>
    2525      <span tal:condition="info/wrong">
    26         <h2>Uploads which must be corrected:</h2>
     26        <h2>Non-importable Uploads</h2>
    2727        <form  action="" method="post" class="group"
    2828               tal:attributes="action info/action"
     
    3434              <th>Data Layout</th>
    3535              <th>By</th>
    36               <th>Date</th>
    37               <th>Message</th>
    38               <th>Unknown Fields</th>
     36              <th>Upload Date</th>
     37              <th>Error Message</th>
     38              <th>Invalid Keys</th>
    3939            </tr>           
    4040            <tr tal:repeat="row info/wrong"
     
    8080            </tr>
    8181          </table>
     82         
    8283          <br />
     84         
     85          <font color='red'>Please see error message for further information. If there are
     86          'invalid keys in heading', you can edit the uploaded file online. Select the correct keys
     87          (columns titles) from the select boxes provided, check the box in the first column and press Edit.
     88          If you have accidentally chosen the wrong import data layout, select the correct layout and press Edit.  </font>
     89                   
     90          <br /><br />
    8391          <input tal:condition="nothing" type="button" value="button_select_all" class="context"
    8492                 onclick="someJavaScriptFunctionThatWillBeReplaced"
     
    8795                 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    8896                 />
    89           <input type="submit" name="edit" value="edit"
     97          <input type="submit" name="edit" value="Edit"
    9098                 class="destructive" i18n:attributes="value"
    9199                 />
     
    98106      </span>
    99107      <span tal:condition="info/importable">
    100         <h2>Importable Uploads:</h2>
     108        <h2>Importable Uploads</h2>
    101109        <form action="" method="post" class="group"
    102110              tal:attributes="action info/action"
     
    108116              <th>Data Layout</th>
    109117              <th>By</th>
    110               <th>Date</th>
     118              <th>Upload Date</th>
    111119            </tr>           
    112120            <tr tal:repeat="row info/importable"
     
    135143                 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    136144                 />
    137           <input type="submit" name="import_uploads:method" value="import"
     145          <input type="submit" name="import_uploads:method" value="Import"
    138146                 class="destructive" i18n:attributes="value"
    139147                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
     
    148156      </span>
    149157      <span tal:condition="info/imported">
    150         <h2>Imported Uploads:</h2>
     158        <h2>Imported Uploads</h2>
    151159        <form action="" method="post" class="group"
    152160              tal:attributes="action info/action"
  • WAeUP_SRP/base/skins/waeup_upload/uploads_index.py

    r3293 r3297  
    7777        row['imported'] = True
    7878        row['msg'] = import_message
    79         row['imported_at'] = doc.imported_at.strftime("%d/%m/%y %H:%M:%S")
     79        if getattr(doc,'imported_at',''):
     80            row['imported_at'] = doc.imported_at.strftime("%d/%m/%y %H:%M:%S")
     81        else:
     82            row['imported_at'] = ''
    8083        add_to = imported
    8184    else:
  • WAeUP_SRP/uniben/profiles/default/layouts/upload.xml

    r3289 r3297  
    6666  <property name="readonly_layout_modes"/>
    6767  <property name="hidden_layout_modes">
    68    <element value="create"/>
    6968  </property>
    7069  <property name="hidden_readonly_layout_modes"/>
     
    8786  <property name="css_class_expr">string:row</property>
    8887 </widget>
     88 <widget name="import_message" meta_type="String Widget">
     89  <property name="title">Import Message</property>
     90  <property name="fields">
     91   <element value="import_message"/>
     92  </property>
     93  <property name="label">Import Message</property>
     94  <property name="label_edit">Import Message</property>
     95  <property name="readonly_layout_modes"/>
     96  <property name="hidden_layout_modes">
     97   <element value="create"/>
     98  </property>
     99  <property name="hidden_readonly_layout_modes"/>
     100  <property name="css_class_expr">string:row</property>
     101 </widget>
    89102 <table>
    90103  <row>
     
    103116   <cell name="import_date"/>
    104117  </row>
     118  <row>
     119   <cell name="import_message"/>
     120  </row> 
    105121 </table>
    106122</object>
Note: See TracChangeset for help on using the changeset viewer.