Changeset 3285 for WAeUP_SRP/base/skins


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

beautify upload form

Location:
WAeUP_SRP/base/skins/waeup_upload
Files:
2 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
Note: See TracChangeset for help on using the changeset viewer.