From: gfawcett Date: Fri, 3 Apr 2009 01:31:06 +0000 (+0000) Subject: fleshed out mockup of patron item-checkout screen. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9cb602bdbca99a8ddead2df4b822402cfd7b8cd5;p=Syrup.git fleshed out mockup of patron item-checkout screen. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@246 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/libsystems/evergreen/item_status.py b/conifer/libsystems/evergreen/item_status.py index f8b725b..4d5f34e 100644 --- a/conifer/libsystems/evergreen/item_status.py +++ b/conifer/libsystems/evergreen/item_status.py @@ -23,4 +23,7 @@ def lookup_availability(bib_id): if __name__ == '__main__': DYLAN = 1321798 - print lookup_availability(DYLAN) + #print lookup_availability(DYLAN) + + MISCHIEF = 2063351 + pprint(E1('open-ils.search.biblio.record.mods_slim.retrieve', MISCHIEF)) diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index dbdb7dc..f2c46ae 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -1219,4 +1219,30 @@ def phys_index(request): @admin_only # fixme, is this the right permission? def phys_checkout(request): - return g.render('phys/checkout.xhtml') + if request.method != 'POST': + return g.render('phys/checkout.xhtml', step=1) + else: + post = lambda k: request.POST.get(k, '').strip() + patron, item = post('patron'), post('item') + if post('step') == '1': + # patron entered, need item + patron_descrip = 'Fred Example, Jr.' # fixme, lookup + return g.render('phys/checkout.xhtml', step=2, + patron=patron, + patron_descrip=patron_descrip) + elif post('step') == '2': + # patron + item. do SIP calls. + # log the checkout in a local table. + patron_descrip = 'Fred Example, Jr.' # fixme, lookup + item_descrip = 'War and Peace (Reader\'s Digest edition)' + return g.render('phys/checkout.xhtml', step=3, + patron=patron, item=item, + patron_descrip=patron_descrip, + item_descrip=item_descrip) + elif post('step') == '3': + # continue after checkout. Go to 'checkout another item'. + patron_descrip = 'Fred Example, Jr.' # fixme, lookup + return g.render('phys/checkout.xhtml', step=2, + patron=patron, + patron_descrip=patron_descrip) + diff --git a/conifer/templates/phys/checkout.xhtml b/conifer/templates/phys/checkout.xhtml index 67b7e56..9da8221 100644 --- a/conifer/templates/phys/checkout.xhtml +++ b/conifer/templates/phys/checkout.xhtml @@ -8,27 +8,46 @@ title = _('Patron Checkout of Item') ${title}

${title}

- - + +
+
+ - + + - + - + + + + + + - + +