Changeset 3308 for WAeUP_SRP


Ignore:
Timestamp:
10 Mar 2008, 07:13:11 (17 years ago)
Author:
Henrik Bettermann
Message:

set correct import_date and imported_by

Location:
WAeUP_SRP
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r3300 r3308  
    14121412        current = importer.current
    14131413        import_date = importer.import_date
     1414        imported_by = importer.imported_by
    14141415        #
    14151416        # not_imported
     
    16361637                upload_doc = upload.getContent()
    16371638                mapping = {}
    1638                 mapping['imported_at'] = DateTime.DateTime()
     1639                #mapping['import_date'] = DateTime.DateTime()
     1640                mapping['import_date'] = import_date
     1641                mapping['imported_by'] = imported_by
    16391642                mapping['import_message'] = msg
    16401643                upload_doc.edit(mapping = mapping)
  • WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt

    r3307 r3308  
    163163          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
    164164            <tr>
    165               <th>Filename</th>
     165              <th>File in Archive</th>
    166166              <th>Data Layout</th>
    167               <th>By</th>
    168               <th>Date</th>
     167              <th>Uploaded By</th>
     168              <th>Upload Date</th>
     169              <th>Imported By</th>
    169170              <th>Import Date</th>
    170171              <th>Message</th>
     
    177178              <td tal:content="row/uploaded_by" ></td>
    178179              <td tal:content="row/upload_date" ></td>
    179               <td tal:content="row/imported_at" ></td>
     180              <td tal:content="row/imported_by" ></td>
     181              <td tal:content="row/import_date" ></td>
    180182              <td tal:content="row/msg"></td>
    181183            </tr>
  • WAeUP_SRP/base/skins/waeup_upload/uploads_index.py

    r3307 r3308  
    7676        row['imported'] = True
    7777        row['msg'] = import_message
    78         if getattr(doc,'imported_at',''):
    79             row['imported_at'] = doc.imported_at.strftime("%d/%m/%y %H:%M:%S")
     78        if getattr(doc,'import_date',''):
     79            row['import_date'] = doc.import_date.strftime("%d/%m/%y %H:%M:%S")
    8080        else:
    81             row['imported_at'] = ''
     81            row['import_date'] = ''
    8282        add_to = imported
    8383    else:
     
    9696info['imported'] = imported
    9797info['importable'] = importable
    98 info['import_allowed'] = str(member) in ('admin','joachim',) 
     98info['import_allowed'] = str(member) in ('admin','joachim',)
    9999
    100100validate = "upload" in request.keys()
  • WAeUP_SRP/uniben/profiles/default/layouts/upload.xml

    r3297 r3308  
    7171  <property name="display_external_editor">False</property>
    7272 </widget>
     73 <widget name="imported_by" meta_type="String Widget">
     74  <property name="title">Imported By</property>
     75  <property name="fields">
     76   <element value="imported_by"/>
     77  </property>
     78  <property name="label">Imported By</property>
     79  <property name="label_edit">Imported By</property>
     80  <property name="readonly_layout_modes"/>
     81  <property name="hidden_layout_modes">
     82   <element value="create"/>
     83   <element value="edit"/>
     84  </property>
     85  <property name="hidden_readonly_layout_modes"/>
     86  <property name="css_class_expr">string:row</property>
     87 </widget>
    7388 <widget name="uploaded_by" meta_type="String Widget">
    7489  <property name="title">Uploaded By</property>
     
    85100  <property name="hidden_readonly_layout_modes"/>
    86101  <property name="css_class_expr">string:row</property>
    87  </widget>
     102 </widget> 
    88103 <widget name="import_message" meta_type="String Widget">
    89104  <property name="title">Import Message</property>
     
    99114  <property name="hidden_readonly_layout_modes"/>
    100115  <property name="css_class_expr">string:row</property>
    101  </widget> 
     116 </widget>
    102117 <table>
    103118  <row>
     
    114129  </row>
    115130  <row>
     131   <cell name="imported_by"/>
     132  </row>
     133  <row>
    116134   <cell name="import_date"/>
    117135  </row>
    118136  <row>
    119137   <cell name="import_message"/>
    120   </row> 
     138  </row>
    121139 </table>
    122140</object>
  • WAeUP_SRP/uniben/profiles/default/schemas/upload.xml

    r3292 r3308  
    66  <field name="filename" meta_type="CPS String Field"/>
    77  <field name="uploaded_by" meta_type="CPS String Field"/>
     8  <field name="imported_by" meta_type="CPS String Field"/>
    89  <field name="import_date" meta_type="CPS DateTime Field"/>
    910  <field name="import_message" meta_type="CPS String Field"/>
Note: See TracChangeset for help on using the changeset viewer.