# HG changeset patch # User Thierry Florac # Date 1528894200 -7200 # Node ID eca8c37969a9e1934ccc71cbea443a99e140d8de # Parent c36df330086105d373e0987515caec7bec602408 Updated templates diff -r c36df3300861 -r eca8c37969a9 src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo Binary file src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo has changed diff -r c36df3300861 -r eca8c37969a9 src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po --- a/src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po Wed Jun 13 14:43:41 2018 +0200 +++ b/src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po Wed Jun 13 14:50:00 2018 +0200 @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE 1.0\n" -"POT-Creation-Date: 2018-05-24 09:42+0200\n" +"POT-Creation-Date: 2018-06-13 14:45+0200\n" "PO-Revision-Date: 2017-06-07 12:41+0200\n" "Last-Translator: Thierry Florac \n" "Language-Team: French\n" @@ -182,14 +182,28 @@ msgid "Default associations renderer" msgstr "Par défaut" +#: src/pyams_default_theme/shared/view/templates/render.pt:2 +msgid "View result items" +msgstr "Aperçu du contenu de la vue" + +#: src/pyams_default_theme/shared/view/templates/render.pt:3 +msgid "WARNING: items displayed in this preview are out of context!!" +msgstr "" +"ATTENTION : la sélection des éléments affichés dans cet aperçu ne tient pas compte du " +"contexte éventuellement paramétré dans la vue" + #: src/pyams_default_theme/shared/view/portlet/__init__.py:37 msgid "Simple list view" msgstr "Liste simple" -#: src/pyams_default_theme/shared/imagemap/__init__.py:56 +#: src/pyams_default_theme/shared/imagemap/__init__.py:58 msgid "Default imagemap renderer" msgstr "Par défaut" +#: src/pyams_default_theme/shared/imagemap/templates/render.pt:2 +msgid "Image map preview" +msgstr "Aperçu des zones cliquables" + #: src/pyams_default_theme/shared/logo/__init__.py:39 msgid "Default logos renderer" msgstr "Par défaut" diff -r c36df3300861 -r eca8c37969a9 src/pyams_default_theme/locales/pyams_default_theme.pot --- a/src/pyams_default_theme/locales/pyams_default_theme.pot Wed Jun 13 14:43:41 2018 +0200 +++ b/src/pyams_default_theme/locales/pyams_default_theme.pot Wed Jun 13 14:50:00 2018 +0200 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE 1.0\n" -"POT-Creation-Date: 2018-05-24 09:42+0200\n" +"POT-Creation-Date: 2018-06-13 14:45+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" @@ -167,14 +167,26 @@ msgid "Default associations renderer" msgstr "" +#: ./src/pyams_default_theme/shared/view/templates/render.pt:2 +msgid "View result items" +msgstr "" + +#: ./src/pyams_default_theme/shared/view/templates/render.pt:3 +msgid "WARNING: items displayed in this preview are out of context!!" +msgstr "" + #: ./src/pyams_default_theme/shared/view/portlet/__init__.py:37 msgid "Simple list view" msgstr "" -#: ./src/pyams_default_theme/shared/imagemap/__init__.py:56 +#: ./src/pyams_default_theme/shared/imagemap/__init__.py:58 msgid "Default imagemap renderer" msgstr "" +#: ./src/pyams_default_theme/shared/imagemap/templates/render.pt:2 +msgid "Image map preview" +msgstr "" + #: ./src/pyams_default_theme/shared/logo/__init__.py:39 msgid "Default logos renderer" msgstr "" diff -r c36df3300861 -r eca8c37969a9 src/pyams_default_theme/shared/imagemap/templates/render.pt --- a/src/pyams_default_theme/shared/imagemap/templates/render.pt Wed Jun 13 14:43:41 2018 +0200 +++ b/src/pyams_default_theme/shared/imagemap/templates/render.pt Wed Jun 13 14:50:00 2018 +0200 @@ -1,20 +1,23 @@ -
- - - - - - - - -
+
+ Image map preview +
+ + + + + + + + +
+
diff -r c36df3300861 -r eca8c37969a9 src/pyams_default_theme/shared/view/__init__.py --- a/src/pyams_default_theme/shared/view/__init__.py Wed Jun 13 14:43:41 2018 +0200 +++ b/src/pyams_default_theme/shared/view/__init__.py Wed Jun 13 14:50:00 2018 +0200 @@ -16,5 +16,22 @@ # import standard library # import interfaces +from pyams_content.shared.view.interfaces import IWfView +from pyams_skin.layer import IPyAMSUserLayer +from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION # import packages +from pyams_default_theme.page import BasePreviewPage +from pyams_pagelet.pagelet import pagelet_config +from pyams_template.template import template_config + + +@pagelet_config(name='preview.html', context=IWfView, layer=IPyAMSUserLayer, + permission=VIEW_SYSTEM_PERMISSION) +@template_config(template='templates/render.pt', layer=IPyAMSUserLayer) +class ViewPreviewPage(BasePreviewPage): + """Shared view preview page""" + + @property + def items(self): + return self.context.get_results(self.context) diff -r c36df3300861 -r eca8c37969a9 src/pyams_default_theme/shared/view/templates/render.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/shared/view/templates/render.pt Wed Jun 13 14:50:00 2018 +0200 @@ -0,0 +1,10 @@ +
+ View result items +
+ WARNING: items displayed in this preview are out of context!! +
+
    +
  • +
+