IMPORTANT:
-* mod_python deployment testing.
+* if someone has item checked out, show due date/time on item-about page.
* does 'move to new heading' show up in the right places? Should be like 'edit'.
* People should be able to register themselves into open courses.
That is, actually become a member of them.
-* if someone has item checked out, show due date/time on item-about page.
-
* Import of reserves data from Leddy voyager. Laurentian, others?
* accented characters in z3950 queries seem to fail. More tests needed.
msg = self.send(PATRON_INFO,PATRON_INFO_RESP,
{'patron':barcode,
'startitem':1, 'enditem':2})
+ # fixme, this may not be the best test of okayness
+ msg['success'] = msg.get('valid_patron') == 'Y'
return msg
def checkout(self, patron, item, inst=''):
return mbr.role in (u'INSTR', u'PROXY')
def course_url(self, suffix=''):
+ # I'm not fond of this being here. I think I'll leave this and
+ # item_url non-implemented, and monkey-patch them in views.py.
req = genshi_locals.get_request()
prefix = req.META['SCRIPT_NAME']
return '%s/course/%d/%s' % (prefix, self.id, suffix)
return self.item_type in ('ELEC', 'URL', 'PHYS')
def item_url(self, suffix='', force_local_url=False):
+ # I'm not fond of this being here. I think I'll leave this and
+ # course_url non-implemented, and monkey-patch them in views.py.
req = genshi_locals.get_request()
prefix = req.META['SCRIPT_NAME']
if self.item_type == 'ELEC' and suffix == '':
post = lambda k: request.POST.get(k, '').strip()
patron, item = post('patron'), post('item')
msg = lib_integration.patron_info(patron)
- patron_descrip = '%s (%s) — %s' % (
- msg['personal'], msg['home_library'], msg['screenmsg'])
- return g.render('phys/checkout.xhtml', step=2,
- patron=patron, patron_descrip=patron_descrip)
+ if not msg['success']:
+ return simple_message(_('Invalid patron barcode'),
+ _('No such patron could be found.'))
+ else:
+ patron_descrip = '%s (%s) — %s' % (
+ msg['personal'], msg['home_library'], msg['screenmsg'])
+ return g.render('phys/checkout.xhtml', step=2,
+ patron=patron, patron_descrip=patron_descrip)
def _phys_checkout_do_checkout(request):
post = lambda k: request.POST.get(k, '').strip()
return g.render('phys/checkout.xhtml', step=3,
patron=patron, item=item,
patron_descrip=patron_descrip,
- checkout_result=msg,
+ checkout_result=msg_checkout,
item_descrip=item_descrip)
def _phys_checkout_do_another(request):