X-Git-Url: https://scm.cri.minesparis.psl.eu/git/Portfolio.git/blobdiff_plain/5e9d5a6ac7b22dbb732acd070728ae8e079ac2ff..e73353500c67453ef9663d67eaeee7dd46c358ee:/skins/selection_view.py?ds=inline diff --git a/skins/selection_view.py b/skins/selection_view.py deleted file mode 100755 index 0a419a7..0000000 --- a/skins/selection_view.py +++ /dev/null @@ -1,49 +0,0 @@ -##parameters= -from Products.CMFCore.utils import getToolByName -from Products.Portfolio.utils import translate -def _(message) : return translate(message, context).encode('utf-8') - -req = context.REQUEST -utool = getToolByName(context, 'portal_url') -portal = utool.getPortalObject() -portal_url = utool() - -# check if a lightbox is currently selected -lightboxpath = req.SESSION.get('lightboxpath', None) -selectionIsLightbox = False -if lightboxpath is not None : - try : - lightbox = portal.restrictedTraverse(lightboxpath) - selectionIsLightbox = True - except: - req.SESSION.set('lightboxpath', None) - -# breadcrumbs customization -if selectionIsLightbox : - lastBcTitle = '%s (%s)' % (_('My selection'), lightbox.title_or_id()) -else : - lastBcTitle = _('My selection') - -breadcrumbs = [ - { 'id' : 'root' - , 'title' : portal.title - , 'url' : portal_url}, - - {'id' : 'selection_view' - ,'title' : lastBcTitle - , 'url' : '%s/selection_view' % portal_url} - ] - - -options = {} -options.update(context.getSelectionPhotosInfos()) -options['container_type'] = 'selection' -options['selectionIsLightbox'] = selectionIsLightbox -options['breadcrumbs'] = breadcrumbs - -if selectionIsLightbox : - options['lightbox'] = lightbox -else : - options['selectionName'] = 'not saved yet' - -return context.selection_view_template(**options)