X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/blobdiff_plain/eb82d8f9e1a13678be84f554f73595b6c7902591..d2c54b79af112bf32ae357779b1dca0d148e7eb6:/skins/getPhotosInfos.py?ds=inline diff --git a/skins/getPhotosInfos.py b/skins/getPhotosInfos.py index 985528e..e77739f 100755 --- a/skins/getPhotosInfos.py +++ b/skins/getPhotosInfos.py @@ -9,12 +9,12 @@ uidtool = getToolByName(context, 'portal_uidhandler') features = {} def toggleSelection(o, selected) : if selected : - return '%s/remove_to_selection' % o.absolute_url() + return '%s/remove_to_selection' % o.getURL() else : - return '%s/add_to_selection' % o.absolute_url() + return '%s/add_to_selection' % o.getURL() features['select'] = toggleSelection -features['cart'] = lambda o : '%s/get_slide_buyable_items' % o.absolute_url() +features['cart'] = lambda o : '%s/get_slide_buyable_items' % o.getURL() if mtool.checkPermission(ReviewPortalContent, context) : features['hideAnonymous'] = True @@ -45,7 +45,7 @@ for p in batch : selected = selDict.has_key(uid) hiddenForAnonymous = p.hiddenForAnonymous if pptool : - buyable = bool(pptool.getPrintingOptionsFor(p)) + buyable = bool(pptool.getPrintingOptionsFor(p.getObject())) if cart and cart.locked : buyable = False else : @@ -69,4 +69,9 @@ for p in batch : } infos.append(d) -return {'infos':infos, 'batch':batch, 'features':features} +return {'infos':infos, + 'batch':batch, + 'features':features, + 'sorting' : {'sort_on' : sort_on, + 'sort_order' : sort_order} + }