# HG changeset patch
# User Damien Correia
# Date 1528793866 -7200
# Node ID 93f8b735357a38906787bd439b3fb10b4850dd0d
# Parent cffd13804aa84b249c38f74839f3ef4181a498d8# Parent abd143a83a078ea97616b1d77b7be884d8d403ef
merge default
diff -r cffd13804aa8 -r 93f8b735357a .hgtags
--- a/.hgtags Mon Jun 11 16:14:41 2018 +0200
+++ b/.hgtags Tue Jun 12 10:57:46 2018 +0200
@@ -16,3 +16,5 @@
5d94baef6923642af27a9f30f377d45f67f04bbf 0.1.12
cf2d19055dd754ce3ed30be24f83dae351b3ae5c 0.1.13
95026785904d443509d93895ddf761b7967d9d46 0.1.14
+95026785904d443509d93895ddf761b7967d9d46 0.1.14
+1978e4dad1d8f950411807ed2df23fd030a39b60 0.1.14
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content.egg-info/SOURCES.txt
--- a/src/pyams_content.egg-info/SOURCES.txt Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content.egg-info/SOURCES.txt Tue Jun 12 10:57:46 2018 +0200
@@ -210,6 +210,7 @@
src/pyams_content/shared/common/zmi/i18n.py
src/pyams_content/shared/common/zmi/manager.py
src/pyams_content/shared/common/zmi/owner.py
+src/pyams_content/shared/common/zmi/portal.py
src/pyams_content/shared/common/zmi/properties.py
src/pyams_content/shared/common/zmi/search.py
src/pyams_content/shared/common/zmi/security.py
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/component/links/__init__.py
--- a/src/pyams_content/component/links/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/component/links/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -20,6 +20,7 @@
from pyams_content.component.links.interfaces import IBaseLink, IInternalLink, IExternalLink, IMailtoLink
from pyams_content.features.checker.interfaces import IContentChecker, ERROR_VALUE
from pyams_content.interfaces import IBaseContent, MANAGE_CONTENT_PERMISSION
+from pyams_content.reference.pictograms.interfaces import IPictogramTable
from pyams_form.interfaces.form import IFormContextPermissionChecker
from pyams_i18n.interfaces import II18n
from pyams_sequence.interfaces import ISequentialIdInfo
@@ -31,10 +32,12 @@
from pyams_content.workflow import VISIBLE_STATES
from pyams_sequence.utility import get_reference_target
from pyams_utils.adapter import adapter_config, ContextAdapter
+from pyams_utils.registry import query_utility
from pyams_utils.request import check_request
from pyams_utils.traversing import get_parent
from pyams_utils.url import absolute_url
from pyams_utils.vocabulary import vocabulary_config
+from pyams_utils.zodb import volatile_property
from zope.interface import implementer
from zope.schema.fieldproperty import FieldProperty
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
@@ -69,6 +72,23 @@
title = FieldProperty(IBaseLink['title'])
description = FieldProperty(IBaseLink['description'])
+ _pictogram_name = FieldProperty(IBaseLink['pictogram_name'])
+
+ @property
+ def pictogram_name(self):
+ return self._pictogram_name
+
+ @pictogram_name.setter
+ def pictogram_name(self, value):
+ if value != self._pictogram_name:
+ self._pictogram_name = value
+ del self.pictogram
+
+ @volatile_property
+ def pictogram(self):
+ table = query_utility(IPictogramTable)
+ if table is not None:
+ return table.get(self._pictogram_name)
class BaseLinkInfoAdapter(ContextAdapter):
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/component/links/interfaces/__init__.py
--- a/src/pyams_content/component/links/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/component/links/interfaces/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -17,11 +17,13 @@
# import interfaces
from pyams_content.component.association.interfaces import IAssociationTarget, IAssociationItem
+from pyams_content.reference.pictograms.interfaces import SELECTED_PICTOGRAM_VOCABULARY
from pyams_sequence.interfaces import IInternalReference
# import packages
from pyams_i18n.schema import I18nTextLineField, I18nTextField
from pyams_utils.schema import MailAddressField
+from zope.interface import Attribute
from zope.schema import Choice, TextLine, URI
from pyams_content import _
@@ -38,6 +40,13 @@
description=_("Link description displayed by front-office template"),
required=False)
+ pictogram_name = Choice(title=_("Pictogram"),
+ description=_("Name of the pictogram associated with this link"),
+ required=False,
+ vocabulary=SELECTED_PICTOGRAM_VOCABULARY)
+
+ pictogram = Attribute("Selected pictogram object")
+
def get_editor_url(self):
"""Get URL for use in HTML editor"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/component/links/zmi/__init__.py
--- a/src/pyams_content/component/links/zmi/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/component/links/zmi/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -18,7 +18,7 @@
# import interfaces
from pyams_content.component.association.interfaces import IAssociationContainer
from pyams_content.component.association.zmi.interfaces import IAssociationsView
-from pyams_content.component.links.interfaces import ILinkContainerTarget, IInternalLink, IBaseLink, \
+from pyams_content.component.links.interfaces import ILinkContainerTarget, IBaseLink, IInternalLink, \
IExternalLink, IMailtoLink
from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerTable, IParagraphTitleToolbar
from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
@@ -31,6 +31,7 @@
from pyams_content.component.links import InternalLink, ExternalLink, MailtoLink
from pyams_content.component.paragraph.zmi import get_json_paragraph_markers_refresh_event
from pyams_content.component.paragraph.zmi.container import ParagraphContainerCounterBase
+from pyams_content.reference.pictograms.zmi.widget import PictogramSelectFieldWidget
from pyams_form.form import ajax_config
from pyams_form.security import ProtectedFormObjectMixin
from pyams_pagelet.pagelet import pagelet_config
@@ -86,7 +87,9 @@
legend = _("Add new internal link")
icon_css_class = 'fa fa-fw fa-external-link-square fa-rotate-90'
- fields = field.Fields(IInternalLink).select('reference', 'title', 'description')
+ fields = field.Fields(IInternalLink).select('reference', 'title', 'description', 'pictogram_name')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = MANAGE_CONTENT_PERMISSION
def updateWidgets(self, prefix=None):
@@ -119,7 +122,9 @@
legend = _("Edit internal link properties")
icon_css_class = 'fa fa-fw fa-external-link-square fa-rotate-90'
- fields = field.Fields(IInternalLink).select('reference', 'title', 'description')
+ fields = field.Fields(IInternalLink).select('reference', 'title', 'description', 'pictogram_name')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = None # defined by IFormContextPermissionChecker adapter
def updateWidgets(self, prefix=None):
@@ -179,7 +184,9 @@
legend = _("Add new external link")
icon_css_class = 'fa fa-fw fa-external-link'
- fields = field.Fields(IExternalLink).select('url', 'title', 'description', 'language')
+ fields = field.Fields(IExternalLink).select('url', 'title', 'description', 'pictogram_name', 'language')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = MANAGE_CONTENT_PERMISSION
def updateWidgets(self, prefix=None):
@@ -212,7 +219,9 @@
legend = _("Edit external link properties")
icon_css_class = 'fa fa-fw fa-external-link'
- fields = field.Fields(IExternalLink).select('url', 'title', 'description', 'language')
+ fields = field.Fields(IExternalLink).select('url', 'title', 'description', 'pictogram_name', 'language')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = None # defined by IFormContextPermissionChecker adapter
def updateWidgets(self, prefix=None):
@@ -272,7 +281,9 @@
legend = _("Add new mailto link")
icon_css_class = 'fa fa-fw fa-envelope-o'
- fields = field.Fields(IMailtoLink).select('address', 'address_name', 'title', 'description')
+ fields = field.Fields(IMailtoLink).select('address', 'address_name', 'title', 'description', 'pictogram_name')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = MANAGE_CONTENT_PERMISSION
def updateWidgets(self, prefix=None):
@@ -305,7 +316,9 @@
legend = _("Edit mailto link properties")
icon_css_class = 'fa fa-fw fa-envelope-o'
- fields = field.Fields(IMailtoLink).select('address', 'address_name', 'title', 'description')
+ fields = field.Fields(IMailtoLink).select('address', 'address_name', 'title', 'description', 'pictogram_name')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = None # defined by IFormContextPermissionChecker adapter
def updateWidgets(self, prefix=None):
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/component/paragraph/pictogram.py
--- a/src/pyams_content/component/paragraph/pictogram.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/component/paragraph/pictogram.py Tue Jun 12 10:57:46 2018 +0200
@@ -78,7 +78,8 @@
@volatile_property
def pictogram(self):
table = query_utility(IPictogramTable)
- return table.get(self.pictogram_name)
+ if table is not None:
+ return table.get(self._pictogram_name)
@adapter_config(context=IPictogramItem, provides=IFormContextPermissionChecker)
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/component/paragraph/zmi/pictogram.py
--- a/src/pyams_content/component/paragraph/zmi/pictogram.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/pictogram.py Tue Jun 12 10:57:46 2018 +0200
@@ -9,7 +9,6 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
-from pyams_content.reference.pictograms.zmi import get_pictogram_header
__docformat__ = 'restructuredtext'
@@ -24,13 +23,11 @@
from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
-from pyams_content.reference.pictograms.interfaces import IPictogramTable
from pyams_content.shared.common import IWfSharedContent
from pyams_form.interfaces.form import IInnerForm, IInnerSubForm
from pyams_i18n.interfaces import II18n
from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces.data import IObjectData
from pyams_zmi.interfaces import IPropertiesEditForm
from z3c.form.interfaces import INPUT_MODE, IDataExtractedEvent
from z3c.table.interfaces import IValues, IColumn
@@ -41,6 +38,7 @@
from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
+from pyams_content.reference.pictograms.zmi.widget import PictogramSelectFieldWidget
from pyams_form.form import AJAXAddForm, ajax_config
from pyams_form.security import ProtectedFormObjectMixin
from pyams_i18n.column import I18nAttrColumn
@@ -51,7 +49,6 @@
from pyams_skin.table import BaseTable, SorterColumn, I18nColumn, TrashColumn, VisibilitySwitcherColumn
from pyams_skin.viewlet.toolbar import ToolbarAction
from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
-from pyams_utils.registry import query_utility
from pyams_utils.text import get_text_start
from pyams_utils.traversing import get_parent
from pyams_utils.url import absolute_url
@@ -320,26 +317,12 @@
icon_css_class = 'fa fa-fw fa-arrow-h'
fields = field.Fields(IPictogramItem).omit('__parent__', '__name__', 'visible')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = MANAGE_CONTENT_PERMISSION
def updateWidgets(self, prefix=None):
super(PictogramAddForm, self).updateWidgets(prefix)
- if 'pictogram_name' in self.widgets:
- pictograms = query_utility(IPictogramTable)
- if pictograms is not None:
- label_id = '{0}_pictogram_label'.format(self.id)
- widget = self.widgets['pictogram_name']
- widget.after_widget_notice = '{1}'.format(
- label_id,
- self.request.localizer.translate(_("Default header: --")))
- widget.object_data = {
- 'ams-change-handler': 'MyAMS.helpers.select2ChangeHelper',
- 'ams-stop-propagation': 'true',
- 'ams-select2-helper-type': 'html',
- 'ams-select2-helper-url': absolute_url(pictograms, self.request, 'get-pictogram-header.html'),
- 'ams-select2-helper-target': '#{0}'.format(label_id)
- }
- alsoProvides(widget, IObjectData)
if 'body' in self.widgets:
self.widgets['body'].widget_css_class = 'textarea height-100'
@@ -376,31 +359,12 @@
icon_css_class = 'fa fa-fw fa-linode'
fields = field.Fields(IPictogramItem).omit('__parent__', '__name__', 'visible')
+ fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
+
edit_permission = MANAGE_CONTENT_PERMISSION
def updateWidgets(self, prefix=None):
super(PictogramPropertiesEditForm, self).updateWidgets(prefix)
- if 'pictogram_name' in self.widgets:
- pictograms = query_utility(IPictogramTable)
- if pictograms is not None:
- pictogram = pictograms.get(self.context.pictogram_name)
- label_id = '{0}_pictogram_label'.format(self.id)
- widget = self.widgets['pictogram_name']
- widget.required = True
- if pictogram is None:
- widget.after_widget_notice = '--'.format(label_id)
- else:
- widget.after_widget_notice = '{1}'.format(
- label_id,
- get_pictogram_header(pictogram, self.request))
- widget.object_data = {
- 'ams-change-handler': 'MyAMS.helpers.select2ChangeHelper',
- 'ams-stop-propagation': 'true',
- 'ams-select2-helper-type': 'html',
- 'ams-select2-helper-url': absolute_url(pictograms, self.request, 'get-pictogram-header.html'),
- 'ams-select2-helper-target': '#{0}'.format(label_id)
- }
- alsoProvides(widget, IObjectData)
if 'body' in self.widgets:
self.widgets['body'].widget_css_class = 'textarea height-100'
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.mo
Binary file src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.mo has changed
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po
--- a/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Tue Jun 12 10:57:46 2018 +0200
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-11 14:34+0200\n"
+"POT-Creation-Date: 2018-06-12 09:21+0200\n"
"PO-Revision-Date: 2015-09-10 10:42+0200\n"
"Last-Translator: Thierry Florac \n"
"Language-Team: French\n"
@@ -219,10 +219,10 @@
#: src/pyams_content/component/illustration/interfaces/__init__.py:52
#: src/pyams_content/component/paragraph/interfaces/video.py:48
#: src/pyams_content/component/paragraph/interfaces/audio.py:44
-#: src/pyams_content/component/links/interfaces/__init__.py:37
+#: src/pyams_content/component/links/interfaces/__init__.py:39
#: src/pyams_content/component/video/interfaces/__init__.py:48
-#: src/pyams_content/shared/common/interfaces/__init__.py:144
-#: src/pyams_content/shared/form/interfaces/__init__.py:65
+#: src/pyams_content/shared/common/interfaces/__init__.py:149
+#: src/pyams_content/shared/form/interfaces/__init__.py:66
msgid "Description"
msgstr "Description"
@@ -401,7 +401,7 @@
msgstr "Type de fichier joint"
#: src/pyams_content/component/extfile/interfaces/__init__.py:36
-#: src/pyams_content/component/links/interfaces/__init__.py:33
+#: src/pyams_content/component/links/interfaces/__init__.py:35
#: src/pyams_content/shared/imagemap/interfaces/__init__.py:54
#: src/pyams_content/shared/site/interfaces/__init__.py:113
msgid "Alternate title"
@@ -419,7 +419,7 @@
msgstr "Description du fichier, présentée aux internautes"
#: src/pyams_content/component/extfile/interfaces/__init__.py:48
-#: src/pyams_content/component/links/interfaces/__init__.py:59
+#: src/pyams_content/component/links/interfaces/__init__.py:68
msgid "Language"
msgstr "Langue"
@@ -536,7 +536,7 @@
msgid "no visible paragraph"
msgstr "aucun bloc de contenu visible"
-#: src/pyams_content/component/paragraph/pictogram.py:134
+#: src/pyams_content/component/paragraph/pictogram.py:135
msgid "Selected pictogram is missing"
msgstr "le pictogramme sélectionné est introuvable"
@@ -712,64 +712,59 @@
"Vérifiez le paramétrage des types de blocs de contenu autorisés pour pouvoir "
"ajouter de nouveaux blocs."
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:84
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:81
msgid "Pictograms..."
msgstr "Pictogrammes"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:97
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:94
msgid "Add new pictogram paragraph"
msgstr "Ajout de pictogrammes"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:124
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:121
msgid "Edit pictogram paragraph properties"
msgstr "Propriétés des pictogrammes"
#. Default: Header
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:254
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:251
msgid "pictogram-item-header"
msgstr "En-tête"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:269
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:266
#: src/pyams_content/component/paragraph/zmi/keynumber.py:260
#: src/pyams_content/component/paragraph/interfaces/pictogram.py:58
#: src/pyams_content/component/paragraph/interfaces/keynumber.py:58
msgid "Associated text"
msgstr "Texte associé"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:291
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:288
#: src/pyams_content/component/paragraph/interfaces/pictogram.py:80
msgid "Pictograms"
msgstr "Pictogrammes"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:306
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:303
#: src/pyams_content/reference/pictograms/zmi/__init__.py:62
msgid "Add pictogram"
msgstr "Ajouter un pictogramme"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:319
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:316
#: src/pyams_content/reference/pictograms/zmi/__init__.py:74
msgid "Add new pictogram"
msgstr "Ajout d'un pictogramme"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:375
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:358
#: src/pyams_content/reference/pictograms/zmi/__init__.py:98
msgid "Edit pictogram properties"
msgstr "Propriétés du pictogramme"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:355
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:338
msgid "Pictogram was correctly added"
msgstr "Le pictogramme a été ajouté."
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:365
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:422
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:348
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:386
msgid "You must select a pictogram!"
msgstr "Vous devez sélectionner un pictogramme !"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:334
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:174
-msgid "Default header: --"
-msgstr "En-tête par défaut : --"
-
#: src/pyams_content/component/paragraph/zmi/audio.py:54
msgid "Audio paragraph..."
msgstr "Bande son"
@@ -914,7 +909,7 @@
#: src/pyams_content/component/paragraph/interfaces/pictogram.py:41
#: src/pyams_content/component/paragraph/interfaces/keynumber.py:40
#: src/pyams_content/component/association/interfaces/__init__.py:42
-#: src/pyams_content/shared/form/interfaces/__init__.py:86
+#: src/pyams_content/shared/form/interfaces/__init__.py:87
#: src/pyams_content/shared/site/interfaces/__init__.py:117
#: src/pyams_content/features/alert/interfaces.py:54
msgid "Visible?"
@@ -1017,7 +1012,8 @@
msgstr "Si 'non', ce pictogramme ne sera pas présenté aux internautes"
#: src/pyams_content/component/paragraph/interfaces/pictogram.py:46
-#: src/pyams_content/shared/common/interfaces/types.py:67
+#: src/pyams_content/component/links/interfaces/__init__.py:43
+#: src/pyams_content/shared/common/interfaces/types.py:68
#: src/pyams_content/features/alert/interfaces.py:79
msgid "Pictogram"
msgstr "Pictogramme"
@@ -1323,67 +1319,67 @@
msgid "Presentation template used for associations"
msgstr "Modèle de présentation utilisé par ce bloc de contenu"
-#: src/pyams_content/component/links/__init__.py:104
+#: src/pyams_content/component/links/__init__.py:124
msgid "Internal link"
msgstr "Lien interne"
-#: src/pyams_content/component/links/__init__.py:186
+#: src/pyams_content/component/links/__init__.py:206
msgid "External link"
msgstr "Lien externe"
-#: src/pyams_content/component/links/__init__.py:239
+#: src/pyams_content/component/links/__init__.py:259
msgid "Mailto link"
msgstr "Lien mailto"
-#: src/pyams_content/component/links/__init__.py:173
+#: src/pyams_content/component/links/__init__.py:193
msgid "target is not published"
msgstr "le contenu ciblé n'est pas publié"
-#: src/pyams_content/component/links/zmi/__init__.py:57
+#: src/pyams_content/component/links/zmi/__init__.py:58
msgid "Internal links"
msgstr "Liens internes"
-#: src/pyams_content/component/links/zmi/__init__.py:72
+#: src/pyams_content/component/links/zmi/__init__.py:73
msgid "Add internal link"
msgstr "Lien interne"
-#: src/pyams_content/component/links/zmi/__init__.py:86
+#: src/pyams_content/component/links/zmi/__init__.py:87
msgid "Add new internal link"
msgstr "Ajout d'un lien interne"
-#: src/pyams_content/component/links/zmi/__init__.py:119
+#: src/pyams_content/component/links/zmi/__init__.py:122
msgid "Edit internal link properties"
msgstr "Propriétés du lien interne"
-#: src/pyams_content/component/links/zmi/__init__.py:150
+#: src/pyams_content/component/links/zmi/__init__.py:155
msgid "External links"
msgstr "Liens externes"
-#: src/pyams_content/component/links/zmi/__init__.py:165
+#: src/pyams_content/component/links/zmi/__init__.py:170
msgid "Add external link"
msgstr "Lien externe"
-#: src/pyams_content/component/links/zmi/__init__.py:179
+#: src/pyams_content/component/links/zmi/__init__.py:184
msgid "Add new external link"
msgstr "Ajout d'un lien externe"
-#: src/pyams_content/component/links/zmi/__init__.py:212
+#: src/pyams_content/component/links/zmi/__init__.py:219
msgid "Edit external link properties"
msgstr "Propriétés du lien externe"
-#: src/pyams_content/component/links/zmi/__init__.py:243
+#: src/pyams_content/component/links/zmi/__init__.py:252
msgid "Mailto links"
msgstr "Liens mailto"
-#: src/pyams_content/component/links/zmi/__init__.py:258
+#: src/pyams_content/component/links/zmi/__init__.py:267
msgid "Add mailto link"
msgstr "Lien mailto"
-#: src/pyams_content/component/links/zmi/__init__.py:272
+#: src/pyams_content/component/links/zmi/__init__.py:281
msgid "Add new mailto link"
msgstr "Ajout d'un lien « mailto »"
-#: src/pyams_content/component/links/zmi/__init__.py:305
+#: src/pyams_content/component/links/zmi/__init__.py:316
msgid "Edit mailto link properties"
msgstr "Propriétés du lien « mailto »"
@@ -1395,47 +1391,51 @@
msgid "Content's internal links"
msgstr "Autres contenus qui pointent vers ce contenu"
-#: src/pyams_content/component/links/interfaces/__init__.py:34
+#: src/pyams_content/component/links/interfaces/__init__.py:36
msgid "Link title, as shown in front-office"
msgstr ""
"Le contexte d'utilisation de ce lien peut nécessiter de modifier son titre "
"d'origine. Ce titre de substitution sera alors présenté aux internautes."
-#: src/pyams_content/component/links/interfaces/__init__.py:38
+#: src/pyams_content/component/links/interfaces/__init__.py:40
msgid "Link description displayed by front-office template"
msgstr "Description du lien, présentée aux internautes"
-#: src/pyams_content/component/links/interfaces/__init__.py:55
+#: src/pyams_content/component/links/interfaces/__init__.py:44
+msgid "Name of the pictogram associated with this link"
+msgstr "Pictogramme à associer à ce lien"
+
+#: src/pyams_content/component/links/interfaces/__init__.py:64
#: src/pyams_content/shared/logo/interfaces/__init__.py:50
msgid "Target URL"
msgstr "URL cible"
-#: src/pyams_content/component/links/interfaces/__init__.py:56
+#: src/pyams_content/component/links/interfaces/__init__.py:65
#: src/pyams_content/shared/logo/interfaces/__init__.py:51
msgid "URL used to access external resource"
msgstr ""
"URL utilisée pour accéder à cette ressource externe. Doit comprendre le "
"protocole d'accès au site, comme « http:// » ou « https:// »."
-#: src/pyams_content/component/links/interfaces/__init__.py:60
+#: src/pyams_content/component/links/interfaces/__init__.py:69
msgid "Language used in this remote resource"
msgstr ""
"Langue utilisée par cette ressource extene ; à préciser lorsqu'il ne s'agit "
"pas de la langue par défaut du site."
-#: src/pyams_content/component/links/interfaces/__init__.py:68
+#: src/pyams_content/component/links/interfaces/__init__.py:77
msgid "Target address"
msgstr "Adresse mail"
-#: src/pyams_content/component/links/interfaces/__init__.py:69
+#: src/pyams_content/component/links/interfaces/__init__.py:78
msgid "Target email address"
msgstr "Adresse de messagerie \"stricte\", soit uniquement \"xxx@yyy.com\""
-#: src/pyams_content/component/links/interfaces/__init__.py:72
+#: src/pyams_content/component/links/interfaces/__init__.py:81
msgid "Address name"
msgstr "Nom de messagerie"
-#: src/pyams_content/component/links/interfaces/__init__.py:73
+#: src/pyams_content/component/links/interfaces/__init__.py:82
msgid "Address as displayed in address book"
msgstr ""
"Nom de la boîte aux lettres, tel qu'il sera affiché dans l'application de "
@@ -2141,6 +2141,37 @@
"RECHERCHE - Tous contenus présents dans « {site} » "
"confondus"
+#: src/pyams_content/shared/common/zmi/portal.py:46
+msgid "Edit default template properties"
+msgstr "Modèle de présentation par défaut"
+
+#: src/pyams_content/shared/common/zmi/portal.py:56
+msgid ""
+"**This form allows you to select shared content default template.**\n"
+"\n"
+"If you choose to use a shared template, you can only adjust settings of each "
+"portlet individually but can't change portlets list or page configuration.\n"
+"\n"
+"If you use a local template, you can define a whole custom configuration but "
+"the template definition can't be reused anywhere..."
+msgstr ""
+"Vous pouvez modifier le modèle de présentation qui sera appliqué **par "
+"défaut** à tous les contenus de ce gabarit.\n"
+"\n"
+"Si vous choisissez d'utiliser un modèle de présentation partagé, vous "
+"pourrez ajuster les paramètres de chaque composant mais ne pourrez pas "
+"modifier la liste des composants ou leur position et la configuration de la "
+"page.\n"
+"\n"
+"Si vous choisissez d'utiliser un modèle de présentation \"local\", vous "
+"pourrez définir l'ensemble de la configuration mais le modèle de "
+"présentation ne pourra pas être réutilisé ailleurs que dans les contenus de "
+"ce gabarit."
+
+#: src/pyams_content/shared/common/zmi/portal.py:72
+msgid "Override tool default template"
+msgstr "Ne pas utiliser le modèle par défaut de ce gabarit"
+
#: src/pyams_content/shared/common/zmi/dashboard.py:134
msgid "Unique ID"
msgstr "N° IN"
@@ -2435,8 +2466,8 @@
#: src/pyams_content/shared/common/zmi/security.py:118
#: src/pyams_content/shared/common/zmi/security.py:270
-#: src/pyams_content/shared/common/interfaces/__init__.py:251
-#: src/pyams_content/shared/common/interfaces/__init__.py:276
+#: src/pyams_content/shared/common/interfaces/__init__.py:260
+#: src/pyams_content/shared/common/interfaces/__init__.py:285
msgid "Publication checks"
msgstr "Activer le tunnel de publication"
@@ -2559,9 +2590,9 @@
#: src/pyams_content/shared/common/zmi/templates/check-input.pt:34
#: src/pyams_content/shared/common/zmi/templates/preview-input.pt:34
-#: src/pyams_content/shared/common/interfaces/types.py:39
+#: src/pyams_content/shared/common/interfaces/types.py:40
#: src/pyams_content/shared/form/zmi/field.py:159
-#: src/pyams_content/shared/form/interfaces/__init__.py:61
+#: src/pyams_content/shared/form/interfaces/__init__.py:62
msgid "Label"
msgstr "Libellé"
@@ -2788,36 +2819,36 @@
msgid "This content is already retired and not visible."
msgstr "Ce contenu est déjà retiré et n'est plus visible des internautes."
-#: src/pyams_content/shared/common/interfaces/types.py:35
+#: src/pyams_content/shared/common/interfaces/types.py:36
#: src/pyams_content/shared/form/zmi/field.py:148
msgid "Name"
msgstr "Nom"
-#: src/pyams_content/shared/common/interfaces/types.py:36
+#: src/pyams_content/shared/common/interfaces/types.py:37
msgid "Name of this data type; must be unique between all data types"
msgstr "Nom de ce type de donnée ; doit être unique entre tous les types"
-#: src/pyams_content/shared/common/interfaces/types.py:42
+#: src/pyams_content/shared/common/interfaces/types.py:43
msgid "Navigation label"
msgstr "Libellé de navigation"
-#: src/pyams_content/shared/common/interfaces/types.py:43
+#: src/pyams_content/shared/common/interfaces/types.py:44
msgid "Label used for navigation entries"
msgstr "Libellé utilisé pour les entrées de navigation"
-#: src/pyams_content/shared/common/interfaces/types.py:46
+#: src/pyams_content/shared/common/interfaces/types.py:47
msgid "Tab-folder label"
msgstr "Libellé d'un l'onglet"
-#: src/pyams_content/shared/common/interfaces/types.py:47
+#: src/pyams_content/shared/common/interfaces/types.py:48
msgid "Label used to include into tab folder"
msgstr "Libellé utilisé pour l'affichage du type sous la forme d'un onglet"
-#: src/pyams_content/shared/common/interfaces/types.py:50
+#: src/pyams_content/shared/common/interfaces/types.py:51
msgid "'See also' label"
msgstr "Libellé 'À voir aussi'"
-#: src/pyams_content/shared/common/interfaces/types.py:51
+#: src/pyams_content/shared/common/interfaces/types.py:52
msgid ""
"This label can be used when contents of this type will be displayed in a "
"'See also' entries block"
@@ -2825,61 +2856,61 @@
"Ce libellé peut être utilisé lorsque des contenus de ce type sont affichés "
"sous la forme d'un bloc 'À voir aussi'"
-#: src/pyams_content/shared/common/interfaces/types.py:55
+#: src/pyams_content/shared/common/interfaces/types.py:56
msgid "'Single value' label"
msgstr "Libellé 'Valeur unique'"
-#: src/pyams_content/shared/common/interfaces/types.py:56
+#: src/pyams_content/shared/common/interfaces/types.py:57
msgid "Label given to this type when a single value is displayed"
msgstr "Libellé utilisé pour ce type lorsqu'une seule valeur est affichée"
-#: src/pyams_content/shared/common/interfaces/types.py:59
+#: src/pyams_content/shared/common/interfaces/types.py:60
msgid "'Link to list' label"
msgstr "Libellé 'Lien vers une liste'"
-#: src/pyams_content/shared/common/interfaces/types.py:60
+#: src/pyams_content/shared/common/interfaces/types.py:61
msgid "Label used to display a link to a list of items of this type"
msgstr ""
"Libellé utilisé lorsque l'on crée un lien vers uns liste de contenus de ce "
"type"
-#: src/pyams_content/shared/common/interfaces/types.py:63
+#: src/pyams_content/shared/common/interfaces/types.py:64
msgid "Next content label"
msgstr "Libellé du contenu suivant"
-#: src/pyams_content/shared/common/interfaces/types.py:64
+#: src/pyams_content/shared/common/interfaces/types.py:65
msgid "Label used to announce next date for this type"
msgstr ""
"Libellé utilisé pour afficher la prochaine date d'un événement pour ce type"
-#: src/pyams_content/shared/common/interfaces/types.py:68
+#: src/pyams_content/shared/common/interfaces/types.py:69
msgid "Image associated to this data type"
msgstr "Image associée à ce type"
-#: src/pyams_content/shared/common/interfaces/types.py:81
+#: src/pyams_content/shared/common/interfaces/types.py:82
msgid "Field names"
msgstr "Champs associés"
-#: src/pyams_content/shared/common/interfaces/types.py:82
+#: src/pyams_content/shared/common/interfaces/types.py:83
msgid "List of fields associated with this data type"
msgstr "Liste des champs de saisie associés à ce type"
-#: src/pyams_content/shared/common/interfaces/__init__.py:45
+#: src/pyams_content/shared/common/interfaces/__init__.py:46
#: src/pyams_content/root/interfaces/__init__.py:40
msgid "Webmasters"
msgstr "Webmestres"
-#: src/pyams_content/shared/common/interfaces/__init__.py:46
+#: src/pyams_content/shared/common/interfaces/__init__.py:47
msgid "Webmasters can handle all contents, including published ones"
msgstr ""
"Les webmestres peuvent modifier et gérer tous les contenus, y compris ceux "
"qui sont publiés et hormis ceux qui sont archivés"
-#: src/pyams_content/shared/common/interfaces/__init__.py:50
+#: src/pyams_content/shared/common/interfaces/__init__.py:51
msgid "Pilots"
msgstr "Pilotes"
-#: src/pyams_content/shared/common/interfaces/__init__.py:51
+#: src/pyams_content/shared/common/interfaces/__init__.py:52
msgid ""
"Pilots can handle tool configuration, manage access rules, grant users roles "
"and manage managers restrictions"
@@ -2888,13 +2919,13 @@
"et les contributeurs, et limitent si nécessaire l'intervention des "
"responsables à certains contenus"
-#: src/pyams_content/shared/common/interfaces/__init__.py:56
-#: src/pyams_content/shared/common/interfaces/__init__.py:173
+#: src/pyams_content/shared/common/interfaces/__init__.py:57
+#: src/pyams_content/shared/common/interfaces/__init__.py:182
msgid "Managers"
msgstr "Responsables"
-#: src/pyams_content/shared/common/interfaces/__init__.py:57
-#: src/pyams_content/shared/common/interfaces/__init__.py:174
+#: src/pyams_content/shared/common/interfaces/__init__.py:58
+#: src/pyams_content/shared/common/interfaces/__init__.py:183
msgid ""
"Managers can handle main operations in tool's workflow, like publish or "
"retire contents"
@@ -2903,28 +2934,28 @@
"(comme la publication ou le retrait des contenus), dans la limite des "
"restrictions qui leur sont imposées"
-#: src/pyams_content/shared/common/interfaces/__init__.py:62
-#: src/pyams_content/shared/common/interfaces/__init__.py:179
+#: src/pyams_content/shared/common/interfaces/__init__.py:63
+#: src/pyams_content/shared/common/interfaces/__init__.py:188
msgid "Contributors"
msgstr "Contributeurs"
-#: src/pyams_content/shared/common/interfaces/__init__.py:63
+#: src/pyams_content/shared/common/interfaces/__init__.py:64
msgid "Contributors are users which are allowed to create new contents"
msgstr "Les contributeurs sont autorisés à créer de nouveaux contenus"
-#: src/pyams_content/shared/common/interfaces/__init__.py:89
+#: src/pyams_content/shared/common/interfaces/__init__.py:90
msgid "Workflow name"
msgstr "Nom du workflow"
-#: src/pyams_content/shared/common/interfaces/__init__.py:90
+#: src/pyams_content/shared/common/interfaces/__init__.py:91
msgid "Name of workflow utility used to manage tool contents"
msgstr "Nom du workflow qui gère le cycle de vie des contenus de cet outil"
-#: src/pyams_content/shared/common/interfaces/__init__.py:114
+#: src/pyams_content/shared/common/interfaces/__init__.py:119
msgid "Content URL"
msgstr "URL du contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:115
+#: src/pyams_content/shared/common/interfaces/__init__.py:120
msgid ""
"URL used to access this content; this is important for SEO and should "
"include most important words describing content; spaces and underscores will "
@@ -2938,11 +2969,11 @@
"d'union, les lettres accentuées par leur équivalent sans accent, et les mots "
"de moins de trois lettres sont supprimés."
-#: src/pyams_content/shared/common/interfaces/__init__.py:120
+#: src/pyams_content/shared/common/interfaces/__init__.py:125
msgid "Version creator"
msgstr "À l'origine de cette version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:121
+#: src/pyams_content/shared/common/interfaces/__init__.py:126
msgid ""
"Name of content's version creator. The creator of the first version is also "
"it's owner."
@@ -2950,39 +2981,39 @@
"Nom du créateur de cette version. Le créateur de la première version d'un "
"contenu est aussi son propriétaire."
-#: src/pyams_content/shared/common/interfaces/__init__.py:125
+#: src/pyams_content/shared/common/interfaces/__init__.py:130
msgid "First owner"
msgstr "Premier propriétaire"
-#: src/pyams_content/shared/common/interfaces/__init__.py:126
+#: src/pyams_content/shared/common/interfaces/__init__.py:131
msgid "Name of content's first version owner"
msgstr "Nom de l'utilisateur ayant créé la première version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:130
+#: src/pyams_content/shared/common/interfaces/__init__.py:135
msgid "Version creation"
msgstr "Date de création"
-#: src/pyams_content/shared/common/interfaces/__init__.py:133
+#: src/pyams_content/shared/common/interfaces/__init__.py:138
msgid "Version modifiers"
msgstr "Intervenants"
-#: src/pyams_content/shared/common/interfaces/__init__.py:134
+#: src/pyams_content/shared/common/interfaces/__init__.py:139
msgid "List of principals who modified this content"
msgstr "Liste des utilisateurs qui sont intervenus sur cette version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:137
+#: src/pyams_content/shared/common/interfaces/__init__.py:142
msgid "Last modifier"
msgstr "Dernier intervenant"
-#: src/pyams_content/shared/common/interfaces/__init__.py:138
+#: src/pyams_content/shared/common/interfaces/__init__.py:143
msgid "Last principal who modified this content"
msgstr "Dernier utilisateur étant intervenu sur ce contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:141
+#: src/pyams_content/shared/common/interfaces/__init__.py:146
msgid "Last update"
msgstr "Dernière modification"
-#: src/pyams_content/shared/common/interfaces/__init__.py:145
+#: src/pyams_content/shared/common/interfaces/__init__.py:150
msgid ""
"The content's description is 'hidden' into HTML's page headers; but it can "
"be seen, for example, in some search engines results as content's description"
@@ -2991,21 +3022,21 @@
"mais on peut la retrouver, par exemple, dans les listes de résultats des "
"moteurs de recherche"
-#: src/pyams_content/shared/common/interfaces/__init__.py:150
+#: src/pyams_content/shared/common/interfaces/__init__.py:155
msgid "Keywords"
msgstr "Mots-clés"
-#: src/pyams_content/shared/common/interfaces/__init__.py:151
+#: src/pyams_content/shared/common/interfaces/__init__.py:156
msgid "They will be included into HTML pages metadata"
msgstr "Ces mots-clés seront intégrés dans les métadonnées des pages HTML"
-#: src/pyams_content/shared/common/interfaces/__init__.py:154
+#: src/pyams_content/shared/common/interfaces/__init__.py:159
#: src/pyams_content/shared/site/zmi/folder.py:76
#: src/pyams_content/shared/site/interfaces/__init__.py:66
msgid "Notepad"
msgstr "Bloc-notes"
-#: src/pyams_content/shared/common/interfaces/__init__.py:155
+#: src/pyams_content/shared/common/interfaces/__init__.py:160
#: src/pyams_content/shared/site/zmi/folder.py:77
#: src/pyams_content/shared/site/interfaces/__init__.py:67
msgid "Internal information to be known about this content"
@@ -3013,11 +3044,11 @@
"Pour prendre note d'informations internes utiles ou importantes à propos de "
"ce contenu ; ces notes ne seront pas publiées sur internet."
-#: src/pyams_content/shared/common/interfaces/__init__.py:166
+#: src/pyams_content/shared/common/interfaces/__init__.py:175
msgid "Content owner"
msgstr "Propriétaire"
-#: src/pyams_content/shared/common/interfaces/__init__.py:167
+#: src/pyams_content/shared/common/interfaces/__init__.py:176
msgid ""
"The owner is the creator of content's first version, except if it was "
"transferred afterwards to another owner"
@@ -3026,7 +3057,7 @@
"lorsque cette propriété a été transférée à un autre utilisateur après coup. "
"Les contenus archivés ne sont plus transférables."
-#: src/pyams_content/shared/common/interfaces/__init__.py:180
+#: src/pyams_content/shared/common/interfaces/__init__.py:189
msgid ""
"Contributors are users which are allowed to update this content in addition "
"to it's owner"
@@ -3034,11 +3065,11 @@
"Les contributeurs sont autorisés, en plus du propriétaire, à modifier ce "
"contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:185
+#: src/pyams_content/shared/common/interfaces/__init__.py:194
msgid "Readers"
msgstr "Relecteurs"
-#: src/pyams_content/shared/common/interfaces/__init__.py:186
+#: src/pyams_content/shared/common/interfaces/__init__.py:195
msgid ""
"Readers are users which are asked to verify and comment contents before they "
"are published"
@@ -3046,22 +3077,22 @@
"Les relecteurs sont des utilisateurs qui sont sollicités pour vérifier et "
"commenter un contenu avant sa publication"
-#: src/pyams_content/shared/common/interfaces/__init__.py:191
+#: src/pyams_content/shared/common/interfaces/__init__.py:200
msgid "Guests"
msgstr "Invités"
-#: src/pyams_content/shared/common/interfaces/__init__.py:192
+#: src/pyams_content/shared/common/interfaces/__init__.py:201
msgid ""
"Guests are users which are allowed to view contents with restricted access"
msgstr ""
"Les invités sont autorisés à consulter des contenus dont l'accès a été "
"restreint"
-#: src/pyams_content/shared/common/interfaces/__init__.py:212
+#: src/pyams_content/shared/common/interfaces/__init__.py:221
msgid "Principal ID"
msgstr "ID utilisateur"
-#: src/pyams_content/shared/common/interfaces/__init__.py:252
+#: src/pyams_content/shared/common/interfaces/__init__.py:261
msgid ""
"If 'yes', this contributor will have to confirm that contents have been "
"previewed and checked before asking for publication"
@@ -3069,7 +3100,7 @@
"Si 'oui', ce contributeur devra confirmer qu'il a bien prévisualisé et "
"audité chaque contenu avant de pouvoir effectuer une demande de publication"
-#: src/pyams_content/shared/common/interfaces/__init__.py:277
+#: src/pyams_content/shared/common/interfaces/__init__.py:286
msgid ""
"If 'yes', this manager will have to confirm that contents have been "
"previewed and checked before publishing a content"
@@ -3077,11 +3108,11 @@
"Si 'oui', ce responsable devra confirmer qu'il a bien prévisualisé et audité "
"chaque contenu avant de pouvoir effectuer une publication"
-#: src/pyams_content/shared/common/interfaces/__init__.py:282
+#: src/pyams_content/shared/common/interfaces/__init__.py:291
msgid "Restricted contents"
msgstr "Accès restreints"
-#: src/pyams_content/shared/common/interfaces/__init__.py:283
+#: src/pyams_content/shared/common/interfaces/__init__.py:292
msgid ""
"If 'yes', this manager will get restricted access to manage contents based "
"on selected settings"
@@ -3089,11 +3120,11 @@
"Si 'oui', ce responsable n'aura qu'un accès restreint à certains contenus en "
"fonction de paramètres spécifiques"
-#: src/pyams_content/shared/common/interfaces/__init__.py:288
+#: src/pyams_content/shared/common/interfaces/__init__.py:297
msgid "Selected owners"
msgstr "Propriétaires"
-#: src/pyams_content/shared/common/interfaces/__init__.py:289
+#: src/pyams_content/shared/common/interfaces/__init__.py:298
msgid "Manager will have access to contents owned by these principals"
msgstr ""
"Le responsable n'aura accès qu'aux contenus dont ces utilisateurs sont "
@@ -3182,7 +3213,7 @@
msgstr "Champs de saisie"
#: src/pyams_content/shared/form/zmi/field.py:170
-#: src/pyams_content/shared/form/interfaces/__init__.py:56
+#: src/pyams_content/shared/form/interfaces/__init__.py:57
msgid "Field type"
msgstr "Type de champ"
@@ -3211,149 +3242,149 @@
msgid "Specified name is already used!"
msgstr "Le nom indiqué pour ce champ est déjà utilisé !"
-#: src/pyams_content/shared/form/interfaces/__init__.py:34
+#: src/pyams_content/shared/form/interfaces/__init__.py:35
msgid "Form"
msgstr "Formulaire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:52
+#: src/pyams_content/shared/form/interfaces/__init__.py:53
msgid "Field name"
msgstr "Nom du champ"
-#: src/pyams_content/shared/form/interfaces/__init__.py:53
+#: src/pyams_content/shared/form/interfaces/__init__.py:54
msgid "Field internal name; must be unique for a given form"
msgstr ""
"Nom interne du champ ; ce nom doit être unique pour un formulaire donné"
-#: src/pyams_content/shared/form/interfaces/__init__.py:57
+#: src/pyams_content/shared/form/interfaces/__init__.py:58
msgid "Selected field type"
msgstr "Type de champ proposé à l'internaute"
-#: src/pyams_content/shared/form/interfaces/__init__.py:62
+#: src/pyams_content/shared/form/interfaces/__init__.py:63
msgid "User field label"
msgstr "Libellé affiché à l'internaute"
-#: src/pyams_content/shared/form/interfaces/__init__.py:66
+#: src/pyams_content/shared/form/interfaces/__init__.py:67
msgid "Field description can be displayed as hint"
msgstr ""
"Description du champ, qui pourra être affichée sous la forme d'une info-bulle"
-#: src/pyams_content/shared/form/interfaces/__init__.py:69
+#: src/pyams_content/shared/form/interfaces/__init__.py:70
msgid "Placeholder"
msgstr "Espace réservé"
-#: src/pyams_content/shared/form/interfaces/__init__.py:70
+#: src/pyams_content/shared/form/interfaces/__init__.py:71
msgid "Some field types like textline can display a placeholder"
msgstr ""
"Certains champs tels que les zones de texte peuvent afficher ce texte tant "
"qu'aucune valeur n'y a été saisie"
-#: src/pyams_content/shared/form/interfaces/__init__.py:73
+#: src/pyams_content/shared/form/interfaces/__init__.py:74
msgid "Optional values"
msgstr "Liste de valeurs"
-#: src/pyams_content/shared/form/interfaces/__init__.py:74
+#: src/pyams_content/shared/form/interfaces/__init__.py:75
msgid "List of available values (for 'choice' and 'list' field types)"
msgstr ""
"Liste des valeurs disponibles (pour les champs de types 'Sélection simple' "
"ou 'Sélection multiple')"
-#: src/pyams_content/shared/form/interfaces/__init__.py:77
+#: src/pyams_content/shared/form/interfaces/__init__.py:78
msgid "Default value"
msgstr "Valeur par défaut"
-#: src/pyams_content/shared/form/interfaces/__init__.py:78
+#: src/pyams_content/shared/form/interfaces/__init__.py:79
msgid "Give default value if field type can use it"
msgstr ""
"Donner la valeur par défaut du champ ; attention, tous les types de champs "
"ne peuvent pas utiliser une valeur par défaut !"
-#: src/pyams_content/shared/form/interfaces/__init__.py:81
+#: src/pyams_content/shared/form/interfaces/__init__.py:82
msgid "Required?"
msgstr "Obligatoire ?"
-#: src/pyams_content/shared/form/interfaces/__init__.py:82
+#: src/pyams_content/shared/form/interfaces/__init__.py:83
msgid "Select 'yes' to set field as mandatory"
msgstr "Sélectionnez 'oui' pour que la saisie de ce champ soit obligatoire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:87
+#: src/pyams_content/shared/form/interfaces/__init__.py:88
msgid "Select 'no' to hide given field..."
msgstr "Sélectionnez 'non' pour masquer ce champ"
-#: src/pyams_content/shared/form/interfaces/__init__.py:121
+#: src/pyams_content/shared/form/interfaces/__init__.py:122
msgid "Form title"
msgstr "Titre du formulaire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:124
+#: src/pyams_content/shared/form/interfaces/__init__.py:125
msgid "Form header"
msgstr "En-tête du formulaire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:127
+#: src/pyams_content/shared/form/interfaces/__init__.py:128
msgid "Form handler"
msgstr "Gestionnaire du formulaire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:128
+#: src/pyams_content/shared/form/interfaces/__init__.py:129
msgid "Select how form data is transmitted"
msgstr ""
"Le gestionnaire sélectionné détermine la façon dont les données saisies par "
"les internautes seront stockées ou envoyées"
-#: src/pyams_content/shared/form/interfaces/__init__.py:131
+#: src/pyams_content/shared/form/interfaces/__init__.py:132
msgid "Authenticated only?"
msgstr "Authentification requise ?"
-#: src/pyams_content/shared/form/interfaces/__init__.py:132
+#: src/pyams_content/shared/form/interfaces/__init__.py:133
msgid "If 'yes', only authenticated users will be able to see and submit form"
msgstr ""
"Si 'oui', seuls les utilisateurs authentifiés pourront saisir des données "
"dans le formulaire et les soumettre"
-#: src/pyams_content/shared/form/interfaces/__init__.py:136
+#: src/pyams_content/shared/form/interfaces/__init__.py:137
msgid "Use captcha?"
msgstr "Ajouter un captcha ?"
-#: src/pyams_content/shared/form/interfaces/__init__.py:137
+#: src/pyams_content/shared/form/interfaces/__init__.py:138
msgid "If 'yes', a captcha will be added automatically to the form"
msgstr "Si 'oui', un captcha sera ajouté automatiquement au formulaire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:141
+#: src/pyams_content/shared/form/interfaces/__init__.py:142
msgid "Submit label"
msgstr "Libellé de soumission"
-#: src/pyams_content/shared/form/interfaces/__init__.py:142
+#: src/pyams_content/shared/form/interfaces/__init__.py:143
msgid "Label of form submit button"
msgstr "Libellé du bouton de soumission du formulaire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:179
+#: src/pyams_content/shared/form/interfaces/__init__.py:180
msgid "Source address"
msgstr "Adresse source"
-#: src/pyams_content/shared/form/interfaces/__init__.py:180
+#: src/pyams_content/shared/form/interfaces/__init__.py:181
msgid "Mail address from which form data is sent"
msgstr "Adresse de messagerie émettrice des données"
-#: src/pyams_content/shared/form/interfaces/__init__.py:183
-msgid "Source name"
-msgstr "Nom de la source"
-
#: src/pyams_content/shared/form/interfaces/__init__.py:184
+msgid "Source name"
+msgstr "Nom de la source"
+
+#: src/pyams_content/shared/form/interfaces/__init__.py:185
msgid "Name of mail data sender"
msgstr "Nom de l'émetteur des données"
-#: src/pyams_content/shared/form/interfaces/__init__.py:187
+#: src/pyams_content/shared/form/interfaces/__init__.py:188
msgid "Recipient address"
msgstr "Adresse de destination"
-#: src/pyams_content/shared/form/interfaces/__init__.py:188
+#: src/pyams_content/shared/form/interfaces/__init__.py:189
msgid "Mail address to which form data is sent"
msgstr ""
"Adresse d'envoi des données; vous pouvez indiquer plusieurs adresses en les "
"séparant par des point-virgules"
-#: src/pyams_content/shared/form/interfaces/__init__.py:191
+#: src/pyams_content/shared/form/interfaces/__init__.py:192
msgid "Recipient name"
msgstr "Nom du destinataire"
-#: src/pyams_content/shared/form/interfaces/__init__.py:192
+#: src/pyams_content/shared/form/interfaces/__init__.py:193
msgid "Name of data recipient"
msgstr "Nom du destinataire des messages"
@@ -3371,7 +3402,7 @@
msgid "News topic « {title} »"
msgstr "Actualité « {title} »"
-#: src/pyams_content/shared/news/interfaces/__init__.py:28
+#: src/pyams_content/shared/news/interfaces/__init__.py:29
msgid "News topic"
msgstr "Actualité"
@@ -3513,8 +3544,7 @@
#: src/pyams_content/shared/view/interfaces/__init__.py:164
msgid "Exclude context?"
-msgstr ""
-"Exclure le contexte ?"
+msgstr "Exclure le contexte ?"
#: src/pyams_content/shared/view/interfaces/__init__.py:165
msgid "If 'yes', context will be excluded from results list"
@@ -3679,7 +3709,7 @@
msgid "Image map template"
msgstr "Mode de rendu"
-#: src/pyams_content/shared/site/folder.py:58
+#: src/pyams_content/shared/site/folder.py:57
msgid "Site folder"
msgstr "Rubrique"
@@ -4455,6 +4485,11 @@
msgid "References"
msgstr "Tables de réf."
+#: src/pyams_content/reference/pictograms/zmi/__init__.py:172
+#: src/pyams_content/reference/pictograms/zmi/widget.py:55
+msgid "Default header: --"
+msgstr "En-tête par défaut : --"
+
#: src/pyams_content/reference/pictograms/zmi/manager.py:51
msgid "Pictograms selection..."
msgstr "Sélection de pictogrammes"
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/locales/pyams_content.pot
--- a/src/pyams_content/locales/pyams_content.pot Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/locales/pyams_content.pot Tue Jun 12 10:57:46 2018 +0200
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-11 14:34+0200\n"
+"POT-Creation-Date: 2018-06-12 09:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
@@ -211,10 +211,10 @@
#: ./src/pyams_content/component/illustration/interfaces/__init__.py:52
#: ./src/pyams_content/component/paragraph/interfaces/video.py:48
#: ./src/pyams_content/component/paragraph/interfaces/audio.py:44
-#: ./src/pyams_content/component/links/interfaces/__init__.py:37
+#: ./src/pyams_content/component/links/interfaces/__init__.py:39
#: ./src/pyams_content/component/video/interfaces/__init__.py:48
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:144
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:65
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:149
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:66
msgid "Description"
msgstr ""
@@ -388,7 +388,7 @@
msgstr ""
#: ./src/pyams_content/component/extfile/interfaces/__init__.py:36
-#: ./src/pyams_content/component/links/interfaces/__init__.py:33
+#: ./src/pyams_content/component/links/interfaces/__init__.py:35
#: ./src/pyams_content/shared/imagemap/interfaces/__init__.py:54
#: ./src/pyams_content/shared/site/interfaces/__init__.py:113
msgid "Alternate title"
@@ -406,7 +406,7 @@
msgstr ""
#: ./src/pyams_content/component/extfile/interfaces/__init__.py:48
-#: ./src/pyams_content/component/links/interfaces/__init__.py:59
+#: ./src/pyams_content/component/links/interfaces/__init__.py:68
msgid "Language"
msgstr ""
@@ -509,7 +509,7 @@
msgid "no visible paragraph"
msgstr ""
-#: ./src/pyams_content/component/paragraph/pictogram.py:134
+#: ./src/pyams_content/component/paragraph/pictogram.py:135
msgid "Selected pictogram is missing"
msgstr ""
@@ -673,64 +673,59 @@
msgid "Check allowed paragraph types to be able to create new paragraphs."
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:84
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:81
msgid "Pictograms..."
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:97
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:94
msgid "Add new pictogram paragraph"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:124
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:121
msgid "Edit pictogram paragraph properties"
msgstr ""
#. Default: Header
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:254
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:251
msgid "pictogram-item-header"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:269
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:266
#: ./src/pyams_content/component/paragraph/zmi/keynumber.py:260
#: ./src/pyams_content/component/paragraph/interfaces/pictogram.py:58
#: ./src/pyams_content/component/paragraph/interfaces/keynumber.py:58
msgid "Associated text"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:291
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:288
#: ./src/pyams_content/component/paragraph/interfaces/pictogram.py:80
msgid "Pictograms"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:306
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:303
#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:62
msgid "Add pictogram"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:319
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:316
#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:74
msgid "Add new pictogram"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:375
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:358
#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:98
msgid "Edit pictogram properties"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:355
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:338
msgid "Pictogram was correctly added"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:365
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:422
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:348
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:386
msgid "You must select a pictogram!"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:334
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:174
-msgid "Default header: --"
-msgstr ""
-
#: ./src/pyams_content/component/paragraph/zmi/audio.py:54
msgid "Audio paragraph..."
msgstr ""
@@ -875,7 +870,7 @@
#: ./src/pyams_content/component/paragraph/interfaces/pictogram.py:41
#: ./src/pyams_content/component/paragraph/interfaces/keynumber.py:40
#: ./src/pyams_content/component/association/interfaces/__init__.py:42
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:86
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:87
#: ./src/pyams_content/shared/site/interfaces/__init__.py:117
#: ./src/pyams_content/features/alert/interfaces.py:54
msgid "Visible?"
@@ -973,7 +968,8 @@
msgstr ""
#: ./src/pyams_content/component/paragraph/interfaces/pictogram.py:46
-#: ./src/pyams_content/shared/common/interfaces/types.py:67
+#: ./src/pyams_content/component/links/interfaces/__init__.py:43
+#: ./src/pyams_content/shared/common/interfaces/types.py:68
#: ./src/pyams_content/features/alert/interfaces.py:79
msgid "Pictogram"
msgstr ""
@@ -1272,67 +1268,67 @@
msgid "Presentation template used for associations"
msgstr ""
-#: ./src/pyams_content/component/links/__init__.py:104
+#: ./src/pyams_content/component/links/__init__.py:124
msgid "Internal link"
msgstr ""
-#: ./src/pyams_content/component/links/__init__.py:186
+#: ./src/pyams_content/component/links/__init__.py:206
msgid "External link"
msgstr ""
-#: ./src/pyams_content/component/links/__init__.py:239
+#: ./src/pyams_content/component/links/__init__.py:259
msgid "Mailto link"
msgstr ""
-#: ./src/pyams_content/component/links/__init__.py:173
+#: ./src/pyams_content/component/links/__init__.py:193
msgid "target is not published"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:57
+#: ./src/pyams_content/component/links/zmi/__init__.py:58
msgid "Internal links"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:72
+#: ./src/pyams_content/component/links/zmi/__init__.py:73
msgid "Add internal link"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:86
+#: ./src/pyams_content/component/links/zmi/__init__.py:87
msgid "Add new internal link"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:119
+#: ./src/pyams_content/component/links/zmi/__init__.py:122
msgid "Edit internal link properties"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:150
+#: ./src/pyams_content/component/links/zmi/__init__.py:155
msgid "External links"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:165
+#: ./src/pyams_content/component/links/zmi/__init__.py:170
msgid "Add external link"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:179
+#: ./src/pyams_content/component/links/zmi/__init__.py:184
msgid "Add new external link"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:212
+#: ./src/pyams_content/component/links/zmi/__init__.py:219
msgid "Edit external link properties"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:243
+#: ./src/pyams_content/component/links/zmi/__init__.py:252
msgid "Mailto links"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:258
+#: ./src/pyams_content/component/links/zmi/__init__.py:267
msgid "Add mailto link"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:272
+#: ./src/pyams_content/component/links/zmi/__init__.py:281
msgid "Add new mailto link"
msgstr ""
-#: ./src/pyams_content/component/links/zmi/__init__.py:305
+#: ./src/pyams_content/component/links/zmi/__init__.py:316
msgid "Edit mailto link properties"
msgstr ""
@@ -1344,41 +1340,45 @@
msgid "Content's internal links"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:34
+#: ./src/pyams_content/component/links/interfaces/__init__.py:36
msgid "Link title, as shown in front-office"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:38
+#: ./src/pyams_content/component/links/interfaces/__init__.py:40
msgid "Link description displayed by front-office template"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:55
+#: ./src/pyams_content/component/links/interfaces/__init__.py:44
+msgid "Name of the pictogram associated with this link"
+msgstr ""
+
+#: ./src/pyams_content/component/links/interfaces/__init__.py:64
#: ./src/pyams_content/shared/logo/interfaces/__init__.py:50
msgid "Target URL"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:56
+#: ./src/pyams_content/component/links/interfaces/__init__.py:65
#: ./src/pyams_content/shared/logo/interfaces/__init__.py:51
msgid "URL used to access external resource"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:60
-msgid "Language used in this remote resource"
-msgstr ""
-
-#: ./src/pyams_content/component/links/interfaces/__init__.py:68
-msgid "Target address"
-msgstr ""
-
#: ./src/pyams_content/component/links/interfaces/__init__.py:69
+msgid "Language used in this remote resource"
+msgstr ""
+
+#: ./src/pyams_content/component/links/interfaces/__init__.py:77
+msgid "Target address"
+msgstr ""
+
+#: ./src/pyams_content/component/links/interfaces/__init__.py:78
msgid "Target email address"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:72
+#: ./src/pyams_content/component/links/interfaces/__init__.py:81
msgid "Address name"
msgstr ""
-#: ./src/pyams_content/component/links/interfaces/__init__.py:73
+#: ./src/pyams_content/component/links/interfaces/__init__.py:82
msgid "Address as displayed in address book"
msgstr ""
@@ -2044,6 +2044,23 @@
"SEARCH - Between all contents published into « {site} »"
msgstr ""
+#: ./src/pyams_content/shared/common/zmi/portal.py:46
+msgid "Edit default template properties"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/zmi/portal.py:56
+msgid ""
+"**This form allows you to select shared content default template.**\n"
+"\n"
+"If you choose to use a shared template, you can only adjust settings of each portlet individually but can't change portlets list or page configuration.\n"
+"\n"
+"If you use a local template, you can define a whole custom configuration but the template definition can't be reused anywhere..."
+msgstr ""
+
+#: ./src/pyams_content/shared/common/zmi/portal.py:72
+msgid "Override tool default template"
+msgstr ""
+
#: ./src/pyams_content/shared/common/zmi/dashboard.py:134
msgid "Unique ID"
msgstr ""
@@ -2338,8 +2355,8 @@
#: ./src/pyams_content/shared/common/zmi/security.py:118
#: ./src/pyams_content/shared/common/zmi/security.py:270
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:251
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:276
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:260
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:285
msgid "Publication checks"
msgstr ""
@@ -2451,9 +2468,9 @@
#: ./src/pyams_content/shared/common/zmi/templates/check-input.pt:34
#: ./src/pyams_content/shared/common/zmi/templates/preview-input.pt:34
-#: ./src/pyams_content/shared/common/interfaces/types.py:39
+#: ./src/pyams_content/shared/common/interfaces/types.py:40
#: ./src/pyams_content/shared/form/zmi/field.py:159
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:61
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:62
msgid "Label"
msgstr ""
@@ -2645,270 +2662,270 @@
msgid "This content is already retired and not visible."
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:35
+#: ./src/pyams_content/shared/common/interfaces/types.py:36
#: ./src/pyams_content/shared/form/zmi/field.py:148
msgid "Name"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:36
+#: ./src/pyams_content/shared/common/interfaces/types.py:37
msgid "Name of this data type; must be unique between all data types"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:42
-msgid "Navigation label"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/types.py:43
+msgid "Navigation label"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/types.py:44
msgid "Label used for navigation entries"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:46
-msgid "Tab-folder label"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/types.py:47
+msgid "Tab-folder label"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/types.py:48
msgid "Label used to include into tab folder"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:50
-msgid "'See also' label"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/types.py:51
+msgid "'See also' label"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/types.py:52
msgid ""
"This label can be used when contents of this type will be displayed in a 'See"
" also' entries block"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:55
+#: ./src/pyams_content/shared/common/interfaces/types.py:56
msgid "'Single value' label"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:56
+#: ./src/pyams_content/shared/common/interfaces/types.py:57
msgid "Label given to this type when a single value is displayed"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:59
-msgid "'Link to list' label"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/types.py:60
+msgid "'Link to list' label"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/types.py:61
msgid "Label used to display a link to a list of items of this type"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:63
-msgid "Next content label"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/types.py:64
+msgid "Next content label"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/types.py:65
msgid "Label used to announce next date for this type"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:68
+#: ./src/pyams_content/shared/common/interfaces/types.py:69
msgid "Image associated to this data type"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/types.py:81
-msgid "Field names"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/types.py:82
+msgid "Field names"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/types.py:83
msgid "List of fields associated with this data type"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:45
-#: ./src/pyams_content/root/interfaces/__init__.py:40
-msgid "Webmasters"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:46
+#: ./src/pyams_content/root/interfaces/__init__.py:40
+msgid "Webmasters"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:47
msgid "Webmasters can handle all contents, including published ones"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:50
-msgid "Pilots"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:51
+msgid "Pilots"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:52
msgid ""
"Pilots can handle tool configuration, manage access rules, grant users roles "
"and manage managers restrictions"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:56
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:173
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:57
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:182
msgid "Managers"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:57
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:174
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:58
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:183
msgid ""
"Managers can handle main operations in tool's workflow, like publish or "
"retire contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:62
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:179
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:63
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:188
msgid "Contributors"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:63
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:64
msgid "Contributors are users which are allowed to create new contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:89
-msgid "Workflow name"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:90
+msgid "Workflow name"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:91
msgid "Name of workflow utility used to manage tool contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:114
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:119
msgid "Content URL"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:115
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:120
msgid ""
"URL used to access this content; this is important for SEO and should include"
" most important words describing content; spaces and underscores will be "
"automatically replaced by hyphens"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:120
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:125
msgid "Version creator"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:121
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:126
msgid ""
"Name of content's version creator. The creator of the first version is also "
"it's owner."
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:125
-msgid "First owner"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:126
-msgid "Name of content's first version owner"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:130
+msgid "First owner"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:131
+msgid "Name of content's first version owner"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:135
msgid "Version creation"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:133
-msgid "Version modifiers"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:134
-msgid "List of principals who modified this content"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:137
-msgid "Last modifier"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:138
+msgid "Version modifiers"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:139
+msgid "List of principals who modified this content"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:142
+msgid "Last modifier"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:143
msgid "Last principal who modified this content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:141
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:146
msgid "Last update"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:145
-msgid ""
-"The content's description is 'hidden' into HTML's page headers; but it can be"
-" seen, for example, in some search engines results as content's description"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:150
+msgid ""
+"The content's description is 'hidden' into HTML's page headers; but it can be"
+" seen, for example, in some search engines results as content's description"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:155
msgid "Keywords"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:151
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:156
msgid "They will be included into HTML pages metadata"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:154
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:159
#: ./src/pyams_content/shared/site/zmi/folder.py:76
#: ./src/pyams_content/shared/site/interfaces/__init__.py:66
msgid "Notepad"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:155
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:160
#: ./src/pyams_content/shared/site/zmi/folder.py:77
#: ./src/pyams_content/shared/site/interfaces/__init__.py:67
msgid "Internal information to be known about this content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:166
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:175
msgid "Content owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:167
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:176
msgid ""
"The owner is the creator of content's first version, except if it was "
"transferred afterwards to another owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:180
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:189
msgid ""
"Contributors are users which are allowed to update this content in addition "
"to it's owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:185
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:194
msgid "Readers"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:186
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:195
msgid ""
"Readers are users which are asked to verify and comment contents before they "
"are published"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:191
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:200
msgid "Guests"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:192
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:201
msgid ""
"Guests are users which are allowed to view contents with restricted access"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:212
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:221
msgid "Principal ID"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:252
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:261
msgid ""
"If 'yes', this contributor will have to confirm that contents have been "
"previewed and checked before asking for publication"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:277
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:286
msgid ""
"If 'yes', this manager will have to confirm that contents have been previewed"
" and checked before publishing a content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:282
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:291
msgid "Restricted contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:283
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:292
msgid ""
"If 'yes', this manager will get restricted access to manage contents based on"
" selected settings"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:288
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:297
msgid "Selected owners"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:289
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:298
msgid "Manager will have access to contents owned by these principals"
msgstr ""
@@ -2995,7 +3012,7 @@
msgstr ""
#: ./src/pyams_content/shared/form/zmi/field.py:170
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:56
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:57
msgid "Field type"
msgstr ""
@@ -3024,135 +3041,135 @@
msgid "Specified name is already used!"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:34
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:35
msgid "Form"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:52
-msgid "Field name"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:53
+msgid "Field name"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:54
msgid "Field internal name; must be unique for a given form"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:57
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:58
msgid "Selected field type"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:62
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:63
msgid "User field label"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:66
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:67
msgid "Field description can be displayed as hint"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:69
-msgid "Placeholder"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:70
+msgid "Placeholder"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:71
msgid "Some field types like textline can display a placeholder"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:73
-msgid "Optional values"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:74
+msgid "Optional values"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:75
msgid "List of available values (for 'choice' and 'list' field types)"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:77
-msgid "Default value"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:78
+msgid "Default value"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:79
msgid "Give default value if field type can use it"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:81
-msgid "Required?"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:82
+msgid "Required?"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:83
msgid "Select 'yes' to set field as mandatory"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:87
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:88
msgid "Select 'no' to hide given field..."
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:121
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:122
msgid "Form title"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:124
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:125
msgid "Form header"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:127
-msgid "Form handler"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:128
+msgid "Form handler"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:129
msgid "Select how form data is transmitted"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:131
-msgid "Authenticated only?"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:132
+msgid "Authenticated only?"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:133
msgid "If 'yes', only authenticated users will be able to see and submit form"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:136
-msgid "Use captcha?"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:137
+msgid "Use captcha?"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:138
msgid "If 'yes', a captcha will be added automatically to the form"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:141
-msgid "Submit label"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:142
+msgid "Submit label"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:143
msgid "Label of form submit button"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:179
-msgid "Source address"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:180
+msgid "Source address"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:181
msgid "Mail address from which form data is sent"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:183
-msgid "Source name"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:184
+msgid "Source name"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:185
msgid "Name of mail data sender"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:187
-msgid "Recipient address"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:188
+msgid "Recipient address"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:189
msgid "Mail address to which form data is sent"
msgstr ""
-#: ./src/pyams_content/shared/form/interfaces/__init__.py:191
-msgid "Recipient name"
-msgstr ""
-
#: ./src/pyams_content/shared/form/interfaces/__init__.py:192
+msgid "Recipient name"
+msgstr ""
+
+#: ./src/pyams_content/shared/form/interfaces/__init__.py:193
msgid "Name of data recipient"
msgstr ""
@@ -3170,7 +3187,7 @@
msgid "News topic « {title} »"
msgstr ""
-#: ./src/pyams_content/shared/news/interfaces/__init__.py:28
+#: ./src/pyams_content/shared/news/interfaces/__init__.py:29
msgid "News topic"
msgstr ""
@@ -3463,7 +3480,7 @@
msgid "Image map template"
msgstr ""
-#: ./src/pyams_content/shared/site/folder.py:58
+#: ./src/pyams_content/shared/site/folder.py:57
msgid "Site folder"
msgstr ""
@@ -4226,6 +4243,11 @@
msgid "References"
msgstr ""
+#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:172
+#: ./src/pyams_content/reference/pictograms/zmi/widget.py:55
+msgid "Default header: --"
+msgstr ""
+
#: ./src/pyams_content/reference/pictograms/zmi/manager.py:51
msgid "Pictograms selection..."
msgstr ""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/reference/pictograms/manager.py
--- a/src/pyams_content/reference/pictograms/manager.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/reference/pictograms/manager.py Tue Jun 12 10:57:46 2018 +0200
@@ -54,12 +54,16 @@
terms = []
table = query_utility(IPictogramTable)
if table is not None:
+ request = check_request()
target = get_parent(context, IPictogramManagerTarget)
if target is not None:
- request = check_request()
manager = IPictogramManager(target)
pictograms = [table.get(name) for name in manager.selected_pictograms]
terms = [SimpleTerm(v.__name__,
title=II18n(v).query_attribute('title', request=request))
for v in pictograms if v is not None]
+ else:
+ terms = [SimpleTerm(v.__name__,
+ title=II18n(v).query_attribute('title', request=request))
+ for v in table.values()]
super(SelectedPictogramsVocabulary, self).__init__(terms)
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/reference/pictograms/zmi/__init__.py
--- a/src/pyams_content/reference/pictograms/zmi/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/reference/pictograms/zmi/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -43,7 +43,7 @@
from pyams_utils.url import absolute_url
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
-from pyramid.httpexceptions import HTTPNotFound, HTTPBadRequest
+from pyramid.httpexceptions import HTTPNotFound
from pyramid.renderers import render, render_to_response
from pyramid.response import Response
from pyramid.view import view_config
@@ -166,11 +166,9 @@
permission=VIEW_SYSTEM_PERMISSION)
def get_pictogram_header_view(request):
"""View used to get thumbnail and alternate label associated with a given pictogram"""
+ translate = request.localizer.translate
name = request.params.get('value')
- if not name:
- raise HTTPBadRequest()
- translate = request.localizer.translate
- if name == '--NOVALUE--':
+ if (not name) or (name == '--NOVALUE--'):
return Response(translate(_("Default header: --")))
pictogram = request.context.get(name)
if pictogram is None:
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/reference/pictograms/zmi/widget.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/reference/pictograms/zmi/widget.py Tue Jun 12 10:57:46 2018 +0200
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2008-2018 Thierry Florac
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_content.reference.pictograms import IPictogramTable
+from pyams_utils.interfaces.data import IObjectData
+
+# import packages
+from pyams_content.reference.pictograms.zmi import get_pictogram_header
+from pyams_utils.registry import query_utility
+from pyams_utils.url import absolute_url
+from z3c.form.browser.select import SelectWidget
+from z3c.form.widget import FieldWidget
+from zope.interface import implementer
+
+from pyams_content import _
+
+
+@implementer(IObjectData)
+class PictogramSelectWidget(SelectWidget):
+ """Pictogram selection widget"""
+
+ pictograms = None
+ label_id = None
+ after_widget_notice = None
+
+ def update(self):
+ super(PictogramSelectWidget, self).update()
+ self.label_id = '{0}_header'.format(self.id)
+ self.pictograms = query_utility(IPictogramTable)
+ if self.value and (self.pictograms is not None):
+ pictogram = self.pictograms.get(self.value[0])
+ if pictogram is not None:
+ self.after_widget_notice = '{1}'.format(
+ self.label_id,
+ get_pictogram_header(pictogram, self.request))
+ return
+ self.after_widget_notice = '{1}'.format(
+ self.label_id,
+ self.request.localizer.translate(_("Default header: --")))
+
+ @property
+ def object_data(self):
+ return {
+ 'ams-change-handler': 'MyAMS.helpers.select2ChangeHelper',
+ 'ams-stop-propagation': 'true',
+ 'ams-select2-helper-type': 'html',
+ 'ams-select2-helper-url': absolute_url(self.pictograms, self.request, 'get-pictogram-header.html'),
+ 'ams-select2-helper-target': '#{0}'.format(self.label_id)
+ }
+
+
+def PictogramSelectFieldWidget(field, request):
+ return FieldWidget(field, PictogramSelectWidget(request))
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/blog/__init__.py
--- a/src/pyams_content/shared/blog/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/blog/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -23,18 +23,16 @@
from pyams_content.features.review.interfaces import IReviewTarget
from pyams_content.shared.blog.interfaces import IWfBlogPost, BLOG_CONTENT_TYPE, BLOG_CONTENT_NAME, IBlogPost, \
IWfBlogPostFactory
-from pyams_portal.interfaces import IPortalContext, IPortalPage, PORTAL_PAGE_KEY
from pyams_workflow.interfaces import IWorkflow, IWorkflowVersions, IWorkflowState
# import packages
from pyams_content.shared.common import WfSharedContent, register_content_type, SharedContent, IWfSharedContentFactory
-from pyams_content.shared.common.portal import SharedContentPortalPage
-from pyams_utils.adapter import adapter_config, get_annotation_adapter
+from pyams_utils.adapter import adapter_config
from zope.interface import implementer, provider
@implementer(IWfBlogPost, IParagraphContainerTarget, IThemesTarget, IIllustrationTarget,
- IPortalContext, IPreviewTarget, IReviewTarget)
+ IPreviewTarget, IReviewTarget)
class WfBlogPost(WfSharedContent):
"""Base blog post"""
@@ -60,9 +58,3 @@
@adapter_config(context=IWfBlogPostFactory, provides=IWfSharedContentFactory)
def blog_post_content_factory(context):
return WfBlogPost
-
-
-@adapter_config(context=IWfBlogPost, provides=IPortalPage)
-def blog_post_portal_page_adapter(context):
- """Blog post portal page adapter"""
- return get_annotation_adapter(context, PORTAL_PAGE_KEY, SharedContentPortalPage)
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/blog/interfaces/__init__.py
--- a/src/pyams_content/shared/blog/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/blog/interfaces/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -16,8 +16,8 @@
# import standard library
# import interfaces
-from pyams_content.shared.common.interfaces import ISharedSite, IBaseSharedTool, IWfSharedContent, ISharedContent, \
- IDeletableElement
+from pyams_content.shared.common.interfaces import ISharedSite, IBaseSharedTool, ISharedContent, \
+ IDeletableElement, IWfSharedContentPortalContext
from pyams_sequence.interfaces import ISequentialIdTarget
from pyams_workflow.interfaces import IWorkflowPublicationSupport
from zope.container.interfaces import IContainer
@@ -33,7 +33,7 @@
BLOG_CONTENT_NAME = _("Blog post")
-class IWfBlogPost(IWfSharedContent):
+class IWfBlogPost(IWfSharedContentPortalContext):
"""Blog topic interface"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/common/interfaces/__init__.py
--- a/src/pyams_content/shared/common/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/common/interfaces/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -9,6 +9,7 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
+from pyams_portal.interfaces import IPortalContext
__docformat__ = 'restructuredtext'
@@ -101,6 +102,10 @@
shared_content_factory = Attribute("Shared data factory")
+class ISharedToolPortalContext(ISharedTool, IPortalContext):
+ """Shared tool with portal context"""
+
+
class ISharedToolRoles(IBaseContentManagerRoles):
"""Shared tool roles"""
@@ -156,6 +161,10 @@
required=False)
+class IWfSharedContentPortalContext(IWfSharedContent, IPortalContext):
+ """Shared content with portal support"""
+
+
class IWfSharedContentFactory(Interface):
"""Shared content factory interface"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/common/interfaces/types.py
--- a/src/pyams_content/shared/common/interfaces/types.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/common/interfaces/types.py Tue Jun 12 10:57:46 2018 +0200
@@ -17,6 +17,7 @@
# import interfaces
from pyams_content.shared.common.interfaces import ISharedTool
+from pyams_portal.interfaces import IPortalContext
from zope.container.interfaces import IContainer
from zope.location.interfaces import ILocation
@@ -100,3 +101,7 @@
"""Shared tool containing typed data"""
shared_content_types_fields = Attribute("Content fields interface")
+
+
+class ITypedSharedToolPortalContext(ITypedSharedTool, IPortalContext):
+ """Typed shared tool with portal context"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/common/portal.py
--- a/src/pyams_content/shared/common/portal.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/common/portal.py Tue Jun 12 10:57:46 2018 +0200
@@ -16,11 +16,12 @@
# import standard library
# import interfaces
-from pyams_content.shared.common.interfaces import IBaseSharedTool
-from pyams_portal.interfaces import IPortalPage
+from pyams_content.shared.common.interfaces import IBaseSharedTool, IWfSharedContentPortalContext
+from pyams_portal.interfaces import IPortalPage, PORTAL_PAGE_KEY
# import packages
from pyams_portal.page import PortalPage
+from pyams_utils.adapter import adapter_config, get_annotation_adapter
from pyams_utils.traversing import get_parent
@@ -34,3 +35,9 @@
@property
def parent(self):
return get_parent(self, IBaseSharedTool, allow_context=False)
+
+
+@adapter_config(context=IWfSharedContentPortalContext, provides=IPortalPage)
+def shared_content_portal_page_adapter(context):
+ """Shared content portal page adapter"""
+ return get_annotation_adapter(context, PORTAL_PAGE_KEY, SharedContentPortalPage)
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/common/zmi/portal.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/shared/common/zmi/portal.py Tue Jun 12 10:57:46 2018 +0200
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2008-2018 Thierry Florac
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_content.shared.common import IWfSharedContent
+from pyams_content.shared.common.interfaces import IWfSharedContentPortalContext, ISharedToolPortalContext, ISharedTool
+from pyams_content.shared.common.interfaces.types import ITypedSharedToolPortalContext
+from pyams_form.interfaces.form import IFormHelp
+from pyams_skin.layer import IPyAMSLayer
+from pyams_zmi.layer import IAdminLayer
+
+# import packages
+from pyams_form.form import ajax_config
+from pyams_form.help import FormHelp
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_portal import MANAGE_TEMPLATE_PERMISSION
+from pyams_portal.zmi.page import PortalContextTemplatePropertiesEditForm
+from pyams_utils.adapter import adapter_config
+
+from pyams_content import _
+
+
+@pagelet_config(name='template-properties.html', context=ISharedToolPortalContext, layer=IPyAMSLayer,
+ permission=MANAGE_TEMPLATE_PERMISSION)
+@pagelet_config(name='template-properties.html', context=ITypedSharedToolPortalContext, layer=IPyAMSLayer,
+ permission=MANAGE_TEMPLATE_PERMISSION)
+@ajax_config(name='template-properties.json', context=ISharedToolPortalContext, layer=IPyAMSLayer)
+@ajax_config(name='template-properties.json', context=ITypedSharedToolPortalContext, layer=IPyAMSLayer)
+class SharedToolTemplatePropertiesEditForm(PortalContextTemplatePropertiesEditForm):
+ """Shared content template properties edit form"""
+
+ legend = _("Edit default template properties")
+
+
+@adapter_config(context=(ISharedToolPortalContext, IAdminLayer, SharedToolTemplatePropertiesEditForm),
+ provides=IFormHelp)
+@adapter_config(context=(ITypedSharedToolPortalContext, IAdminLayer, SharedToolTemplatePropertiesEditForm),
+ provides=IFormHelp)
+class SharedToolPortalContextPropertiesEditFormHelpAdapter(FormHelp):
+ """Shared tool template properties edit form help adapter"""
+
+ message = _("**This form allows you to select shared content default template.**\n"
+ "\n"
+ "If you choose to use a shared template, you can only adjust settings of "
+ "each portlet individually but can't change portlets list or page configuration.\n"
+ "\n"
+ "If you use a local template, you can define a whole custom "
+ "configuration but the template definition can't be reused anywhere...""")
+ message_format = 'rest'
+
+
+@pagelet_config(name='template-properties.html', context=IWfSharedContentPortalContext, layer=IPyAMSLayer,
+ permission=MANAGE_TEMPLATE_PERMISSION)
+@ajax_config(name='template-properties.json', context=IWfSharedContent, layer=IPyAMSLayer)
+class SharedContentTemplatePropertiesEditForm(PortalContextTemplatePropertiesEditForm):
+ """Shared content template properties edit form"""
+
+ override_legend = _("Override tool default template")
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/form/__init__.py
--- a/src/pyams_content/shared/form/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/form/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -21,13 +21,11 @@
from pyams_content.features.review.interfaces import IReviewTarget
from pyams_content.shared.form.interfaces import IWfForm, IForm, FORM_CONTENT_TYPE, FORM_CONTENT_NAME, \
IFormFieldContainerTarget, IFormHandler, IFormFieldContainer, IWfFormFactory
-from pyams_portal.interfaces import IPortalPage, PORTAL_PAGE_KEY, IPortalContext
# import packages
from pyams_content.shared.common import WfSharedContent, SharedContent, register_content_type, WfSharedContentChecker, \
IWfSharedContentFactory
-from pyams_content.shared.common.portal import SharedContentPortalPage
-from pyams_utils.adapter import adapter_config, get_annotation_adapter
+from pyams_utils.adapter import adapter_config
from pyams_utils.registry import get_global_registry
from zope.interface import implementer, provider, alsoProvides, noLongerProvides
from zope.schema.fieldproperty import FieldProperty
@@ -36,7 +34,7 @@
@implementer(IWfForm, IFormFieldContainerTarget,
- IPortalContext, IPreviewTarget, IReviewTarget)
+ IPreviewTarget, IReviewTarget)
class WfForm(WfSharedContent):
"""Base form"""
@@ -90,12 +88,6 @@
return WfForm
-@adapter_config(context=IWfForm, provides=IPortalPage)
-def form_portal_page_adapter(context):
- """Form portal page adapter"""
- return get_annotation_adapter(context, PORTAL_PAGE_KEY, SharedContentPortalPage)
-
-
@adapter_config(name='properties', context=IWfForm, provides=IContentChecker)
class WfFormContentChecker(WfSharedContentChecker):
"""Form content checker"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/form/interfaces/__init__.py
--- a/src/pyams_content/shared/form/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/form/interfaces/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -16,7 +16,8 @@
# import standard library
# import interfaces
-from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, ISharedContent
+from pyams_content.shared.common.interfaces import ISharedContent, IWfSharedContentPortalContext, \
+ ISharedToolPortalContext
from zope.annotation.interfaces import IAttributeAnnotatable
from zope.container.interfaces import IContainer, IContained
@@ -36,7 +37,7 @@
FORM_FIELD_CONTAINER_KEY = 'pyams_content.shared.form_fields'
-class IFormsManager(ISharedTool):
+class IFormsManager(ISharedToolPortalContext):
"""Forms manager interface"""
@@ -115,7 +116,7 @@
"""Form fields container target marker interface"""
-class IWfForm(IWfSharedContent):
+class IWfForm(IWfSharedContentPortalContext):
"""Form interface"""
user_title = I18nTextLineField(title=_("Form title"),
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/form/manager.py
--- a/src/pyams_content/shared/form/manager.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/form/manager.py Tue Jun 12 10:57:46 2018 +0200
@@ -32,7 +32,7 @@
from zope.interface import implementer
-@implementer(IFormsManager, IPortalContext)
+@implementer(IFormsManager)
class FormsManager(SharedTool):
"""Forms manager class"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/news/__init__.py
--- a/src/pyams_content/shared/news/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/news/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -23,17 +23,15 @@
from pyams_content.features.review.interfaces import IReviewTarget
from pyams_content.shared.news.interfaces import INewsEvent, IWfNewsEvent, NEWS_CONTENT_TYPE, NEWS_CONTENT_NAME, \
IWfNewsEventFactory
-from pyams_portal.interfaces import IPortalContext, IPortalPage, PORTAL_PAGE_KEY
# import packages
from pyams_content.shared.common import SharedContent, WfSharedContent, register_content_type, IWfSharedContentFactory
-from pyams_content.shared.common.portal import SharedContentPortalPage
-from pyams_utils.adapter import adapter_config, get_annotation_adapter
+from pyams_utils.adapter import adapter_config
from zope.interface import implementer, provider
@implementer(IWfNewsEvent, IIllustrationTarget, IParagraphContainerTarget, IThemesTarget,
- IPortalContext, IPreviewTarget, IReviewTarget)
+ IPreviewTarget, IReviewTarget)
class WfNewsEvent(WfSharedContent):
"""Base news event"""
@@ -52,9 +50,3 @@
@adapter_config(context=IWfNewsEventFactory, provides=IWfSharedContentFactory)
def news_event_content_factory(context):
return WfNewsEvent
-
-
-@adapter_config(context=IWfNewsEvent, provides=IPortalPage)
-def news_event_portal_page_adapter(context):
- """News event portal page adapter"""
- return get_annotation_adapter(context, PORTAL_PAGE_KEY, SharedContentPortalPage)
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/news/interfaces/__init__.py
--- a/src/pyams_content/shared/news/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/news/interfaces/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -16,7 +16,8 @@
# import standard library
# import interfaces
-from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, ISharedContent
+from pyams_content.shared.common.interfaces import ISharedContent, \
+ IWfSharedContentPortalContext, ISharedToolPortalContext
# import packages
from zope.interface import Interface
@@ -28,7 +29,7 @@
NEWS_CONTENT_NAME = _("News topic")
-class INewsManager(ISharedTool):
+class INewsManager(ISharedToolPortalContext):
"""News manager interface"""
@@ -36,7 +37,7 @@
"""News manager factory interface"""
-class IWfNewsEvent(IWfSharedContent):
+class IWfNewsEvent(IWfSharedContentPortalContext):
"""News event interface"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/news/manager.py
--- a/src/pyams_content/shared/news/manager.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/news/manager.py Tue Jun 12 10:57:46 2018 +0200
@@ -21,7 +21,6 @@
from pyams_content.reference.pictograms.interfaces import IPictogramManagerTarget
from pyams_content.shared.common.interfaces import ISharedContentFactory
from pyams_content.shared.news.interfaces import INewsManager, NEWS_CONTENT_TYPE, INewsManagerFactory
-from pyams_portal.interfaces import IPortalContext
from zope.component.interfaces import ISite
from zope.lifecycleevent.interfaces import IObjectAddedEvent
@@ -36,8 +35,7 @@
from zope.schema.fieldproperty import FieldProperty
-@implementer(INewsManager, IParagraphFactorySettings, IThemesManagerTarget, IPictogramManagerTarget,
- IPortalContext)
+@implementer(INewsManager, IParagraphFactorySettings, IThemesManagerTarget, IPictogramManagerTarget)
class NewsManager(SharedTool):
"""News manager class"""
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/site/__init__.py
--- a/src/pyams_content/shared/site/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/site/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -23,18 +23,16 @@
from pyams_content.features.review.interfaces import IReviewTarget
from pyams_content.shared.site.interfaces import ITopic, IWfTopic, TOPIC_CONTENT_NAME, \
TOPIC_CONTENT_TYPE, IWfTopicFactory
-from pyams_portal.interfaces import IPortalContext, IPortalPage, PORTAL_PAGE_KEY
from pyams_workflow.interfaces import IWorkflow, IWorkflowVersions, IWorkflowState
# import packages
from pyams_content.shared.common import SharedContent, WfSharedContent, register_content_type, IWfSharedContentFactory
-from pyams_content.shared.common.portal import SharedContentPortalPage
-from pyams_utils.adapter import adapter_config, get_annotation_adapter
+from pyams_utils.adapter import adapter_config
from zope.interface import implementer, provider
-@implementer(IWfTopic, IParagraphContainerTarget, IThemesTarget, IIllustrationTarget,
- IPortalContext, IPreviewTarget, IReviewTarget)
+@implementer(IWfTopic, IIllustrationTarget, IParagraphContainerTarget, IThemesTarget,
+ IPreviewTarget, IReviewTarget)
class WfTopic(WfSharedContent):
"""Base topic"""
@@ -62,9 +60,3 @@
@adapter_config(context=IWfTopicFactory, provides=IWfSharedContentFactory)
def topic_content_factory(context):
return WfTopic
-
-
-@adapter_config(context=IWfTopic, provides=IPortalPage)
-def topic_portal_page_adapter(context):
- """Topic portal page adapter"""
- return get_annotation_adapter(context, PORTAL_PAGE_KEY, SharedContentPortalPage)
diff -r cffd13804aa8 -r 93f8b735357a src/pyams_content/shared/site/interfaces/__init__.py
--- a/src/pyams_content/shared/site/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
+++ b/src/pyams_content/shared/site/interfaces/__init__.py Tue Jun 12 10:57:46 2018 +0200
@@ -22,8 +22,8 @@
from zope.container.interfaces import IContainer, IContained
# import packages
-from pyams_content.shared.common.interfaces import ISharedSite, IWfSharedContent, ISharedContent, \
- IBaseContentManagerRoles, IBaseSharedTool, IDeletableElement
+from pyams_content.shared.common.interfaces import ISharedSite, ISharedContent, \
+ IBaseContentManagerRoles, IBaseSharedTool, IDeletableElement, IWfSharedContentPortalContext
from pyams_i18n.schema import I18nTextLineField, I18nTextField
from zope.container.constraints import containers, contains
from zope.interface import Interface, Attribute
@@ -95,7 +95,7 @@
TOPIC_CONTENT_NAME = _("Topic")
-class IWfTopic(IWfSharedContent):
+class IWfTopic(IWfSharedContentPortalContext):
"""Topic interface"""