1 ##parameters=load='',unload='',**kw
4 lightboxSelected
= False
6 sd
= context
.session_data_manager
.getSessionData(create
= 1)
7 path
= context
.getPhysicalPath()
10 sd
.set('lightboxpath', path
)
11 selection
= context
.getUidList()
12 sd
.set('objects_selection', selection
)
13 sd
.set('objects_selection_dict', dict([(uid
, True) for uid
in selection
]))
15 sd
.set('lightboxpath', None)
16 sd
.set('objects_selection', [])
17 sd
.set('objects_selection_dict', {})
19 sessionpath
= sd
.get('lightboxpath', None)
20 if sessionpath
== path
:
21 lightboxSelected
= True
22 buttons
.append({'name': 'unload', 'value': 'Unload from my selection'})
24 buttons
.append({'name':'load', 'value': 'Load in my selection'})
27 options
['buttons'] = buttons
28 options
['lightboxSelected'] = lightboxSelected
29 options
['container_type'] = 'lightbox'
30 options
.update(context
.getLightboxPhotosInfos(context
))
32 return context
.lightbox_view_template(**options
)