Changeset 3077


Ignore:
Timestamp:
31 Jan 2008, 22:05:11 (17 years ago)
Author:
Henrik Bettermann
Message:

archiveBatch fixed (Joachim, wie konnte das bei dir funktionieren??)

archive file reorganized

pins_view and psm beautified

Location:
WAeUP_SRP/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/ScratchCards.py

    r3076 r3077  
    143143        export_file = "%s/export/%s-%s_archive_%s.csv" % (i_home,prefix,batch_no,current)
    144144        lines = []
    145         fields = ['prefix','cost','serial','pin','student']
     145        fields = ['prefix','serial','pin','student']
    146146        headline = ','.join(fields)
    147147        out = open(export_file,"wb")
     148        out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n\n' % vars())
    148149        out.write(headline +'\n')
    149         out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n' % vars())
    150150        out.close()
    151151        out = open(export_file,"a")
     
    156156                                                                    batch_no,
    157157                                                                    len(pins)))
    158            
     158
    159159        pin_list = []
    160160        for pin in pins:
     
    167167        if delete:
    168168            for pin in pin_list:
    169                 self.deleteRecord(pin)
    170             msg = "deleted %(total)d pin from pins_catalog" % len(pin_list)
     169                self.portal_pins.deleteRecord(pin)
     170            msg = "deleted %d pin from portal_pins" % len(pin_list)
    171171            logger.info(msg)
    172172    ###)
  • WAeUP_SRP/base/skins/waeup_pins/archive.py

    r3076 r3077  
    2525        ob = getattr(context, id)
    2626        ob['archiveBatch']()
    27     message = 'portal_status_message=%s archived' % ' '.join(ids)
     27    message = 'portal_status_message=%s archived!' % ' '.join(ids)
    2828else:
    29     message = 'portal_status_message=psm_select_at_least_one_document'
     29    message = 'portal_status_message=Select at least one batch to archive!'
    3030
    3131if REQUEST is not None:
  • WAeUP_SRP/base/skins/waeup_pins/archive_delete.py

    r3076 r3077  
    2424    context.manage_delObjects(ids)
    2525else:
    26     message = 'portal_status_message=select at least one batch to archive and delete'
     26    message = 'portal_status_message=Select at least one batch to archive and delete!'
    2727
    2828if REQUEST is not None:
    2929    return REQUEST.RESPONSE.redirect("%s?%s" % (context.absolute_url(), message))
    30    
     30
  • WAeUP_SRP/base/skins/waeup_pins/pins_view.pt

    r3076 r3077  
    8888                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    8989                       />
    90                 <input type="submit" name="archive:method" value="archive"
     90                <input type="submit" name="archive:method" value="Archive"
     91                       class="destructive" i18n:attributes="value"
     92                       />
     93                <input type="submit" name="archive_delete:method" value="Archive & Delete"
    9194                       class="destructive" i18n:attributes="value"
    9295                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    93                        ('confirm archive', )"
    94                        />
    95                 <input type="submit" name="archive_delete:method" value="archive + delete"
    96                        class="destructive" i18n:attributes="value"
    97                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    98                        ('confirm archive and delete', )"
     96                       ('Do you really want to delete the pin batch?', )"
    9997                       />
    10098            </td>
Note: See TracChangeset for help on using the changeset viewer.