X-Git-Url: https://scm.cri.minesparis.psl.eu/git/Portfolio.git/blobdiff_plain/2da869b2b46179d64c05eaac4081226fdbbbc9ff..e73353500c67453ef9663d67eaeee7dd46c358ee:/skins/photo_view_ajax.py diff --git a/skins/photo_view_ajax.py b/skins/photo_view_ajax.py deleted file mode 100755 index 419f7fe..0000000 --- a/skins/photo_view_ajax.py +++ /dev/null @@ -1,24 +0,0 @@ -##parameters= -from Products.CMFCore.utils import getToolByName -from ZTUtils import make_query as mq -utool = getToolByName(context, 'portal_url') -pptool = getToolByName(context, 'portal_photo_print', None) -portal_url = utool() -sd = context.session_data_manager.getSessionData(create = 1) -cart = sd.get('cart', None) -bsize = 20 -options = {} - -portfolio = context.getParentNode() -posOfPhoto = portfolio.getObjectPosition(context.getId()) -options['backToContextUrl'] = '%s?b_start:int=%s' % (portfolio.absolute_url(), posOfPhoto/bsize*bsize) -options['lastBcUrl'] = context.absolute_url() -if pptool : - buyable = bool(pptool.getPrintingOptionsFor(context)) - if cart and cart.locked : - buyable = False -else : - buyable = False - -options['buyable'] = buyable -return context.photo_view_ajax_template(**options) \ No newline at end of file