msgid "refresh amount"
msgstr ""
-#: o/skins/my_cart_template.pt:59 o/skins/portfolio_view.pt:71
+#: o/skins/my_cart_template.pt:59 o/skins/portfolio_view.pt:81
msgid "delete"
msgstr ""
msgid "download picture"
msgstr ""
-#: o/skins/portfolio_edit_form.py:13
+#: o/skins/portfolio_edit_form.py:17
msgid "Photo deleted."
msgstr ""
-#: o/skins/portfolio_edit_form.py:15
+#: o/skins/portfolio_edit_form.py:19
msgid "Deleted photos."
msgstr ""
-#: o/skins/portfolio_edit_form.py:18
+#: o/skins/portfolio_edit_form.py:22
msgid "Nothing to delete."
msgstr ""
msgid "Delete presentation"
msgstr ""
+#: o/skins/portfolio_view.pt:74
+msgid "sorting:"
+msgstr ""
+
+#: o/skins/portfolio_view.pt:76
+msgid "manual"
+msgstr ""
+
+#: o/skins/portfolio_view.pt:77
+msgid "shooting"
+msgstr ""
+
+#: o/skins/portfolio_view.pt:78
+msgid "modification"
+msgstr ""
+
#: o/skins/save_as_lightbox_template.pt:12
msgid "Save current selection as lightbox"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date: Sat Jul 5 14:18:53 2014\n"
-"PO-Revision-Date: 2014-07-05 14:19+0200\n"
+"POT-Creation-Date: Tue Jul 8 18:30:13 2014\n"
+"PO-Revision-Date: 2014-07-08 18:31+0200\n"
"Last-Translator: Benoît PIN\n"
"Language-Team: CRI http://cri.ensmp.fr\n"
"Language: \n"
msgid "refresh amount"
msgstr "actualiser le montant"
-#: o/skins/my_cart_template.pt:59 o/skins/portfolio_view.pt:71
+#: o/skins/my_cart_template.pt:59 o/skins/portfolio_view.pt:81
msgid "delete"
msgstr "supprimer"
msgid "download picture"
msgstr "télécharger l'image"
-#: o/skins/portfolio_edit_form.py:13
+#: o/skins/portfolio_edit_form.py:17
msgid "Photo deleted."
msgstr "Photo supprimée."
-#: o/skins/portfolio_edit_form.py:15
+#: o/skins/portfolio_edit_form.py:19
msgid "Deleted photos."
msgstr "Photos supprimées."
-#: o/skins/portfolio_edit_form.py:18
+#: o/skins/portfolio_edit_form.py:22
msgid "Nothing to delete."
msgstr "Rien à supprimer."
msgid "Delete presentation"
msgstr "Supprimer la présentation"
+#: o/skins/portfolio_view.pt:74
+msgid "sorting:"
+msgstr "tri :"
+
+#: o/skins/portfolio_view.pt:76
+msgid "manual"
+msgstr "manuel"
+
+#: o/skins/portfolio_view.pt:77
+msgid "shooting"
+msgstr "prise de vue"
+
+#: o/skins/portfolio_view.pt:78
+msgid "modification"
+msgstr "modification"
+
#: o/skins/save_as_lightbox_template.pt:12
msgid "Save current selection as lightbox"
msgstr "Enregistrer la sélection dans une table lumineuse"
msgid ""
msgstr ""
"Project-Id-Version: 3.0\n"
-"POT-Creation-Date: Sat Jul 5 14:18:53 2014\n"
+"POT-Creation-Date: Tue Jul 8 18:30:13 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"
#: o/skins/my_cart_template.pt:59
#: o/skins/my_cart_template.pt:59
-#: o/skins/portfolio_view.pt:71
-#: o/skins/portfolio_view.pt:71
+#: o/skins/portfolio_view.pt:81
+#: o/skins/portfolio_view.pt:81
msgid "delete"
msgstr ""
msgid "download picture"
msgstr ""
-#: o/skins/portfolio_edit_form.py:13
+#: o/skins/portfolio_edit_form.py:17
msgid "Photo deleted."
msgstr ""
-#: o/skins/portfolio_edit_form.py:15
+#: o/skins/portfolio_edit_form.py:19
msgid "Deleted photos."
msgstr ""
-#: o/skins/portfolio_edit_form.py:18
+#: o/skins/portfolio_edit_form.py:22
msgid "Nothing to delete."
msgstr ""
msgid "Delete presentation"
msgstr ""
+#: o/skins/portfolio_view.pt:74
+msgid "sorting:"
+msgstr ""
+
+#: o/skins/portfolio_view.pt:76
+msgid "manual"
+msgstr ""
+
+#: o/skins/portfolio_view.pt:77
+msgid "shooting"
+msgstr ""
+
+#: o/skins/portfolio_view.pt:78
+msgid "modification"
+msgstr ""
+
#: o/skins/save_as_lightbox_template.pt:12
msgid "Save current selection as lightbox"
msgstr ""
features = {}
def toggleSelection(o, selected) :
- if selected :
- return '%s/remove_to_selection' % o.absolute_url()
- else :
- return '%s/add_to_selection' % o.absolute_url()
-
+ if selected :
+ return '%s/remove_to_selection' % o.absolute_url()
+ else :
+ return '%s/add_to_selection' % o.absolute_url()
+
features['select'] = toggleSelection
features['cart'] = lambda o : '%s/get_slide_buyable_items' % o.absolute_url()
req = context.REQUEST
pho_start = req.get('pho_start', 0)
-batch = Batch(portfolio.listNearestFolderContents(contentFilter={'portal_type' : ['Photo']}, sorted=True),
- context.default_batch_size, pho_start, orphan=5, quantumleap=1, b_start_str='pho_start')
+sort_on, sort_order = context.getDefaultSorting()
+contentFilter = {'portal_type' : ['Photo'],
+ 'sort_on' : sort_on,
+ 'sort_order' : sort_order}
+batch = Batch(portfolio.listCatalogedContents(contentFilter=contentFilter),
+ context.default_batch_size, pho_start, orphan=5, quantumleap=1, b_start_str='pho_start')
infos = []
cart = sd.get('cart', None)
for p in batch :
- className = ''
- uid = getattr(p, 'cmf_uid', None)
- if uid is not None :
- uid = uid()
- absUrl = p.absolute_url()
- selected = selDict.has_key(uid)
- hiddenForAnonymous = p.hiddenForAnonymous()
- if pptool :
- buyable = bool(pptool.getPrintingOptionsFor(p))
- if cart and cart.locked :
- buyable = False
- else :
- buyable = False
-
- if selected :
- className = 'selected'
- if hiddenForAnonymous :
- className = 'hidden-slide'
-
- d = {'href' : absUrl
- ,'thumbUrl' : '%s/getThumbnail' % absUrl
- ,'thumbSize': p.getThumbnailSize()
- ,'title' : ('%s - %s' % (p.Title(), p.Description())).strip(' -')
- ,'selected' : selected
- ,'hiddenForAnonymous' : hiddenForAnonymous
- ,'cmf_uid' : uidtool.register(p)
- ,'buyable' : buyable
- ,'className': className
- ,'o' : p
- }
- infos.append(d)
+ className = ''
+ uid = getattr(p, 'cmf_uid', None)
+ # if uid is not None :
+ # uid = uid()
+ absUrl = p.getURL()
+ selected = selDict.has_key(uid)
+ hiddenForAnonymous = p.hiddenForAnonymous
+ if pptool :
+ buyable = bool(pptool.getPrintingOptionsFor(p))
+ if cart and cart.locked :
+ buyable = False
+ else :
+ buyable = False
+
+ if selected :
+ className = 'selected'
+ if hiddenForAnonymous :
+ className = 'hidden-slide'
+
+ d = {'href' : absUrl
+ ,'thumbUrl' : '%s/getThumbnail' % absUrl
+ ,'thumbSize': p.getThumbnailSize
+ ,'title' : ('%s - %s' % (p.Title, p.Description)).strip(' -')
+ ,'selected' : selected
+ ,'hiddenForAnonymous' : hiddenForAnonymous
+ ,'cmf_uid' : uidtool.register(p)
+ ,'buyable' : buyable
+ ,'className': className
+ ,'o' : p
+ }
+ infos.append(d)
return {'infos':infos, 'batch':batch, 'features':features}
else :
return '<deleted>%s</deleted>' % msg
+if fg('set_sorting') :
+ context.setDefaultSorting(fg('sorting'), False)
+ if not fg('ajax') :
+ return context.setRedirect(context, 'object/view')
+ else :
+ return '<done/>'
return '<error/>'
\ No newline at end of file
tal:define="ModifyPortalContent modules/Products/CMFCore/permissions/ModifyPortalContent"
tal:condition="python:mtool.checkPermission(ModifyPortalContent, here)">
<span>
- <span i18n:translate="" tal:omit-tag="">sort:</span>
- <select name="sort">
+ <span i18n:translate="" tal:omit-tag="">sorting:</span>
+ <select name="sorting">
<option value="position" i18n:translate="">manual</option>
<option value="DateTimeOriginal" i18n:translate="">shooting</option>
<option value="modified" i18n:translate="">modification</option>
</select>
+ <noscript>
+ <input type="submit" name="set_sorting" value="ok"/>
+ </noscript>
</span>
<input type="image" width="17" height="27" alt="delete" title="delete"
name="delete"