Changeset 3285 for WAeUP_SRP


Ignore:
Timestamp:
7 Mar 2008, 23:17:25 (17 years ago)
Author:
Henrik Bettermann
Message:

beautify upload form

Location:
WAeUP_SRP
Files:
4 edited

Legend:

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

    r3283 r3285  
    1919      <form action="" method="post" enctype="multipart/form-data" class="group">
    2020        <span tal:replace="structure rendered" />
    21         <input type="submit" name="upload" value="upload"
     21        <br />
     22        <input type="submit" name="upload" value="Upload"
    2223               class="destructive" />
    2324      </form>
     
    3031            <th></th>
    3132            <th>Filename</th>
    32             <th>Schema</th>
    33             <th>Uploaded by</th>
    34             <th>Upload Date</th>
     33            <th>Data Layout</th>
     34            <th>By</th>
     35            <th>Date</th>
    3536            <th>Message</th>
    36             <th>Invalid Keys</th>
     37            <th>Conform Headline</th>
    3738          </tr>           
    3839          <tr tal:repeat="row rows"
     
    6061            <td tal:content="row/msg" ></td>
    6162            <td>
    62               <span tal:repeat="key row/invalid_keys">
    63                 <span tal:replace="key" />
     63              <div tal:repeat="key row/invalid_keys">
     64                <span tal:replace="key" /><br />
    6465                <select tal:attributes="name string:${row/id}|${key}.valid_key:record">
    6566                  <option tal:repeat="new row/valid_keys"
     
    6768                          tal:content="new" />
    6869                </select>
    69               </span>
     70              </div>
    7071            </td>
    7172            <td tal:condition="python:0">
     
    7980          </tr>
    8081        </table>
    81         <table width="100%" cellspacing="0" cellpadding="2"
    82                summary="contents of the folder"
    83                class="folderButtons">
    84           <tr>
    85             <td align="left" valign="top" rowspan="3"></td>
    86             <td align="left" valign="top">
    87                 <input tal:condition="nothing" type="button" value="button_select_all" class="context"
    88                        onclick="someJavaScriptFunctionThatWillBeReplaced"
    89                        i18n:attributes="value"
    90                        tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
    91                        % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    92                        />
    93                 <input type="submit" name="edit" value="edit"
    94                        class="destructive" i18n:attributes="value"
    95                        />
    96                 <input type="submit" name="folder_delete:method" value="button_delete"
    97                        class="destructive" i18n:attributes="value"
    98                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    99                        (cpsmcat('description_confirm_delete'), )"
    100                        />
    101             </td>
    102           </tr>
    103         </table>
     82       
     83        <br />
     84
     85        <input tal:condition="nothing" type="button" value="button_select_all" class="context"
     86               onclick="someJavaScriptFunctionThatWillBeReplaced"
     87               i18n:attributes="value"
     88               tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
     89               % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
     90               />
     91        <input type="submit" name="edit" value="Edit"
     92               class="destructive" i18n:attributes="value"
     93               />
     94        <input type="submit" name="folder_delete:method" value="button_delete"
     95               class="destructive" i18n:attributes="value"
     96               tal:attributes="onclick python:'return window.confirm(\'%s\')' %
     97               (cpsmcat('description_confirm_delete'), )"
     98               />
     99
    104100      </form>
    105101    </metal:main>
  • WAeUP_SRP/base/skins/waeup_upload/uploads_index.py

    r3283 r3285  
    5050        if new_keys:
    5151            doc.editHeadline(new_keys)
    52         request.RESPONSE.redirect(context.absolute_url())   
    53        
     52        request.RESPONSE.redirect(context.absolute_url())
     53
    5454for id,upload in context.objectItems():
    5555    row = {}
     
    6161    row['url'] = upload.absolute_url()
    6262    row['msg'], row['invalid_keys'] = doc['checkKeys']()
    63     row['filename'] = doc.filename 
     63    row['filename'] = doc.filename
    6464    row['import_layout'] = doc.import_layout
    6565    row['upload_date'] =  doc.upload_date.strftime("%d/%m/%y %H:%M:%S")
     
    9292        if filename not in context.objectIds():
    9393            break
    94         psm = "Upload file exists"
     94        psm = "Upload object exists!"
    9595    return context.uploads_form(rendered = res,
    9696                                        psm = psm,
     
    103103upload = getattr(context,filename)
    104104d = {}
    105 d['filename'] = d['id'] = filename 
     105d['filename'] = d['id'] = filename
    106106d['upload_date'] =  DateTime.DateTime()
    107107d['import_layout'] = ds.get('import_layout','')
     
    110110upload.getContent().edit(mapping=d)
    111111
    112 request.RESPONSE.redirect(context.absolute_url())   
     112request.RESPONSE.redirect(context.absolute_url())
    113113
  • WAeUP_SRP/uniben/profiles/default/layouts/upload.xml

    r3277 r3285  
    77 <property name="flexible_widgets"/>
    88 <property name="validate_values_expr"></property>
    9   <widget name="upload_file" meta_type="Disc File Widget">
    10     <property name="title">Upload File</property>
    11     <property name="fields">
    12       <element value="filename"/>
    13     </property>
    14     <property name="is_required">True</property>
    15     <property name="label">Upload File</property>
    16     <property name="label_edit">Upload File</property>
    17     <property name="readonly_layout_modes"/>
    18     <property name="hidden_layout_modes">
    19       <element value="create"/>
    20     </property>
    21     <property name="hidden_readonly_layout_modes"/>
    22     <property name="size_max">0</property>
    23     <property name="display_external_editor">False</property>
    24   </widget>
     9 
     10 <widget name="upload_file" meta_type="Disc File Widget">
     11  <property name="title">Upload File</property>
     12  <property name="fields">
     13    <element value="filename"/>
     14  </property>
     15  <property name="is_required">True</property>
     16  <property name="label">Upload File</property>
     17  <property name="label_edit">Upload File</property>
     18  <property name="readonly_layout_modes"/>
     19  <property name="hidden_layout_modes">
     20    <element value="create"/>
     21  </property>
     22  <property name="hidden_readonly_layout_modes"/>
     23  <property name="size_max">0</property>
     24  <property name="display_external_editor">False</property>
     25 </widget>
     26 
    2527 <widget name="import_layout" meta_type="Select Widget">
    26   <property name="title">Import Layout</property>
     28  <property name="title">Data Layout</property>
    2729  <property name="fields">
    2830   <element value="import_layout"/>
    2931  </property>
    3032  <property name="is_required">False</property>
    31   <property name="label">Import Layout</property>
    32   <property name="label_edit">Import Layout</property>
     33  <property name="label">Data Layout</property>
     34  <property name="label_edit">Data Layout</property>
    3335  <property name="readonly_layout_modes"/>
    3436  <property name="hidden_layout_modes"/>
     
    3638  <property name="vocabulary">import_names</property>
    3739 </widget>
     40 
     41  <widget name="uploaded_by" meta_type="String Widget">
     42    <property name="title">Uploaded By</property>
     43    <property name="fields">
     44      <element value="uploaded_by"/>
     45    </property>
     46    <property name="label">Uploaded By</property>
     47    <property name="label_edit">Uploaded By</property>
     48    <property name="description"></property>
     49    <property name="help"></property>
     50    <property name="is_i18n">False</property>
     51    <property name="widget_mode_expr"></property>
     52    <property name="readonly_layout_modes">
     53    </property>
     54    <property name="hidden_layout_modes">
     55    </property>
     56    <property name="hidden_readonly_layout_modes"/>
     57    <property name="css_class_expr">string:row</property>
     58  </widget>
     59 
     60
     61  <widget name="upload_date" meta_type="DateTime Widget">
     62    <property name="title">Upload Date</property>
     63    <property name="fields">
     64      <element value="upload_date"/>
     65    </property>
     66    <property name="label">Upload Date</property>
     67    <property name="label_edit">Upload Date</property>
     68    <property name="description"></property>
     69    <property name="help"></property>
     70    <property name="is_i18n">False</property>
     71    <property name="widget_mode_expr"></property>
     72    <property name="readonly_layout_modes"/>
     73    <property name="hidden_layout_modes">
     74    </property>
     75    <property name="hidden_readonly_layout_modes"/>
     76    <property name="view_format">%d/%m/%Y</property>
     77    <property name="time_setting">False</property>
     78    <property name="css_class_expr">string:row</property>
     79  </widget>
     80 
     81  <widget name="import_date" meta_type="DateTime Widget">
     82    <property name="title">Import Date</property>
     83    <property name="fields">
     84      <element value="import_date"/>
     85    </property>
     86    <property name="label">Import Date</property>
     87    <property name="label_edit">Import Date</property>
     88    <property name="description"></property>
     89    <property name="help"></property>
     90    <property name="is_i18n">False</property>
     91    <property name="widget_mode_expr"></property>
     92    <property name="readonly_layout_modes"/>
     93    <property name="hidden_layout_modes">
     94    </property>
     95    <property name="hidden_readonly_layout_modes"/>
     96    <property name="view_format">%d/%m/%Y</property>
     97    <property name="time_setting">False</property>
     98    <property name="css_class_expr">string:row</property>
     99  </widget>
     100
     101
     102 
    38103 <table>
    39104  <row>
     
    43108   <cell name="import_layout" />
    44109  </row>
     110  <row>
     111   <cell name="uploaded_by" />
     112  </row>
     113  <row>
     114   <cell name="upload_date" />
     115  </row>
     116  <row>
     117   <cell name="import_date" />
     118  </row>     
    45119 </table>
    46120</object>
  • WAeUP_SRP/uniben/profiles/default/schemas/upload.xml

    r3278 r3285  
    66  <field name="filename" meta_type="CPS String Field"/>
    77  <field name="uploaded_by" meta_type="CPS String Field"/>
    8   <field name="imported_at" meta_type="CPS DateTime Field"/>
     8  <field name="import_date" meta_type="CPS DateTime Field"/>
    99</object>
Note: See TracChangeset for help on using the changeset viewer.