# HG changeset patch
# User Damien Correia
# Date 1528726481 -7200
# Node ID cffd13804aa84b249c38f74839f3ef4181a498d8
# Parent b977c7da30741d331256f8bc4cf3213a3702cfba# Parent 7de4aaf90bffe27a12d4eb5511434b4f4049b572
merge default
diff -r b977c7da3074 -r cffd13804aa8 .hgtags
--- a/.hgtags Mon Jun 11 10:00:17 2018 +0200
+++ b/.hgtags Mon Jun 11 16:14:41 2018 +0200
@@ -15,3 +15,4 @@
d73905f6a2eb2949b3979671bf261965473bb7b9 0.1.11
5d94baef6923642af27a9f30f377d45f67f04bbf 0.1.12
cf2d19055dd754ce3ed30be24f83dae351b3ae5c 0.1.13
+95026785904d443509d93895ddf761b7967d9d46 0.1.14
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content.egg-info/PKG-INFO
--- a/src/pyams_content.egg-info/PKG-INFO Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content.egg-info/PKG-INFO Mon Jun 11 16:14:41 2018 +0200
@@ -75,6 +75,10 @@
0.1.14
------
+ - added header and footer management features
+ - added renderer for each kind of paragraphs
+ - added preview for a each paragraph one by one
+ - added optional checks before publishing content
- updated groups management in forms
0.1.13
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content.egg-info/SOURCES.txt
--- a/src/pyams_content.egg-info/SOURCES.txt Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content.egg-info/SOURCES.txt Mon Jun 11 16:14:41 2018 +0200
@@ -50,6 +50,7 @@
src/pyams_content/component/links/zmi/reverse.py
src/pyams_content/component/media/__init__.py
src/pyams_content/component/paragraph/__init__.py
+src/pyams_content/component/paragraph/audio.py
src/pyams_content/component/paragraph/contact.py
src/pyams_content/component/paragraph/container.py
src/pyams_content/component/paragraph/frame.py
@@ -62,6 +63,7 @@
src/pyams_content/component/paragraph/verbatim.py
src/pyams_content/component/paragraph/video.py
src/pyams_content/component/paragraph/interfaces/__init__.py
+src/pyams_content/component/paragraph/interfaces/audio.py
src/pyams_content/component/paragraph/interfaces/contact.py
src/pyams_content/component/paragraph/interfaces/frame.py
src/pyams_content/component/paragraph/interfaces/header.py
@@ -73,6 +75,7 @@
src/pyams_content/component/paragraph/interfaces/verbatim.py
src/pyams_content/component/paragraph/interfaces/video.py
src/pyams_content/component/paragraph/zmi/__init__.py
+src/pyams_content/component/paragraph/zmi/audio.py
src/pyams_content/component/paragraph/zmi/contact.py
src/pyams_content/component/paragraph/zmi/container.py
src/pyams_content/component/paragraph/zmi/frame.py
@@ -87,10 +90,8 @@
src/pyams_content/component/paragraph/zmi/verbatim.py
src/pyams_content/component/paragraph/zmi/video.py
src/pyams_content/component/paragraph/zmi/templates/associations.pt
-src/pyams_content/component/paragraph/zmi/templates/html-render.pt
src/pyams_content/component/paragraph/zmi/templates/paragraph-title-icon.pt
src/pyams_content/component/paragraph/zmi/templates/paragraph-title-toolbar.pt
-src/pyams_content/component/paragraph/zmi/templates/raw-render.pt
src/pyams_content/component/theme/__init__.py
src/pyams_content/component/theme/portlet.py
src/pyams_content/component/theme/interfaces/__init__.py
@@ -113,7 +114,6 @@
src/pyams_content/component/video/provider/zmi/templates/youtube-render.pt
src/pyams_content/component/video/zmi/__init__.py
src/pyams_content/component/video/zmi/paragraph.py
-src/pyams_content/component/video/zmi/templates/video-render.pt
src/pyams_content/component/video/zmi/templates/video-settings.pt
src/pyams_content/doctests/README.txt
src/pyams_content/features/__init__.py
@@ -129,6 +129,7 @@
src/pyams_content/features/footer/interfaces/__init__.py
src/pyams_content/features/footer/skin/__init__.py
src/pyams_content/features/footer/zmi/__init__.py
+src/pyams_content/features/footer/zmi/__init__.py.orig
src/pyams_content/features/footer/zmi/templates/renderer-settings.pt
src/pyams_content/features/header/__init__.py
src/pyams_content/features/header/interfaces/__init__.py
@@ -159,6 +160,12 @@
src/pyams_content/locales/pyams_content.pot
src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.mo
src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po
+src/pyams_content/portlet/__init__.py
+src/pyams_content/portlet/content/__init__.py
+src/pyams_content/portlet/content/interfaces.py
+src/pyams_content/portlet/content/skin/__init__.py
+src/pyams_content/portlet/content/zmi/__init__.py
+src/pyams_content/portlet/content/zmi/preview.pt
src/pyams_content/profile/__init__.py
src/pyams_content/profile/admin.py
src/pyams_content/profile/interfaces/__init__.py
@@ -171,6 +178,7 @@
src/pyams_content/reference/pictograms/zmi/__init__.py
src/pyams_content/reference/pictograms/zmi/manager.py
src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt
+src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt
src/pyams_content/reference/zmi/__init__.py
src/pyams_content/reference/zmi/table.py
src/pyams_content/root/__init__.py
@@ -190,6 +198,7 @@
src/pyams_content/shared/blog/zmi/manager.py
src/pyams_content/shared/common/__init__.py
src/pyams_content/shared/common/manager.py
+src/pyams_content/shared/common/portal.py
src/pyams_content/shared/common/security.py
src/pyams_content/shared/common/types.py
src/pyams_content/shared/common/interfaces/__init__.py
@@ -209,8 +218,10 @@
src/pyams_content/shared/common/zmi/types.py
src/pyams_content/shared/common/zmi/workflow.py
src/pyams_content/shared/common/zmi/templates/advanced-search.pt
+src/pyams_content/shared/common/zmi/templates/check-input.pt
src/pyams_content/shared/common/zmi/templates/dashboard.pt
src/pyams_content/shared/common/zmi/templates/header.pt
+src/pyams_content/shared/common/zmi/templates/preview-input.pt
src/pyams_content/shared/common/zmi/templates/wf-archive-message.pt
src/pyams_content/shared/common/zmi/templates/wf-archiving-message.pt
src/pyams_content/shared/common/zmi/templates/wf-cancel-archiving-message.pt
@@ -302,7 +313,6 @@
src/pyams_content/skin/resources/js/jquery-imagemapster-1.2.10.min.js
src/pyams_content/skin/resources/js/pyams_content.js
src/pyams_content/skin/resources/js/pyams_content.min.js
-src/pyams_content/skin/resources/js/pyams_content.min.min.js
src/pyams_content/skin/resources/js/tinymce/onflinks/plugin.js
src/pyams_content/skin/resources/js/tinymce/onflinks/plugin.min.js
src/pyams_content/skin/resources/js/tinymce/onflinks/langs/fr.js
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content.egg-info/requires.txt
--- a/src/pyams_content.egg-info/requires.txt Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content.egg-info/requires.txt Mon Jun 11 16:14:41 2018 +0200
@@ -14,7 +14,7 @@
pyams_skin
pyams_template
pyams_thesaurus
-pyams_utils
+pyams_utils>=0.1.15
pyams_viewlet
pyams_workflow
pyams_zmi
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/component/paragraph/zmi/milestone.py
--- a/src/pyams_content/component/paragraph/zmi/milestone.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/milestone.py Mon Jun 11 16:14:41 2018 +0200
@@ -304,7 +304,7 @@
@pagelet_config(name='add-milestone.html', context=IMilestoneContainerTarget, layer=IPyAMSLayer,
permission=MANAGE_CONTENT_PERMISSION)
-@ajax_config(name='add-milestone.json', context=IParagraphContainerTarget, layer=IPyAMSLayer,
+@ajax_config(name='add-milestone.json', context=IMilestoneContainerTarget, layer=IPyAMSLayer,
base=AJAXAddForm)
class MilestoneAddForm(AdminDialogAddForm):
"""Milestone add form"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/component/paragraph/zmi/pictogram.py
--- a/src/pyams_content/component/paragraph/zmi/pictogram.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/pictogram.py Mon Jun 11 16:14:41 2018 +0200
@@ -9,6 +9,7 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
+from pyams_content.reference.pictograms.zmi import get_pictogram_header
__docformat__ = 'restructuredtext'
@@ -387,12 +388,11 @@
widget = self.widgets['pictogram_name']
widget.required = True
if pictogram is None:
- widget.after_widget_notice = '{1}'.format(label_id, '--')
+ widget.after_widget_notice = '--'.format(label_id)
else:
widget.after_widget_notice = '{1}'.format(
label_id,
- self.request.localizer.translate(_("Default header: {0}")).format(
- II18n(pictogram).query_attribute('header', request=self.request) or '--'))
+ get_pictogram_header(pictogram, self.request))
widget.object_data = {
'ams-change-handler': 'MyAMS.helpers.select2ChangeHelper',
'ams-stop-propagation': 'true',
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/component/paragraph/zmi/preview.py
--- a/src/pyams_content/component/paragraph/zmi/preview.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/preview.py Mon Jun 11 16:14:41 2018 +0200
@@ -37,7 +37,8 @@
super(ParagraphsContainerRenderer, self).__init__(context, request)
paragraphs = [para for para in IParagraphContainer(self.context).values()
if para.visible]
- self.renderers = [self.request.registry.queryMultiAdapter((paragraph, self.request), IParagraphRenderer)
+ registry = self.request.registry
+ self.renderers = [registry.queryMultiAdapter((paragraph, self.request), IParagraphRenderer)
for paragraph in paragraphs]
def update(self):
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/component/theme/zmi/__init__.py
--- a/src/pyams_content/component/theme/zmi/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/component/theme/zmi/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -88,7 +88,7 @@
def get_subterms(self, term):
for subterm in term.specifics:
- if self.extract_name in subterm.extracts:
+ if (not self.extract_name) or (self.extract_name in subterm.extracts):
yield subterm
for another in self.get_subterms(subterm):
yield another
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/features/review/__init__.py
--- a/src/pyams_content/features/review/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/features/review/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -22,7 +22,6 @@
from pyams_content.interfaces import READER_ROLE
from pyams_content.features.review.interfaces import IReviewManager, IReviewComment, IReviewComments, \
REVIEW_COMMENTS_ANNOTATION_KEY, CommentAddedEvent, ICommentAddedEvent, IReviewTarget
-from pyams_content.shared.common.interfaces import IWfSharedContentRoles
from pyams_i18n.interfaces import II18n
from pyams_mail.interfaces import IPrincipalMailInfo
from pyams_security.interfaces import ISecurityManager, IProtectedObject
@@ -124,6 +123,8 @@
def ask_review(self, reviewers, comment, notify_all=True):
"""Ask for content review"""
+ from pyams_content.shared.common.interfaces import IWfSharedContentRoles
+
roles = IWfSharedContentRoles(self.context, None)
if roles is None:
return
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/generations/__init__.py
--- a/src/pyams_content/generations/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/generations/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -19,6 +19,7 @@
# import interfaces
from pyams_catalog.interfaces import MINUTE_RESOLUTION, DATE_RESOLUTION
+from pyams_content.component.theme import IThemesInfo
from pyams_content.interfaces import IBaseContent
from pyams_content.root.interfaces import ISiteRootToolsConfiguration
from pyams_content.shared.common.interfaces import IWfSharedContent
@@ -42,6 +43,7 @@
from pyams_content.shared.common.manager import SharedToolContainer
from pyams_i18n.index import I18nTextIndexWithInterface
from pyams_security.index import PrincipalsRoleIndex
+from pyams_thesaurus.index import ThesaurusTermsListFieldIndex
from pyams_utils.registry import utility_config, get_global_registry
from pyams_utils.site import check_required_utilities
from pyramid.path import DottedNameResolver
@@ -55,7 +57,9 @@
RENAMED_CLASSES = {
'pyams_content.shared.common.review ReviewComment': 'pyams_content.features.review ReviewComment',
'pyams_content.shared.common.review ReviewCommentsContainer':
- 'pyams_content.features.review ReviewCommentsContainer'
+ 'pyams_content.features.review ReviewCommentsContainer',
+ 'pyams_portal.portlets.content ContentPortletSettings':
+ 'pyams_content.portlet.content SharedContentPortletSettings'
}
@@ -109,7 +113,19 @@
'resolution': MINUTE_RESOLUTION}),
('first_publication_date', DatetimeIndexWithInterface, {'interface': IWorkflowPublicationInfo,
'discriminator': 'first_publication_date',
- 'resolution': MINUTE_RESOLUTION})
+ 'resolution': MINUTE_RESOLUTION}),
+ ('themes', ThesaurusTermsListFieldIndex, {'interface': IThemesInfo,
+ 'discriminator': 'themes',
+ 'include_parents': False,
+ 'include_synonyms': False}),
+ ('themes_tree', ThesaurusTermsListFieldIndex, {'interface': IThemesInfo,
+ 'discriminator': 'themes',
+ 'include_parents': True,
+ 'include_synonyms': False}),
+ ('themes_all', ThesaurusTermsListFieldIndex, {'interface': IThemesInfo,
+ 'discriminator': 'themes',
+ 'include_parents': True,
+ 'include_synonyms': True})
]
diff -r b977c7da3074 -r cffd13804aa8 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 b977c7da3074 -r cffd13804aa8 src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po
--- a/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Mon Jun 11 16:14:41 2018 +0200
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-08 17:54+0200\n"
+"POT-Creation-Date: 2018-06-11 14:34+0200\n"
"PO-Revision-Date: 2015-09-10 10:42+0200\n"
"Last-Translator: Thierry Florac \n"
"Language-Team: French\n"
@@ -221,7 +221,7 @@
#: src/pyams_content/component/paragraph/interfaces/audio.py:44
#: src/pyams_content/component/links/interfaces/__init__.py:37
#: src/pyams_content/component/video/interfaces/__init__.py:48
-#: src/pyams_content/shared/common/interfaces/__init__.py:145
+#: src/pyams_content/shared/common/interfaces/__init__.py:144
#: src/pyams_content/shared/form/interfaces/__init__.py:65
msgid "Description"
msgstr "Description"
@@ -285,7 +285,7 @@
#: src/pyams_content/shared/site/zmi/folder.py:68
#: src/pyams_content/root/zmi/templates/advanced-search.pt:188
#: src/pyams_content/interfaces/__init__.py:99
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:152
+#: src/pyams_content/reference/pictograms/zmi/__init__.py:153
msgid "Title"
msgstr "Titre"
@@ -633,18 +633,18 @@
msgstr "Aperçu"
#: src/pyams_content/component/paragraph/zmi/__init__.py:212
-#: src/pyams_content/shared/common/zmi/workflow.py:125
-#: src/pyams_content/shared/common/zmi/workflow.py:212
-#: src/pyams_content/shared/common/zmi/workflow.py:252
-#: src/pyams_content/shared/common/zmi/workflow.py:306
-#: src/pyams_content/shared/common/zmi/workflow.py:395
-#: src/pyams_content/shared/common/zmi/workflow.py:451
-#: src/pyams_content/shared/common/zmi/workflow.py:491
-#: src/pyams_content/shared/common/zmi/workflow.py:532
-#: src/pyams_content/shared/common/zmi/workflow.py:575
-#: src/pyams_content/shared/common/zmi/workflow.py:615
-#: src/pyams_content/shared/common/zmi/workflow.py:656
-#: src/pyams_content/shared/common/zmi/workflow.py:707
+#: src/pyams_content/shared/common/zmi/workflow.py:122
+#: src/pyams_content/shared/common/zmi/workflow.py:209
+#: src/pyams_content/shared/common/zmi/workflow.py:249
+#: src/pyams_content/shared/common/zmi/workflow.py:303
+#: src/pyams_content/shared/common/zmi/workflow.py:392
+#: src/pyams_content/shared/common/zmi/workflow.py:448
+#: src/pyams_content/shared/common/zmi/workflow.py:488
+#: src/pyams_content/shared/common/zmi/workflow.py:529
+#: src/pyams_content/shared/common/zmi/workflow.py:572
+#: src/pyams_content/shared/common/zmi/workflow.py:612
+#: src/pyams_content/shared/common/zmi/workflow.py:653
+#: src/pyams_content/shared/common/zmi/workflow.py:704
#: src/pyams_content/shared/common/zmi/__init__.py:275
#: src/pyams_content/shared/common/zmi/owner.py:73
#: src/pyams_content/features/review/zmi/__init__.py:90
@@ -712,70 +712,64 @@
"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:83
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:84
msgid "Pictograms..."
msgstr "Pictogrammes"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:96
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:97
msgid "Add new pictogram paragraph"
msgstr "Ajout de pictogrammes"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:123
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:124
msgid "Edit pictogram paragraph properties"
msgstr "Propriétés des pictogrammes"
#. Default: Header
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:253
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:254
msgid "pictogram-item-header"
msgstr "En-tête"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:268
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:269
#: 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:290
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:291
#: src/pyams_content/component/paragraph/interfaces/pictogram.py:80
msgid "Pictograms"
msgstr "Pictogrammes"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:305
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:61
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:306
+#: src/pyams_content/reference/pictograms/zmi/__init__.py:62
msgid "Add pictogram"
msgstr "Ajouter un pictogramme"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:318
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:73
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:319
+#: 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:374
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:97
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:375
+#: 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:354
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:355
msgid "Pictogram was correctly added"
msgstr "Le pictogramme a été ajouté."
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:364
+#: src/pyams_content/component/paragraph/zmi/pictogram.py:365
#: src/pyams_content/component/paragraph/zmi/pictogram.py:422
msgid "You must select a pictogram!"
msgstr "Vous devez sélectionner un pictogramme !"
-#: src/pyams_content/component/paragraph/zmi/pictogram.py:333
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:173
+#: 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/pictogram.py:394
-#: src/pyams_content/reference/pictograms/zmi/__init__.py:177
-#, python-format
-msgid "Default header: {0}"
-msgstr "En-tête par défaut : {0}"
-
#: src/pyams_content/component/paragraph/zmi/audio.py:54
msgid "Audio paragraph..."
msgstr "Bande son"
@@ -1878,54 +1872,54 @@
msgid "Click to see subtypes"
msgstr "Montrer ou caher les sous-types"
-#: src/pyams_content/shared/common/zmi/workflow.py:847
+#: src/pyams_content/shared/common/zmi/workflow.py:844
msgid "Prior checks"
msgstr "Contrôles préalables : avez-vous ?"
-#: src/pyams_content/shared/common/zmi/workflow.py:126
+#: src/pyams_content/shared/common/zmi/workflow.py:123
msgid "Request publication"
msgstr "Demander la publication"
-#: src/pyams_content/shared/common/zmi/workflow.py:213
+#: src/pyams_content/shared/common/zmi/workflow.py:210
#: src/pyams_content/workflow/__init__.py:315
msgid "Cancel publication request"
msgstr "Annuler la demande de publication"
-#: src/pyams_content/shared/common/zmi/workflow.py:253
+#: src/pyams_content/shared/common/zmi/workflow.py:250
msgid "Refuse publication request"
msgstr "Refuser la demande de publication"
-#: src/pyams_content/shared/common/zmi/workflow.py:307
+#: src/pyams_content/shared/common/zmi/workflow.py:304
#: src/pyams_content/workflow/basic.py:196
msgid "Publish"
msgstr "Publier"
-#: src/pyams_content/shared/common/zmi/workflow.py:396
+#: src/pyams_content/shared/common/zmi/workflow.py:393
msgid "Request retire"
msgstr "Demander le retrait"
-#: src/pyams_content/shared/common/zmi/workflow.py:452
+#: src/pyams_content/shared/common/zmi/workflow.py:449
msgid "Cancel retire request"
msgstr "Annuler la demande de retrait"
-#: src/pyams_content/shared/common/zmi/workflow.py:492
+#: src/pyams_content/shared/common/zmi/workflow.py:489
msgid "Retire"
msgstr "Retirer"
-#: src/pyams_content/shared/common/zmi/workflow.py:533
+#: src/pyams_content/shared/common/zmi/workflow.py:530
#: src/pyams_content/workflow/__init__.py:436
msgid "Request archive"
msgstr "Demander l'archivage"
-#: src/pyams_content/shared/common/zmi/workflow.py:576
+#: src/pyams_content/shared/common/zmi/workflow.py:573
msgid "Cancel archive request"
msgstr "Annuler la demande d'archivage"
-#: src/pyams_content/shared/common/zmi/workflow.py:616
+#: src/pyams_content/shared/common/zmi/workflow.py:613
msgid "Archive"
msgstr "Archiver"
-#: src/pyams_content/shared/common/zmi/workflow.py:657
+#: src/pyams_content/shared/common/zmi/workflow.py:654
#: src/pyams_content/workflow/__init__.py:501
#: src/pyams_content/workflow/__init__.py:513
#: src/pyams_content/workflow/__init__.py:525
@@ -1936,39 +1930,39 @@
msgid "Create new version"
msgstr "Créer une nouvelle version"
-#: src/pyams_content/shared/common/zmi/workflow.py:708
+#: src/pyams_content/shared/common/zmi/workflow.py:705
#: src/pyams_content/workflow/__init__.py:561
#: src/pyams_content/workflow/basic.py:248
msgid "Delete version"
msgstr "Supprimer cette version"
-#: src/pyams_content/shared/common/zmi/workflow.py:793
+#: src/pyams_content/shared/common/zmi/workflow.py:790
msgid "Previewed content?"
msgstr "Prévisualisé ce contenu ?"
-#: src/pyams_content/shared/common/zmi/workflow.py:797
+#: src/pyams_content/shared/common/zmi/workflow.py:794
msgid "Verified content?"
msgstr "Audité ce contenu ?"
-#: src/pyams_content/shared/common/zmi/workflow.py:183
-#: src/pyams_content/shared/common/zmi/workflow.py:365
+#: src/pyams_content/shared/common/zmi/workflow.py:180
+#: src/pyams_content/shared/common/zmi/workflow.py:362
msgid "Publication start date is required"
msgstr "La date de début de publication est obligatoire"
-#: src/pyams_content/shared/common/zmi/workflow.py:276
-#: src/pyams_content/shared/common/zmi/workflow.py:422
+#: src/pyams_content/shared/common/zmi/workflow.py:273
+#: src/pyams_content/shared/common/zmi/workflow.py:419
msgid "A comment is required"
msgstr "Le commentaire est obligatoire"
-#: src/pyams_content/shared/common/zmi/workflow.py:732
+#: src/pyams_content/shared/common/zmi/workflow.py:729
msgid "Delete content"
msgstr "Supprimer définitivement ce contenu"
-#: src/pyams_content/shared/common/zmi/workflow.py:741
+#: src/pyams_content/shared/common/zmi/workflow.py:738
msgid "Delete definitively"
msgstr "Supprimer définitivement"
-#: src/pyams_content/shared/common/zmi/workflow.py:863
+#: src/pyams_content/shared/common/zmi/workflow.py:860
msgid ""
"You must confirm that you previewed and checked this content before "
"requesting publication!!"
@@ -1976,12 +1970,12 @@
"Vous devez avoir prévisualisé et audité ce contenu avant de pouvoir le "
"publier !!"
-#: src/pyams_content/shared/common/zmi/workflow.py:90
+#: src/pyams_content/shared/common/zmi/workflow.py:87
#, python-format
msgid "{state} | by {principal}"
msgstr "{state} | par {principal}"
-#: src/pyams_content/shared/common/zmi/workflow.py:86
+#: src/pyams_content/shared/common/zmi/workflow.py:83
#: src/pyams_content/workflow/__init__.py:648
#: src/pyams_content/workflow/__init__.py:619
#: src/pyams_content/workflow/basic.py:315
@@ -2441,8 +2435,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:252
-#: src/pyams_content/shared/common/interfaces/__init__.py:277
+#: src/pyams_content/shared/common/interfaces/__init__.py:251
+#: src/pyams_content/shared/common/interfaces/__init__.py:276
msgid "Publication checks"
msgstr "Activer le tunnel de publication"
@@ -2870,22 +2864,22 @@
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:46
+#: src/pyams_content/shared/common/interfaces/__init__.py:45
#: src/pyams_content/root/interfaces/__init__.py:40
msgid "Webmasters"
msgstr "Webmestres"
-#: src/pyams_content/shared/common/interfaces/__init__.py:47
+#: src/pyams_content/shared/common/interfaces/__init__.py:46
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:51
+#: src/pyams_content/shared/common/interfaces/__init__.py:50
msgid "Pilots"
msgstr "Pilotes"
-#: src/pyams_content/shared/common/interfaces/__init__.py:52
+#: src/pyams_content/shared/common/interfaces/__init__.py:51
msgid ""
"Pilots can handle tool configuration, manage access rules, grant users roles "
"and manage managers restrictions"
@@ -2894,13 +2888,13 @@
"et les contributeurs, et limitent si nécessaire l'intervention des "
"responsables à certains contenus"
-#: 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:56
+#: src/pyams_content/shared/common/interfaces/__init__.py:173
msgid "Managers"
msgstr "Responsables"
-#: src/pyams_content/shared/common/interfaces/__init__.py:58
-#: src/pyams_content/shared/common/interfaces/__init__.py:175
+#: src/pyams_content/shared/common/interfaces/__init__.py:57
+#: src/pyams_content/shared/common/interfaces/__init__.py:174
msgid ""
"Managers can handle main operations in tool's workflow, like publish or "
"retire contents"
@@ -2909,28 +2903,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:63
-#: src/pyams_content/shared/common/interfaces/__init__.py:180
+#: src/pyams_content/shared/common/interfaces/__init__.py:62
+#: src/pyams_content/shared/common/interfaces/__init__.py:179
msgid "Contributors"
msgstr "Contributeurs"
-#: src/pyams_content/shared/common/interfaces/__init__.py:64
+#: src/pyams_content/shared/common/interfaces/__init__.py:63
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
+msgid "Workflow name"
+msgstr "Nom du workflow"
+
#: src/pyams_content/shared/common/interfaces/__init__.py:90
-msgid "Workflow name"
-msgstr "Nom du workflow"
-
-#: 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:115
+#: src/pyams_content/shared/common/interfaces/__init__.py:114
msgid "Content URL"
msgstr "URL du contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:116
+#: src/pyams_content/shared/common/interfaces/__init__.py:115
msgid ""
"URL used to access this content; this is important for SEO and should "
"include most important words describing content; spaces and underscores will "
@@ -2944,11 +2938,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:121
+#: src/pyams_content/shared/common/interfaces/__init__.py:120
msgid "Version creator"
msgstr "À l'origine de cette version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:122
+#: src/pyams_content/shared/common/interfaces/__init__.py:121
msgid ""
"Name of content's version creator. The creator of the first version is also "
"it's owner."
@@ -2956,39 +2950,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:126
+#: src/pyams_content/shared/common/interfaces/__init__.py:125
msgid "First owner"
msgstr "Premier propriétaire"
-#: src/pyams_content/shared/common/interfaces/__init__.py:127
+#: src/pyams_content/shared/common/interfaces/__init__.py:126
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:131
+#: src/pyams_content/shared/common/interfaces/__init__.py:130
msgid "Version creation"
msgstr "Date de création"
-#: src/pyams_content/shared/common/interfaces/__init__.py:134
+#: src/pyams_content/shared/common/interfaces/__init__.py:133
msgid "Version modifiers"
msgstr "Intervenants"
-#: src/pyams_content/shared/common/interfaces/__init__.py:135
+#: src/pyams_content/shared/common/interfaces/__init__.py:134
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:138
+#: src/pyams_content/shared/common/interfaces/__init__.py:137
msgid "Last modifier"
msgstr "Dernier intervenant"
-#: src/pyams_content/shared/common/interfaces/__init__.py:139
+#: src/pyams_content/shared/common/interfaces/__init__.py:138
msgid "Last principal who modified this content"
msgstr "Dernier utilisateur étant intervenu sur ce contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:142
+#: src/pyams_content/shared/common/interfaces/__init__.py:141
msgid "Last update"
msgstr "Dernière modification"
-#: src/pyams_content/shared/common/interfaces/__init__.py:146
+#: 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"
@@ -2997,21 +2991,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:151
+#: src/pyams_content/shared/common/interfaces/__init__.py:150
msgid "Keywords"
msgstr "Mots-clés"
-#: src/pyams_content/shared/common/interfaces/__init__.py:152
+#: src/pyams_content/shared/common/interfaces/__init__.py:151
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:155
+#: src/pyams_content/shared/common/interfaces/__init__.py:154
#: 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:156
+#: src/pyams_content/shared/common/interfaces/__init__.py:155
#: 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"
@@ -3019,11 +3013,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:167
+#: src/pyams_content/shared/common/interfaces/__init__.py:166
msgid "Content owner"
msgstr "Propriétaire"
-#: src/pyams_content/shared/common/interfaces/__init__.py:168
+#: src/pyams_content/shared/common/interfaces/__init__.py:167
msgid ""
"The owner is the creator of content's first version, except if it was "
"transferred afterwards to another owner"
@@ -3032,7 +3026,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:181
+#: src/pyams_content/shared/common/interfaces/__init__.py:180
msgid ""
"Contributors are users which are allowed to update this content in addition "
"to it's owner"
@@ -3040,11 +3034,11 @@
"Les contributeurs sont autorisés, en plus du propriétaire, à modifier ce "
"contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:186
+#: src/pyams_content/shared/common/interfaces/__init__.py:185
msgid "Readers"
msgstr "Relecteurs"
-#: src/pyams_content/shared/common/interfaces/__init__.py:187
+#: src/pyams_content/shared/common/interfaces/__init__.py:186
msgid ""
"Readers are users which are asked to verify and comment contents before they "
"are published"
@@ -3052,22 +3046,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:192
+#: src/pyams_content/shared/common/interfaces/__init__.py:191
msgid "Guests"
msgstr "Invités"
-#: src/pyams_content/shared/common/interfaces/__init__.py:193
+#: src/pyams_content/shared/common/interfaces/__init__.py:192
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:213
+#: src/pyams_content/shared/common/interfaces/__init__.py:212
msgid "Principal ID"
msgstr "ID utilisateur"
-#: src/pyams_content/shared/common/interfaces/__init__.py:253
+#: src/pyams_content/shared/common/interfaces/__init__.py:252
msgid ""
"If 'yes', this contributor will have to confirm that contents have been "
"previewed and checked before asking for publication"
@@ -3075,7 +3069,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:278
+#: src/pyams_content/shared/common/interfaces/__init__.py:277
msgid ""
"If 'yes', this manager will have to confirm that contents have been "
"previewed and checked before publishing a content"
@@ -3083,11 +3077,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:283
+#: src/pyams_content/shared/common/interfaces/__init__.py:282
msgid "Restricted contents"
msgstr "Accès restreints"
-#: src/pyams_content/shared/common/interfaces/__init__.py:284
+#: src/pyams_content/shared/common/interfaces/__init__.py:283
msgid ""
"If 'yes', this manager will get restricted access to manage contents based "
"on selected settings"
@@ -3095,11 +3089,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:289
+#: src/pyams_content/shared/common/interfaces/__init__.py:288
msgid "Selected owners"
msgstr "Propriétaires"
-#: src/pyams_content/shared/common/interfaces/__init__.py:290
+#: src/pyams_content/shared/common/interfaces/__init__.py:289
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 "
@@ -3517,17 +3511,28 @@
"Indique comment les références internes indiquées seront intégrées à la "
"liste des résultats"
-#: src/pyams_content/shared/view/interfaces/__init__.py:171
+#: src/pyams_content/shared/view/interfaces/__init__.py:164
+msgid "Exclude context?"
+msgstr ""
+"Exclure le contexte ?"
+
+#: src/pyams_content/shared/view/interfaces/__init__.py:165
+msgid "If 'yes', context will be excluded from results list"
+msgstr ""
+"Si 'oui', le contexte d'application de la vue sera automatiquement exclus de "
+"la liste des résultats"
+
+#: src/pyams_content/shared/view/interfaces/__init__.py:176
msgid "Select context themes?"
msgstr "Thèmes du contexte ?"
-#: src/pyams_content/shared/view/interfaces/__init__.py:172
+#: src/pyams_content/shared/view/interfaces/__init__.py:177
msgid "If 'yes', themes will be extracted from context"
msgstr ""
"Si 'oui', les thèmes associés au contexte d'application de la vue seront "
"automatiquement sélectionnés"
-#: src/pyams_content/shared/view/interfaces/__init__.py:176
+#: src/pyams_content/shared/view/interfaces/__init__.py:181
msgid "Other terms"
msgstr "Autres thèmes"
@@ -4389,6 +4394,18 @@
msgid "Create new content"
msgstr "Créer un nouveau contenu"
+#: src/pyams_content/portlet/content/__init__.py:42
+msgid "Context content"
+msgstr "Contenu partagé"
+
+#: src/pyams_content/portlet/content/zmi/preview.pt:3
+msgid "This is where the content will be displayed!!"
+msgstr "C'est ici que seront affichés les éléments du contenu."
+
+#: src/pyams_content/portlet/content/skin/__init__.py:36
+msgid "Default content renderer"
+msgstr "Par défaut"
+
#: src/pyams_content/interfaces/__init__.py:95
msgid "Unique key"
msgstr "Clé unique"
@@ -4457,6 +4474,10 @@
msgid "Display pictogram properties"
msgstr "Propriétés du pictogramme"
+#: src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt:6
+msgid "Default header: ${header}"
+msgstr "En-tête par défaut : ${header}"
+
#: src/pyams_content/reference/pictograms/interfaces/__init__.py:45
msgid "Pictogram content"
msgstr "Utilisez le bouton \"Parcourir\" pour modifier le contenu de l'image"
@@ -4665,17 +4686,17 @@
msgid "Presentation template used for this footer"
msgstr "Mode de rendu utilisé par ce pied de page"
-#: src/pyams_content/features/review/__init__.py:180
+#: src/pyams_content/features/review/__init__.py:181
#, python-format
msgid "Request comment: {comment}"
msgstr "Commentaire joint : {comment}"
-#: src/pyams_content/features/review/__init__.py:210
+#: src/pyams_content/features/review/__init__.py:211
#, python-format
msgid "A new comment was added on content « {0} »"
msgstr "Un nouveau commentaire a été ajouté pour le contenu « {0} »"
-#: src/pyams_content/features/review/__init__.py:167
+#: src/pyams_content/features/review/__init__.py:168
#, python-format
msgid "[{service_name}] A content review is requested"
msgstr "[{service_name}] Demande de relecture"
@@ -4984,9 +5005,6 @@
#~ "Ce formulaire vous permet d'effectuer la sélection des pictogrammes qui "
#~ "seront disponibles pour être intégrés dans les contenus partagés."
-#~ msgid "Default gallery renderer"
-#~ msgstr "Galerie par défaut"
-
#~ msgid "Add medias gallery..."
#~ msgstr "Galerie de médias"
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/locales/pyams_content.pot
--- a/src/pyams_content/locales/pyams_content.pot Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/locales/pyams_content.pot Mon Jun 11 16:14:41 2018 +0200
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-08 17:54+0200\n"
+"POT-Creation-Date: 2018-06-11 14:34+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
@@ -213,7 +213,7 @@
#: ./src/pyams_content/component/paragraph/interfaces/audio.py:44
#: ./src/pyams_content/component/links/interfaces/__init__.py:37
#: ./src/pyams_content/component/video/interfaces/__init__.py:48
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:145
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:144
#: ./src/pyams_content/shared/form/interfaces/__init__.py:65
msgid "Description"
msgstr ""
@@ -275,7 +275,7 @@
#: ./src/pyams_content/shared/site/zmi/folder.py:68
#: ./src/pyams_content/root/zmi/templates/advanced-search.pt:188
#: ./src/pyams_content/interfaces/__init__.py:99
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:152
+#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:153
msgid "Title"
msgstr ""
@@ -596,18 +596,18 @@
msgstr ""
#: ./src/pyams_content/component/paragraph/zmi/__init__.py:212
-#: ./src/pyams_content/shared/common/zmi/workflow.py:125
-#: ./src/pyams_content/shared/common/zmi/workflow.py:212
-#: ./src/pyams_content/shared/common/zmi/workflow.py:252
-#: ./src/pyams_content/shared/common/zmi/workflow.py:306
-#: ./src/pyams_content/shared/common/zmi/workflow.py:395
-#: ./src/pyams_content/shared/common/zmi/workflow.py:451
-#: ./src/pyams_content/shared/common/zmi/workflow.py:491
-#: ./src/pyams_content/shared/common/zmi/workflow.py:532
-#: ./src/pyams_content/shared/common/zmi/workflow.py:575
-#: ./src/pyams_content/shared/common/zmi/workflow.py:615
-#: ./src/pyams_content/shared/common/zmi/workflow.py:656
-#: ./src/pyams_content/shared/common/zmi/workflow.py:707
+#: ./src/pyams_content/shared/common/zmi/workflow.py:122
+#: ./src/pyams_content/shared/common/zmi/workflow.py:209
+#: ./src/pyams_content/shared/common/zmi/workflow.py:249
+#: ./src/pyams_content/shared/common/zmi/workflow.py:303
+#: ./src/pyams_content/shared/common/zmi/workflow.py:392
+#: ./src/pyams_content/shared/common/zmi/workflow.py:448
+#: ./src/pyams_content/shared/common/zmi/workflow.py:488
+#: ./src/pyams_content/shared/common/zmi/workflow.py:529
+#: ./src/pyams_content/shared/common/zmi/workflow.py:572
+#: ./src/pyams_content/shared/common/zmi/workflow.py:612
+#: ./src/pyams_content/shared/common/zmi/workflow.py:653
+#: ./src/pyams_content/shared/common/zmi/workflow.py:704
#: ./src/pyams_content/shared/common/zmi/__init__.py:275
#: ./src/pyams_content/shared/common/zmi/owner.py:73
#: ./src/pyams_content/features/review/zmi/__init__.py:90
@@ -673,70 +673,64 @@
msgid "Check allowed paragraph types to be able to create new paragraphs."
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:83
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:84
msgid "Pictograms..."
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:96
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:97
msgid "Add new pictogram paragraph"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:123
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:124
msgid "Edit pictogram paragraph properties"
msgstr ""
#. Default: Header
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:253
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:254
msgid "pictogram-item-header"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:268
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:269
#: ./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:290
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:291
#: ./src/pyams_content/component/paragraph/interfaces/pictogram.py:80
msgid "Pictograms"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:305
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:61
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:306
+#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:62
msgid "Add pictogram"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:318
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:73
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:319
+#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:74
msgid "Add new pictogram"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:374
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:97
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:375
+#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:98
msgid "Edit pictogram properties"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:354
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:355
msgid "Pictogram was correctly added"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:364
+#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:365
#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:422
msgid "You must select a pictogram!"
msgstr ""
-#: ./src/pyams_content/component/paragraph/zmi/pictogram.py:333
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:173
+#: ./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/pictogram.py:394
-#: ./src/pyams_content/reference/pictograms/zmi/__init__.py:177
-#, python-format
-msgid "Default header: {0}"
-msgstr ""
-
#: ./src/pyams_content/component/paragraph/zmi/audio.py:54
msgid "Audio paragraph..."
msgstr ""
@@ -1796,54 +1790,54 @@
msgid "Click to see subtypes"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:847
+#: ./src/pyams_content/shared/common/zmi/workflow.py:844
msgid "Prior checks"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:126
+#: ./src/pyams_content/shared/common/zmi/workflow.py:123
msgid "Request publication"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:213
+#: ./src/pyams_content/shared/common/zmi/workflow.py:210
#: ./src/pyams_content/workflow/__init__.py:315
msgid "Cancel publication request"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:253
+#: ./src/pyams_content/shared/common/zmi/workflow.py:250
msgid "Refuse publication request"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:307
+#: ./src/pyams_content/shared/common/zmi/workflow.py:304
#: ./src/pyams_content/workflow/basic.py:196
msgid "Publish"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:396
+#: ./src/pyams_content/shared/common/zmi/workflow.py:393
msgid "Request retire"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:452
+#: ./src/pyams_content/shared/common/zmi/workflow.py:449
msgid "Cancel retire request"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:492
+#: ./src/pyams_content/shared/common/zmi/workflow.py:489
msgid "Retire"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:533
+#: ./src/pyams_content/shared/common/zmi/workflow.py:530
#: ./src/pyams_content/workflow/__init__.py:436
msgid "Request archive"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:576
+#: ./src/pyams_content/shared/common/zmi/workflow.py:573
msgid "Cancel archive request"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:616
+#: ./src/pyams_content/shared/common/zmi/workflow.py:613
msgid "Archive"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:657
+#: ./src/pyams_content/shared/common/zmi/workflow.py:654
#: ./src/pyams_content/workflow/__init__.py:501
#: ./src/pyams_content/workflow/__init__.py:513
#: ./src/pyams_content/workflow/__init__.py:525
@@ -1854,50 +1848,50 @@
msgid "Create new version"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:708
+#: ./src/pyams_content/shared/common/zmi/workflow.py:705
#: ./src/pyams_content/workflow/__init__.py:561
#: ./src/pyams_content/workflow/basic.py:248
msgid "Delete version"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:793
+#: ./src/pyams_content/shared/common/zmi/workflow.py:790
msgid "Previewed content?"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:797
+#: ./src/pyams_content/shared/common/zmi/workflow.py:794
msgid "Verified content?"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:183
-#: ./src/pyams_content/shared/common/zmi/workflow.py:365
+#: ./src/pyams_content/shared/common/zmi/workflow.py:180
+#: ./src/pyams_content/shared/common/zmi/workflow.py:362
msgid "Publication start date is required"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:276
-#: ./src/pyams_content/shared/common/zmi/workflow.py:422
+#: ./src/pyams_content/shared/common/zmi/workflow.py:273
+#: ./src/pyams_content/shared/common/zmi/workflow.py:419
msgid "A comment is required"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:732
+#: ./src/pyams_content/shared/common/zmi/workflow.py:729
msgid "Delete content"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:741
+#: ./src/pyams_content/shared/common/zmi/workflow.py:738
msgid "Delete definitively"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:863
+#: ./src/pyams_content/shared/common/zmi/workflow.py:860
msgid ""
"You must confirm that you previewed and checked this content before "
"requesting publication!!"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:90
+#: ./src/pyams_content/shared/common/zmi/workflow.py:87
#, python-format
msgid "{state} | by {principal}"
msgstr ""
-#: ./src/pyams_content/shared/common/zmi/workflow.py:86
+#: ./src/pyams_content/shared/common/zmi/workflow.py:83
#: ./src/pyams_content/workflow/__init__.py:648
#: ./src/pyams_content/workflow/__init__.py:619
#: ./src/pyams_content/workflow/basic.py:315
@@ -2344,8 +2338,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:252
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:277
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:251
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:276
msgid "Publication checks"
msgstr ""
@@ -2722,199 +2716,199 @@
msgid "List of fields associated with this data type"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:46
+#: ./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:47
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:46
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
+msgid "Managers"
+msgstr ""
+
#: ./src/pyams_content/shared/common/interfaces/__init__.py:57
#: ./src/pyams_content/shared/common/interfaces/__init__.py:174
-msgid "Managers"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:58
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:175
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
+msgid "Contributors"
+msgstr ""
+
#: ./src/pyams_content/shared/common/interfaces/__init__.py:63
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:180
-msgid "Contributors"
-msgstr ""
-
-#: ./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
+msgid "Content URL"
+msgstr ""
+
#: ./src/pyams_content/shared/common/interfaces/__init__.py:115
-msgid "Content URL"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:116
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:121
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:120
msgid "Version creator"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:122
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:121
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 "First owner"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:127
msgid "Name of content's first version owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:131
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:130
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 "Version modifiers"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:135
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 "Last modifier"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:139
msgid "Last principal who modified this content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:142
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:141
msgid "Last update"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:146
+#: ./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:151
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:150
msgid "Keywords"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:152
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:151
msgid "They will be included into HTML pages metadata"
msgstr ""
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:154
+#: ./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/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:156
#: ./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:167
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:166
msgid "Content owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:168
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:167
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:181
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:180
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
+msgid "Readers"
+msgstr ""
+
#: ./src/pyams_content/shared/common/interfaces/__init__.py:186
-msgid "Readers"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:187
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
+msgid "Guests"
+msgstr ""
+
#: ./src/pyams_content/shared/common/interfaces/__init__.py:192
-msgid "Guests"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:193
msgid ""
"Guests are users which are allowed to view contents with restricted access"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:213
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:212
msgid "Principal ID"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:253
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:252
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:278
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:277
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
+msgid "Restricted contents"
+msgstr ""
+
#: ./src/pyams_content/shared/common/interfaces/__init__.py:283
-msgid "Restricted contents"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:284
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:289
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:288
msgid "Selected owners"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:290
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:289
msgid "Manager will have access to contents owned by these principals"
msgstr ""
@@ -3308,15 +3302,23 @@
msgid "Specify how selected references are included into view results"
msgstr ""
-#: ./src/pyams_content/shared/view/interfaces/__init__.py:171
-msgid "Select context themes?"
-msgstr ""
-
-#: ./src/pyams_content/shared/view/interfaces/__init__.py:172
-msgid "If 'yes', themes will be extracted from context"
+#: ./src/pyams_content/shared/view/interfaces/__init__.py:164
+msgid "Exclude context?"
+msgstr ""
+
+#: ./src/pyams_content/shared/view/interfaces/__init__.py:165
+msgid "If 'yes', context will be excluded from results list"
msgstr ""
#: ./src/pyams_content/shared/view/interfaces/__init__.py:176
+msgid "Select context themes?"
+msgstr ""
+
+#: ./src/pyams_content/shared/view/interfaces/__init__.py:177
+msgid "If 'yes', themes will be extracted from context"
+msgstr ""
+
+#: ./src/pyams_content/shared/view/interfaces/__init__.py:181
msgid "Other terms"
msgstr ""
@@ -4163,6 +4165,18 @@
msgid "Create new content"
msgstr ""
+#: ./src/pyams_content/portlet/content/__init__.py:42
+msgid "Context content"
+msgstr ""
+
+#: ./src/pyams_content/portlet/content/zmi/preview.pt:3
+msgid "This is where the content will be displayed!!"
+msgstr ""
+
+#: ./src/pyams_content/portlet/content/skin/__init__.py:36
+msgid "Default content renderer"
+msgstr ""
+
#: ./src/pyams_content/interfaces/__init__.py:95
msgid "Unique key"
msgstr ""
@@ -4231,6 +4245,10 @@
msgid "Display pictogram properties"
msgstr ""
+#: ./src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt:6
+msgid "Default header: ${header}"
+msgstr ""
+
#: ./src/pyams_content/reference/pictograms/interfaces/__init__.py:45
msgid "Pictogram content"
msgstr ""
@@ -4429,17 +4447,17 @@
msgid "Presentation template used for this footer"
msgstr ""
-#: ./src/pyams_content/features/review/__init__.py:180
+#: ./src/pyams_content/features/review/__init__.py:181
#, python-format
msgid "Request comment: {comment}"
msgstr ""
-#: ./src/pyams_content/features/review/__init__.py:210
+#: ./src/pyams_content/features/review/__init__.py:211
#, python-format
msgid "A new comment was added on content « {0} »"
msgstr ""
-#: ./src/pyams_content/features/review/__init__.py:167
+#: ./src/pyams_content/features/review/__init__.py:168
#, python-format
msgid "[{service_name}] A content review is requested"
msgstr ""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/portlet/__init__.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/portlet/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,19 @@
+#
+# 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
+
+# import packages
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/portlet/content/__init__.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/portlet/content/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,44 @@
+#
+# 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.portlet.content.interfaces import ISharedContentPortletSettings
+from pyams_utils.interfaces import VIEW_PERMISSION
+
+# import packages
+from pyams_portal.portlet import PortletSettings, portlet_config, Portlet
+from zope.interface import implementer
+
+from pyams_content import _
+
+
+SHARED_CONTENT_PORTLET_NAME = 'pyams_content.portlet.content'
+
+
+@implementer(ISharedContentPortletSettings)
+class SharedContentPortletSettings(PortletSettings):
+ """Shared content portlet persistent settings"""
+
+
+@portlet_config(permission=VIEW_PERMISSION)
+class SharedContentPortlet(Portlet):
+ """Shared content portlet"""
+
+ name = SHARED_CONTENT_PORTLET_NAME
+ label = _("Context content")
+
+ settings_class = SharedContentPortletSettings
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/portlet/content/interfaces.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/portlet/content/interfaces.py Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,24 @@
+#
+# 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
+
+# import packages
+from pyams_portal.interfaces import IPortletSettings
+
+
+class ISharedContentPortletSettings(IPortletSettings):
+ """Shared content portlet settings interface"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/portlet/content/skin/__init__.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/portlet/content/skin/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,54 @@
+#
+# 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.portlet.content.interfaces import ISharedContentPortletSettings
+from pyams_portal.interfaces import IPortalContext, IPortletRenderer
+from pyams_skin.layer import IPyAMSLayer
+
+# import packages
+from pyams_content.features.renderer import IContentRenderer
+from pyams_portal.portlet import PortletRenderer
+from pyams_utils.adapter import adapter_config
+from zope.interface import Interface
+
+from pyams_content import _
+
+
+@adapter_config(context=(IPortalContext, IPyAMSLayer, Interface, ISharedContentPortletSettings),
+ provides=IPortletRenderer)
+class SharedContentPortletRenderer(PortletRenderer):
+ """Shared content portlet renderer"""
+
+ label = _("Default content renderer")
+
+ def __init__(self, context, request, view, settings):
+ super(SharedContentPortletRenderer, self).__init__(context, request, view, settings)
+ registry = self.request.registry
+ self.renderers = [adapter for name, adapter in sorted(registry.getAdapters((self.context, self.request),
+ IContentRenderer),
+ key=lambda x: x[1].weight)]
+
+ def update(self):
+ super(SharedContentPortletRenderer, self).update()
+ [renderer.update() for renderer in self.renderers]
+
+ def render(self):
+ result = ''
+ for renderer in self.renderers:
+ if renderer is not None:
+ result += renderer.render()
+ return result
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/portlet/content/zmi/__init__.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/portlet/content/zmi/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,52 @@
+#
+# 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.portlet.content.interfaces import ISharedContentPortletSettings
+from pyams_pagelet.interfaces import IPagelet
+from pyams_portal.interfaces import IPortletPreviewer
+from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
+
+# import packages
+from pyams_form.form import AJAXEditForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_portal.portlet import PortletPreviewer
+from pyams_portal.zmi.portlet import PortletSettingsEditor
+from pyams_template.template import template_config
+from pyams_utils.adapter import adapter_config
+from zope.interface import Interface
+
+
+@pagelet_config(name='properties.html', context=ISharedContentPortletSettings, layer=IPyAMSLayer,
+ permission=VIEW_SYSTEM_PERMISSION)
+class SharedContentPortletSettingsEditor(PortletSettingsEditor):
+ """Shared content portlet settings editor"""
+
+ settings = ISharedContentPortletSettings
+
+
+@adapter_config(name='properties.json', context=(ISharedContentPortletSettings, IPyAMSLayer), provides=IPagelet)
+class SharedContentPortletConfigurationAJAXEditor(AJAXEditForm, SharedContentPortletSettingsEditor):
+ """Shared content portlet settings editor, JSON renderer"""
+
+
+@adapter_config(context=(Interface, IPyAMSLayer, Interface, ISharedContentPortletSettings),
+ provides=IPortletPreviewer)
+@template_config(template='preview.pt', layer=IPyAMSLayer)
+class SharedContentPortletPreviewer(PortletPreviewer):
+ """Shared content portlet previewer"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/portlet/content/zmi/preview.pt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/portlet/content/zmi/preview.pt Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,13 @@
+
+
+ This is where the content will be displayed!!
+
+
+
+
+
+
+
+
+
+
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/reference/pictograms/zmi/__init__.py
--- a/src/pyams_content/reference/pictograms/zmi/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/reference/pictograms/zmi/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -44,6 +44,7 @@
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
from pyramid.httpexceptions import HTTPNotFound, HTTPBadRequest
+from pyramid.renderers import render, render_to_response
from pyramid.response import Response
from pyramid.view import view_config
from z3c.form import field
@@ -163,8 +164,8 @@
@view_config(name='get-pictogram-header.html', context=IPictogramTable, request_type=IPyAMSLayer,
permission=VIEW_SYSTEM_PERMISSION)
-def get_pictogram_label(request):
- """Get alternate label associated with a given pictogram"""
+def get_pictogram_header_view(request):
+ """View used to get thumbnail and alternate label associated with a given pictogram"""
name = request.params.get('value')
if not name:
raise HTTPBadRequest()
@@ -174,5 +175,13 @@
pictogram = request.context.get(name)
if pictogram is None:
raise HTTPNotFound()
- return Response(translate(_("Default header: {0}")).format(
- II18n(pictogram).query_attribute('header', request=request) or '--'))
+ return render_to_response('templates/pictogram-header.pt', {
+ 'context': pictogram
+ }, request=request)
+
+
+def get_pictogram_header(pictogram, request=None):
+ """Get thumbnail and alternate label associated with a given pictogram"""
+ return render('templates/pictogram-header.pt', {
+ 'context': pictogram
+ }, request=request)
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,9 @@
+
+
+
Default header:
+
+
+
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/blog/__init__.py
--- a/src/pyams_content/shared/blog/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/blog/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -23,16 +23,18 @@
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_utils.adapter import adapter_config
+from pyams_content.shared.common.portal import SharedContentPortalPage
+from pyams_utils.adapter import adapter_config, get_annotation_adapter
from zope.interface import implementer, provider
-@implementer(IWfBlogPost, IParagraphContainerTarget, IThemesTarget,
- IIllustrationTarget, IPreviewTarget, IReviewTarget)
+@implementer(IWfBlogPost, IParagraphContainerTarget, IThemesTarget, IIllustrationTarget,
+ IPortalContext, IPreviewTarget, IReviewTarget)
class WfBlogPost(WfSharedContent):
"""Base blog post"""
@@ -58,3 +60,9 @@
@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 b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/blog/manager.py
--- a/src/pyams_content/shared/blog/manager.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/blog/manager.py Mon Jun 11 16:14:41 2018 +0200
@@ -27,7 +27,6 @@
from pyams_content.shared.blog.interfaces import IBlogManager, IBlogFolder, IBlogFolderFactory, IBlogManagerFactory
from pyams_content.shared.common.interfaces import ISharedContentFactory
from pyams_portal.interfaces import IPortalContext
-from zope.annotation.interfaces import IAttributeAnnotatable
from zope.component.interfaces import ISite
from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectRemovedEvent
@@ -55,7 +54,7 @@
@implementer(IBlogManager, IParagraphFactorySettings, IThemesManagerTarget, IPictogramManagerTarget,
- IIllustrationTarget, IPortalContext, IHeaderTarget, IFooterTarget, IPreviewTarget, IAttributeAnnotatable)
+ IIllustrationTarget, IHeaderTarget, IFooterTarget, IPortalContext, IPreviewTarget)
class BlogManager(Folder, BaseSharedTool, UserSkinnableContent):
"""Nlog manager class"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/blog/zmi/manager.py
--- a/src/pyams_content/shared/blog/zmi/manager.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/blog/zmi/manager.py Mon Jun 11 16:14:41 2018 +0200
@@ -186,6 +186,6 @@
def updateWidgets(self, prefix=None):
super(BlogManagerWorkflowPublicationEditForm, self).updateWidgets(prefix)
if 'publication_effective_date' in self.widgets:
- widget = self.widgets['publication_effective_date']
- if not widget.value:
- widget.value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
+ pub_info = IWorkflowPublicationInfo(self.context)
+ if pub_info.publication_effective_date is None:
+ self.widgets['publication_effective_date'].value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/common/interfaces/__init__.py
--- a/src/pyams_content/shared/common/interfaces/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -18,7 +18,6 @@
# import interfaces
from pyams_content.interfaces import IBaseContent, MANAGE_CONTENT_PERMISSION, OWNER_ROLE, MANAGER_ROLE, \
READER_ROLE, GUEST_ROLE, WEBMASTER_ROLE, PILOT_ROLE, CONTRIBUTOR_ROLE
-from pyams_content.root.interfaces import ISiteRoot
from pyams_workflow.interfaces import IWorkflowManagedContent
from zope.container.interfaces import IContainer
@@ -69,13 +68,13 @@
class ISharedSite(IBaseContent, IDeletableElement):
"""Shared site interface"""
- containers(ISiteRoot)
+ containers('pyams_content.root.interfaces.ISiteRoot')
class ISharedToolContainer(IBaseContent, IContainer):
"""Shared tools container"""
- containers(ISiteRoot)
+ containers('pyams_content.root.interfaces.ISiteRoot')
contains('.ISharedTool')
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/common/manager.py
--- a/src/pyams_content/shared/common/manager.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/manager.py Mon Jun 11 16:14:41 2018 +0200
@@ -42,7 +42,7 @@
short_name = FieldProperty(ISharedToolContainer['short_name'])
-@implementer(IDefaultProtectionPolicy, IBaseSharedTool, ISharedToolRoles, IAttributeAnnotatable)
+@implementer(IDefaultProtectionPolicy, IBaseSharedTool, ISharedToolRoles)
class BaseSharedTool(ProtectedObject, I18nManagerMixin):
"""Base shared tool class"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/common/portal.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/shared/common/portal.py Mon Jun 11 16:14:41 2018 +0200
@@ -0,0 +1,36 @@
+#
+# 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.interfaces import IBaseSharedTool
+from pyams_portal.interfaces import IPortalPage
+
+# import packages
+from pyams_portal.page import PortalPage
+from pyams_utils.traversing import get_parent
+
+
+class SharedContentPortalPage(PortalPage):
+ """Shared content portal page"""
+
+ @property
+ def can_inherit(self):
+ return IPortalPage(self.parent).template is not None
+
+ @property
+ def parent(self):
+ return get_parent(self, IBaseSharedTool, allow_context=False)
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/common/zmi/workflow.py
--- a/src/pyams_content/shared/common/zmi/workflow.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/workflow.py Mon Jun 11 16:14:41 2018 +0200
@@ -9,12 +9,6 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
-from z3c.form.browser.radio import RadioWidget
-from z3c.form.widget import FieldWidget
-
-from pyams_form.group import NamedWidgetsGroup
-from pyams_form.interfaces import IFormLayer
-from pyams_form.widget import widgettemplate_config
__docformat__ = 'restructuredtext'
@@ -26,6 +20,7 @@
from pyams_content.interfaces import PUBLISH_CONTENT_PERMISSION, CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION
from pyams_content.shared.common.interfaces import IWfSharedContent, IBaseSharedTool, ISharedContent, \
IContributorRestrictions, IManagerRestrictions
+from pyams_form.interfaces import IFormLayer
from pyams_form.interfaces.form import IWidgetsPrefixViewletsManager, IFormSuffixViewletsManager, IInnerSubForm
from pyams_security.interfaces import ISecurityManager
from pyams_skin.layer import IPyAMSLayer
@@ -38,6 +33,7 @@
from pyams_content.workflow import DRAFT, DELETED
from pyams_form.form import AJAXAddForm, ajax_config
from pyams_form.schema import CloseButton
+from pyams_form.widget import widgettemplate_config
from pyams_pagelet.pagelet import pagelet_config
from pyams_template.template import template_config
from pyams_utils.adapter import adapter_config
@@ -51,8 +47,9 @@
from pyams_workflow.zmi.transition import WorkflowContentTransitionForm, WorkflowContentTransitionAJAXForm
from pyams_zmi.form import InnerAdminAddForm
from pyramid.events import subscriber
-from pyramid.view import view_config
from z3c.form import field, button
+from z3c.form.browser.radio import RadioWidget
+from z3c.form.widget import FieldWidget
from zope.interface import Interface, Invalid
from zope.schema import Bool
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/form/__init__.py
--- a/src/pyams_content/shared/form/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/form/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -21,11 +21,13 @@
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_utils.adapter import adapter_config
+from pyams_content.shared.common.portal import SharedContentPortalPage
+from pyams_utils.adapter import adapter_config, get_annotation_adapter
from pyams_utils.registry import get_global_registry
from zope.interface import implementer, provider, alsoProvides, noLongerProvides
from zope.schema.fieldproperty import FieldProperty
@@ -34,7 +36,7 @@
@implementer(IWfForm, IFormFieldContainerTarget,
- IPreviewTarget, IReviewTarget)
+ IPortalContext, IPreviewTarget, IReviewTarget)
class WfForm(WfSharedContent):
"""Base form"""
@@ -88,6 +90,12 @@
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 b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/form/manager.py
--- a/src/pyams_content/shared/form/manager.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/form/manager.py Mon Jun 11 16:14:41 2018 +0200
@@ -18,7 +18,7 @@
# import interfaces
from pyams_content.shared.common.interfaces import ISharedContentFactory
from pyams_content.shared.form.interfaces import IFormsManager, FORM_CONTENT_TYPE, IFormsManagerFactory
-from zope.annotation.interfaces import IAttributeAnnotatable
+from pyams_portal.interfaces import IPortalContext
from zope.component.interfaces import ISite
from zope.lifecycleevent.interfaces import IObjectAddedEvent
@@ -32,7 +32,7 @@
from zope.interface import implementer
-@implementer(IFormsManager, IAttributeAnnotatable)
+@implementer(IFormsManager, IPortalContext)
class FormsManager(SharedTool):
"""Forms manager class"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/news/__init__.py
--- a/src/pyams_content/shared/news/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/news/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -23,15 +23,17 @@
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_utils.adapter import adapter_config
+from pyams_content.shared.common.portal import SharedContentPortalPage
+from pyams_utils.adapter import adapter_config, get_annotation_adapter
from zope.interface import implementer, provider
@implementer(IWfNewsEvent, IIllustrationTarget, IParagraphContainerTarget, IThemesTarget,
- IPreviewTarget, IReviewTarget)
+ IPortalContext, IPreviewTarget, IReviewTarget)
class WfNewsEvent(WfSharedContent):
"""Base news event"""
@@ -50,3 +52,9 @@
@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 b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/news/manager.py
--- a/src/pyams_content/shared/news/manager.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/news/manager.py Mon Jun 11 16:14:41 2018 +0200
@@ -21,6 +21,7 @@
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
@@ -35,7 +36,8 @@
from zope.schema.fieldproperty import FieldProperty
-@implementer(INewsManager, IParagraphFactorySettings, IThemesManagerTarget, IPictogramManagerTarget)
+@implementer(INewsManager, IParagraphFactorySettings, IThemesManagerTarget, IPictogramManagerTarget,
+ IPortalContext)
class NewsManager(SharedTool):
"""News manager class"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/site/__init__.py
--- a/src/pyams_content/shared/site/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/site/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -23,16 +23,18 @@
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_utils.adapter import adapter_config
+from pyams_content.shared.common.portal import SharedContentPortalPage
+from pyams_utils.adapter import adapter_config, get_annotation_adapter
from zope.interface import implementer, provider
-@implementer(IWfTopic, IParagraphContainerTarget, IThemesTarget,
- IIllustrationTarget, IPreviewTarget, IReviewTarget)
+@implementer(IWfTopic, IParagraphContainerTarget, IThemesTarget, IIllustrationTarget,
+ IPortalContext, IPreviewTarget, IReviewTarget)
class WfTopic(WfSharedContent):
"""Base topic"""
@@ -60,3 +62,9 @@
@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 b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/site/folder.py
--- a/src/pyams_content/shared/site/folder.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/site/folder.py Mon Jun 11 16:14:41 2018 +0200
@@ -24,7 +24,6 @@
from pyams_i18n.interfaces import II18n
from pyams_portal.interfaces import IPortalContext
from pyams_security.interfaces import IDefaultProtectionPolicy
-from zope.annotation.interfaces import IAttributeAnnotatable
from zope.intid.interfaces import IIntIds
# import packages
@@ -45,7 +44,7 @@
@implementer(IDefaultProtectionPolicy, ISiteFolder, ISiteFolderRoles,
- IIllustrationTarget, IPortalContext, IPreviewTarget, IAttributeAnnotatable)
+ IIllustrationTarget, IPortalContext, IPreviewTarget)
class SiteFolder(SiteContainerMixin, OrderedContainer, BaseSharedTool):
"""Site folder persistent class"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/site/manager.py
--- a/src/pyams_content/shared/site/manager.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/site/manager.py Mon Jun 11 16:14:41 2018 +0200
@@ -30,7 +30,6 @@
from pyams_form.interfaces.form import IFormContextPermissionChecker
from pyams_i18n.interfaces import II18n
from pyams_portal.interfaces import IPortalContext
-from zope.annotation.interfaces import IAttributeAnnotatable
from zope.component.interfaces import ISite
from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectRemovedEvent
@@ -53,7 +52,7 @@
@implementer(ISiteManager, IParagraphFactorySettings, IThemesManagerTarget, IPictogramManagerTarget,
- IIllustrationTarget, IPortalContext, IHeaderTarget, IFooterTarget, IPreviewTarget, IAttributeAnnotatable)
+ IIllustrationTarget, IPortalContext, IHeaderTarget, IFooterTarget, IPreviewTarget)
class SiteManager(SiteContainerMixin, OrderedContainer, BaseSharedTool, UserSkinnableContent):
"""Site manager persistent class"""
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/site/zmi/container.py
--- a/src/pyams_content/shared/site/zmi/container.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/site/zmi/container.py Mon Jun 11 16:14:41 2018 +0200
@@ -137,9 +137,9 @@
def updateWidgets(self, prefix=None):
super(SiteContainerWorkflowPublicationEditForm, self).updateWidgets(prefix)
if 'publication_effective_date' in self.widgets:
- widget = self.widgets['publication_effective_date']
- if not widget.value:
- widget.value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
+ pub_info = IWorkflowPublicationInfo(self.context)
+ if pub_info.publication_effective_date is None:
+ self.widgets['publication_effective_date'].value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
def get_ajax_output(self, changes):
output = super(self.__class__, self).get_ajax_output(changes)
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/view/interfaces/__init__.py
--- a/src/pyams_content/shared/view/interfaces/__init__.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/view/interfaces/__init__.py Mon Jun 11 16:14:41 2018 +0200
@@ -161,6 +161,11 @@
required=True,
default=ALWAYS_REFERENCE_MODE)
+ exclude_context = Bool(title=_("Exclude context?"),
+ description=_("If 'yes', context will be excluded from results list"),
+ required=True,
+ default=True)
+
VIEW_THEMES_SETTINGS_KEY = 'pyams_content.view.themes'
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/view/reference.py
--- a/src/pyams_content/shared/view/reference.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/view/reference.py Mon Jun 11 16:14:41 2018 +0200
@@ -9,6 +9,7 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
+from pyams_sequence.interfaces import ISequentialIdInfo
__docformat__ = 'restructuredtext'
@@ -19,12 +20,12 @@
# import interfaces
from hypatia.interfaces import ICatalog
from pyams_content.shared.view.interfaces import IWfView, IViewSettings, IViewInternalReferencesSettings, \
- IViewQueryFilterExtension, VIEW_REFERENCES_SETTINGS_KEY, ALWAYS_REFERENCE_MODE
+ IViewQueryParamsExtension, IViewQueryFilterExtension, VIEW_REFERENCES_SETTINGS_KEY, ALWAYS_REFERENCE_MODE
# import packages
from hypatia.catalog import CatalogQuery
-from hypatia.query import Any
-from pyams_catalog.query import CatalogResultSet
+from hypatia.query import Any, Not, NotEq
+from pyams_catalog.query import CatalogResultSet, and_
from pyams_content.workflow import VISIBLE_STATES
from pyams_utils.adapter import adapter_config, ContextAdapter, get_annotation_adapter
from pyams_utils.registry import get_utility
@@ -39,6 +40,7 @@
references = FieldProperty(IViewInternalReferencesSettings['references'])
references_mode = FieldProperty(IViewInternalReferencesSettings['references_mode'])
+ exclude_context = FieldProperty(IViewInternalReferencesSettings['exclude_context'])
@property
def is_using_context(self):
@@ -53,6 +55,23 @@
name='++view:references++')
+@adapter_config(name='references', context=IWfView, provides=IViewQueryParamsExtension)
+class ViewThemesQueryParamsExtension(ContextAdapter):
+ """View internal references query params extension"""
+
+ weight = 50
+
+ def get_params(self, context):
+ catalog = get_utility(ICatalog)
+ settings = IViewInternalReferencesSettings(self.context)
+ params = None
+ # check themes
+ if settings.exclude_context:
+ oid = ISequentialIdInfo(context).hex_oid
+ params = and_(params, NotEq(catalog['oid'], oid))
+ return params
+
+
@adapter_config(name='references', context=IWfView, provides=IViewQueryFilterExtension)
class ViewInternalReferencesQueryFilterExtension(ContextAdapter):
"""View internal references filter extension"""
@@ -65,6 +84,7 @@
return items
if (not items) or (settings.references_mode == ALWAYS_REFERENCE_MODE):
catalog = get_utility(ICatalog)
- params = Any(catalog['oid'], settings.references) & Any(catalog['workflow_state'], VISIBLE_STATES)
+ params = Any(catalog['oid'], settings.references) & \
+ Any(catalog['workflow_state'], VISIBLE_STATES)
items.prepend(CatalogResultSet(CatalogQuery(catalog).query(params)))
return items
diff -r b977c7da3074 -r cffd13804aa8 src/pyams_content/shared/view/theme.py
--- a/src/pyams_content/shared/view/theme.py Mon Jun 11 10:00:17 2018 +0200
+++ b/src/pyams_content/shared/view/theme.py Mon Jun 11 16:14:41 2018 +0200
@@ -16,12 +16,18 @@
# import standard library
# import interfaces
+from hypatia.interfaces import ICatalog
from pyams_content.component.theme.interfaces import IThemesInfo
-from pyams_content.shared.view.interfaces import IWfView, IViewSettings, IViewThemesSettings, VIEW_THEMES_SETTINGS_KEY
+from pyams_content.shared.view.interfaces import IWfView, IViewSettings, IViewThemesSettings, \
+ IViewQueryParamsExtension, VIEW_THEMES_SETTINGS_KEY
+from zope.intid.interfaces import IIntIds
# import packages
+from hypatia.query import Any
from persistent import Persistent
-from pyams_utils.adapter import adapter_config, get_annotation_adapter
+from pyams_catalog.query import and_
+from pyams_utils.adapter import adapter_config, get_annotation_adapter, ContextAdapter
+from pyams_utils.registry import get_utility
from zope.container.contained import Contained
from zope.interface import implementer
from zope.schema.fieldproperty import FieldProperty
@@ -49,7 +55,8 @@
return themes
def get_themes_index(self, context):
- return [theme.label for theme in self.get_themes(context)]
+ intids = get_utility(IIntIds)
+ return [intids.register(term) for term in self.get_themes(context)]
@adapter_config(context=IWfView, provides=IViewThemesSettings)
@@ -58,3 +65,20 @@
"""View themes settings factory"""
return get_annotation_adapter(view, VIEW_THEMES_SETTINGS_KEY, ViewThemesSettings,
name='++view:themes++')
+
+
+@adapter_config(name='themes', context=IWfView, provides=IViewQueryParamsExtension)
+class ViewThemesQueryParamsExtension(ContextAdapter):
+ """View themes query params extension"""
+
+ weight = 50
+
+ def get_params(self, context):
+ catalog = get_utility(ICatalog)
+ settings = IViewThemesSettings(self.context)
+ params = None
+ # check themes
+ themes = settings.get_themes_index(context)
+ if themes:
+ params = and_(params, Any(catalog['themes'], themes))
+ return params