msgid "Lightbox created."
msgstr ""
+#: o/skins/lightbox_view.py:53
+msgid "Photo removed."
+msgstr ""
+
+#: o/skins/lightbox_view.py:55
+msgid "Removed photos."
+msgstr ""
+
+#: o/skins/lightbox_view.py:57
+msgid "Nothing to remove."
+msgstr ""
+
#. Default: ""
#: o/skins/lightbox_view_template.pt:19
msgid "lightbox_selected_explanations"
msgstr ""
-#: o/skins/lightbox_view_template.pt:22 o/skins/selection_view_template.pt:20
+#: o/skins/lightbox_view_template.pt:24 o/skins/my_cart_template.pt:59
+#: o/skins/portfolio_view.pt:88 o/skins/selection_view_template.pt:31
+msgid "delete"
+msgstr ""
+
+#: o/skins/lightbox_view_template.pt:31 o/skins/selection_view_template.pt:20
msgid "${DYNAMIC_CONTENT}"
msgstr ""
msgid "refresh amount"
msgstr ""
-#: o/skins/my_cart_template.pt:59 o/skins/portfolio_view.pt:88
-#: o/skins/selection_view_template.pt:31
-msgid "delete"
-msgstr ""
-
#: o/skins/my_cart_template.pt:69
msgid "Prints"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date: Fri Aug 29 10:44:06 2014\n"
-"PO-Revision-Date: 2014-08-29 10:45+0200\n"
+"POT-Creation-Date: Fri Aug 29 13:55:35 2014\n"
+"PO-Revision-Date: 2014-08-29 13:56+0200\n"
"Last-Translator: Benoît PIN\n"
"Language-Team: CRI http://cri.ensmp.fr\n"
"Language: \n"
msgid "Lightbox created."
msgstr "Table lumineuse créée."
+#: o/skins/lightbox_view.py:53
+msgid "Photo removed."
+msgstr "Photo retirée."
+
+#: o/skins/lightbox_view.py:55
+msgid "Removed photos."
+msgstr "Photos retirées."
+
+#: o/skins/lightbox_view.py:57
+msgid "Nothing to remove."
+msgstr "Rien à retirer."
+
#. Default: ""
#: o/skins/lightbox_view_template.pt:19
msgid "lightbox_selected_explanations"
"Cette table lumineuse est sélectionnée : les images que vous sélectionnerez "
"à présent seront automatiquement sauvegardées à cet endroit."
-#: o/skins/lightbox_view_template.pt:22 o/skins/selection_view_template.pt:20
+#: o/skins/lightbox_view_template.pt:24 o/skins/my_cart_template.pt:59
+#: o/skins/portfolio_view.pt:88 o/skins/selection_view_template.pt:31
+msgid "delete"
+msgstr "supprimer"
+
+#: o/skins/lightbox_view_template.pt:31 o/skins/selection_view_template.pt:20
msgid "${DYNAMIC_CONTENT}"
msgstr ""
msgid "refresh amount"
msgstr "actualiser le montant"
-#: o/skins/my_cart_template.pt:59 o/skins/portfolio_view.pt:88
-#: o/skins/selection_view_template.pt:31
-msgid "delete"
-msgstr "supprimer"
-
#: o/skins/my_cart_template.pt:69
msgid "Prints"
msgstr "Tirages"
msgid ""
msgstr ""
"Project-Id-Version: 3.0\n"
-"POT-Creation-Date: Fri Aug 29 10:44:06 2014\n"
+"POT-Creation-Date: Fri Aug 29 13:55:35 2014\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
msgid "Lightbox created."
msgstr ""
+#: o/skins/lightbox_view.py:53
+msgid "Photo removed."
+msgstr ""
+
+#: o/skins/lightbox_view.py:55
+msgid "Removed photos."
+msgstr ""
+
+#: o/skins/lightbox_view.py:57
+msgid "Nothing to remove."
+msgstr ""
+
#: o/skins/lightbox_view_template.pt:19
#. Default: ""
msgid "lightbox_selected_explanations"
msgstr ""
-#: o/skins/lightbox_view_template.pt:22
+#: o/skins/lightbox_view_template.pt:24
+#: o/skins/lightbox_view_template.pt:24
+#: o/skins/my_cart_template.pt:59
+#: o/skins/my_cart_template.pt:59
+#: o/skins/portfolio_view.pt:88
+#: o/skins/portfolio_view.pt:88
+#: o/skins/selection_view_template.pt:31
+#: o/skins/selection_view_template.pt:31
+msgid "delete"
+msgstr ""
+
+#: o/skins/lightbox_view_template.pt:31
#: o/skins/selection_view_template.pt:20
msgid "${DYNAMIC_CONTENT}"
msgstr ""
msgid "refresh amount"
msgstr ""
-#: o/skins/my_cart_template.pt:59
-#: o/skins/my_cart_template.pt:59
-#: o/skins/portfolio_view.pt:88
-#: o/skins/portfolio_view.pt:88
-#: o/skins/selection_view_template.pt:31
-#: o/skins/selection_view_template.pt:31
-msgid "delete"
-msgstr ""
-
#: o/skins/my_cart_template.pt:69
msgid "Prints"
msgstr ""
infos.append(d)
features = {}
-features['del'] = lambda b: '%s/remove_to_lightbox?uid=%s' % (lightboxUrl, b.cmf_uid)
+features['checkbox'] = True
features['cart'] = lambda b : '%s/get_slide_buyable_items' % b.getURL()
return {'infos' : infos,
-##parameters=load='',unload='',**kw
+##parameters=
+from Products.Portfolio.utils import translate
+_ = lambda msg : translate(msg, context)
options = {}
buttons = []
-lightboxSelected = False
sd = context.session_data_manager.getSessionData(create = 1)
path = context.getPhysicalPath()
+req = context.REQUEST
+form = req.form
+fg = form.get
+
+# check if lighbox is selected
+sessionpath = sd.get('lightboxpath', None)
+lightboxSelected = False
+if sessionpath == path :
+ lightboxSelected = True
+ buttons.append({'name': 'unload', 'value': 'Unload from my selection'})
+else :
+ buttons.append({'name':'load', 'value': 'Load in my selection'})
-if load :
+# form processing
+if fg('load') :
sd.set('lightboxpath', path)
selection = context.getUidList()
sd.set('objects_selection', selection)
sd.set('objects_selection_dict', dict([(uid, True) for uid in selection]))
-elif unload :
+
+elif fg('unload') :
sd.set('lightboxpath', None)
sd.set('objects_selection', [])
sd.set('objects_selection_dict', {})
-sessionpath = sd.get('lightboxpath', None)
-if sessionpath == path :
- lightboxSelected = True
- buttons.append({'name': 'unload', 'value': 'Unload from my selection'})
-else :
- buttons.append({'name':'load', 'value': 'Load in my selection'})
+elif fg('delete.x') or form.has_key('delete') :
+ uids = fg('uids', [])
+ if not lightboxSelected :
+ for uid in [int(uid) for uid in uids] :
+ context.remove(uid)
+ else :
+ selection = sd.get('objects_selection', [])
+ selDict = sd.get('objects_selection_dict', {})
+ for uid in [int(uid) for uid in uids] :
+ context.remove(uid)
+ selection.remove(uid)
+ del selDict[uid]
+
+ sd['objects_selection'] = selection
+ sd['objects_selection_dict'] = selDict
+
+ # ui feedback message
+ if uids :
+ if len(uids) == 1 :
+ msg = _('Photo removed.')
+ else :
+ msg = _('Removed photos.')
+ else :
+ msg = _('Nothing to remove.')
+
+ if fg('ajax') :
+ context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml;;charset=utf-8')
+ return '<deleted>%s</deleted>' % msg
+ else :
+ context.setStatus(True, msg)
options['buttons'] = buttons
<div metal:fill-slot="main" tal:omit-tag="" i18n:domain="portfolio">
<em tal:condition="options/lightboxSelected" i18n:translate="lightbox_selected_explanations"></em>
<form tal:attributes="action string:${here/absolute_url}/lightbox_view" tal:condition="options/buttons">
+ <div id="lightbox_toolbar" class="image_toolbar"
+ tal:define="ModifyPortalContent modules/Products/CMFCore/permissions/ModifyPortalContent"
+ tal:condition="python:mtool.checkPermission(ModifyPortalContent, here)">
+ <input type="image" width="17" height="27" alt="delete" title="delete"
+ name="delete"
+ tal:attributes="src string:$portal_url/trash_btn.gif"
+ i18n:attributes="alt;title"/>
+ <br/>
+ </div>
<span tal:repeat="button options/buttons" tal:omit-tag="">
<input type="submit" tal:attributes="name button/name; value button/value" i18n:attributes="value"/>
</span>
- </form>
- <div tal:define="batch options/batch;
- infos options/infos;
- features options/features"
- tal:omit-tag="">
- <div metal:use-macro="here/photo_layout_macros/macros/grid">
- affichage grille
+ <div tal:define="batch options/batch;
+ infos options/infos;
+ features options/features"
+ tal:omit-tag="">
+ <div metal:use-macro="here/photo_layout_macros/macros/grid">
+ affichage grille
+ </div>
</div>
- </div>
+ </form>
<br clear="all"/>
</div>
</body>