Changeset 3077
- Timestamp:
- 31 Jan 2008, 22:05:11 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/ScratchCards.py
r3076 r3077 143 143 export_file = "%s/export/%s-%s_archive_%s.csv" % (i_home,prefix,batch_no,current) 144 144 lines = [] 145 fields = ['prefix',' cost','serial','pin','student']145 fields = ['prefix','serial','pin','student'] 146 146 headline = ','.join(fields) 147 147 out = open(export_file,"wb") 148 out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n\n' % vars()) 148 149 out.write(headline +'\n') 149 out.write('%(prefix)s,%(cost)8.2f,%(batch_no)d,%(nr)d,%(sold)s\n' % vars())150 150 out.close() 151 151 out = open(export_file,"a") … … 156 156 batch_no, 157 157 len(pins))) 158 158 159 159 pin_list = [] 160 160 for pin in pins: … … 167 167 if delete: 168 168 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) 171 171 logger.info(msg) 172 172 ###) -
WAeUP_SRP/base/skins/waeup_pins/archive.py
r3076 r3077 25 25 ob = getattr(context, id) 26 26 ob['archiveBatch']() 27 message = 'portal_status_message=%s archived ' % ' '.join(ids)27 message = 'portal_status_message=%s archived!' % ' '.join(ids) 28 28 else: 29 message = 'portal_status_message= psm_select_at_least_one_document'29 message = 'portal_status_message=Select at least one batch to archive!' 30 30 31 31 if REQUEST is not None: -
WAeUP_SRP/base/skins/waeup_pins/archive_delete.py
r3076 r3077 24 24 context.manage_delObjects(ids) 25 25 else: 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!' 27 27 28 28 if REQUEST is not None: 29 29 return REQUEST.RESPONSE.redirect("%s?%s" % (context.absolute_url(), message)) 30 30 -
WAeUP_SRP/base/skins/waeup_pins/pins_view.pt
r3076 r3077 88 88 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 89 89 /> 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" 91 94 class="destructive" i18n:attributes="value" 92 95 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?', )" 99 97 /> 100 98 </td>
Note: See TracChangeset for help on using the changeset viewer.