Changeset 1540 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
14 Mar 2007, 11:48:01 (18 years ago)
Author:
Henrik Bettermann
Message:

batch_view beautified

Location:
WAeUP_SRP/trunk/skins/waeup_pins
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_pins/batch_view.pt

    r1520 r1540  
    3030        <table tal:condition="info/used">
    3131          <tr tal:repeat="pin info/used">
    32             <td tal:content="python:path('repeat/pin/index')+1" />
    33             <td width="50px"> <span tal:content="pin/serial" />: </td>
     32            <td tal:content="python:path('repeat/pin/index')+1">: </td>
     33            <td width="50px"> <span tal:content="pin/serial" /></td>
    3434            <td tal:content="pin/pin" />
    3535            <td tal:content="pin/student_id" />
  • WAeUP_SRP/trunk/skins/waeup_pins/disable_pins.py

    r1082 r1540  
    3636    uid = res[0].pin
    3737    dict = {"pin": uid,
    38             "student": "disabled by: %s on %s" % (member,current)
     38            "student": "disabled by %s on %s" % (member,current)
    3939            }
    4040    pincat.modifyRecord(**dict)
  • WAeUP_SRP/trunk/skins/waeup_pins/search_pins.py

    r1401 r1540  
    3939                not_found.append(item)
    4040    return not_found
    41        
     41
    4242def set_used_pins(items, from_cat=False):
    4343    l = []
     
    5555            pin = i.get('pin')
    5656        item['student'] = sno
    57         item['prefix'] = prefix 
     57        item['prefix'] = prefix
    5858        item['serial'] = serial
    5959        if len(sno) > 0:
     
    7979            if sno.startswith('disabled'):
    8080                item['student_url'] = None
     81                item['student_id'] = ''
    8182            else:
    8283                item['student_url'] = '%s/campus/students/%s' % (context.portal_url(),item['student'])
    83             item['student_id'] = item['student']
     84                item['student_id'] = item['student']
    8485        else:
    8586            item['student_url'] = ''
     
    104105#from Products.zdb import set_trace;set_trace()
    105106if context.portal_type == "ScratchCardBatch":
    106     info['batch_doc'] = context.getContent() 
     107    info['batch_doc'] = context.getContent()
    107108    info['used'] = set_used_pins(info['batch_doc'].getUsedPins())
    108109    info['unused'] = info['batch_doc'].getUnusedPins()
     
    140141    else:
    141142        items = []
    142        
     143
    143144info['used'] = set_used_pins(items,from_cat=True)
    144145
Note: See TracChangeset for help on using the changeset viewer.