# HG changeset patch # User Damien Correia # Date 1542280283 -3600 # Node ID 40deb3d316acefb9245307e3e2c6bdecfaaabc35 # Parent 978a2b9123b9d0ea24e785da58ffd431cd8beecf# Parent d6d041577ae0d3ed7bb5952fff01c5325a52850d Merge Default diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/component/paragraph/interfaces/contact.py --- a/src/pyams_content/component/paragraph/interfaces/contact.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/component/paragraph/interfaces/contact.py Thu Nov 15 12:11:23 2018 +0100 @@ -9,19 +9,19 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # -from zope.schema._field import ASCIILine __docformat__ = 'restructuredtext' +from zope.schema import Choice, Text, TextLine -# import standard library - -# import interfaces from pyams_content.component.paragraph import IBaseParagraph from pyams_content.shared.form.interfaces import FORM_CONTENT_TYPE +from pyams_file.schema import ImageField +from pyams_i18n.schema import I18nTextLineField +from pyams_sequence.schema import InternalReferenceField +from pyams_utils.schema import MailAddressField -# import packages -from pyams_file.schema import ImageField + try: from pyams_gis.schema import GeoPointField except ImportError: @@ -29,10 +29,6 @@ have_gis = False else: have_gis = True -from pyams_i18n.schema import I18nTextLineField -from pyams_sequence.schema import InternalReferenceField -from pyams_utils.schema import MailAddressField -from zope.schema import TextLine, Text, Choice from pyams_content import _ @@ -58,8 +54,8 @@ required=False) company = TextLine(title=_("Company"), - description=_("Business name of the employer"), - required=False) + description=_("Business name of the employer"), + required=False) contact_email = MailAddressField(title=_("Email address"), description=_("Contact email address"), @@ -70,9 +66,9 @@ required=False, content_type=FORM_CONTENT_TYPE) - phone_number = ASCIILine(title=_('Phone number'), - description=_('Phone number in international format.\n E.g. +33 ....'), - required=False, ) + phone_number = TextLine(title=_('Phone number'), + description=_('Phone number in international format.\n E.g. +33 ....'), + required=False, ) photo = ImageField(title=_("Photo"), description=_("Use 'browse' button to select contact picture"), diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/features/redirect/zmi/container.py --- a/src/pyams_content/features/redirect/zmi/container.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/features/redirect/zmi/container.py Thu Nov 15 12:11:23 2018 +0100 @@ -12,49 +12,45 @@ __docformat__ = 'restructuredtext' - -# import standard library import json -# import interfaces -from pyams_content.features.redirect.interfaces import IRedirectionManagerTarget, IRedirectionManager +from pyramid.decorator import reify +from pyramid.exceptions import NotFound +from pyramid.view import view_config +from z3c.form import button, field +from z3c.table.column import GetAttrColumn +from z3c.table.interfaces import IColumn, IValues +from zope.interface import Interface +from zope.schema import Bool, TextLine + +from pyams_content.features.redirect.interfaces import IRedirectionManager, IRedirectionManagerTarget from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION +from pyams_content.zmi import pyams_content +from pyams_form.form import AJAXAddForm from pyams_form.interfaces.form import IWidgetsSuffixViewletsManager +from pyams_form.schema import CloseButton from pyams_i18n.interfaces import II18n +from pyams_pagelet.pagelet import pagelet_config from pyams_sequence.interfaces import ISequentialIdInfo -from pyams_skin.interfaces import IPageHeader, IUserSkinnable, IContentHelp +from pyams_skin.help import ContentHelp +from pyams_skin.interfaces import IContentHelp, IPageHeader, IUserSkinnable from pyams_skin.interfaces.viewlet import IToolbarViewletManager from pyams_skin.layer import IPyAMSLayer -from pyams_zmi.interfaces.menu import ISiteManagementMenu -from pyams_zmi.layer import IAdminLayer -from z3c.table.interfaces import IValues, IColumn - -# import packages -from pyams_content.zmi import pyams_content -from pyams_form.form import AJAXAddForm -from pyams_form.schema import CloseButton -from pyams_pagelet.pagelet import pagelet_config -from pyams_skin.help import ContentHelp from pyams_skin.page import DefaultPageHeaderAdapter from pyams_skin.skin import apply_skin -from pyams_skin.table import BaseTable, SorterColumn, TrashColumn, I18nColumn, AttributeSwitcherColumn +from pyams_skin.table import AttributeSwitcherColumn, BaseTable, I18nColumn, SorterColumn, TrashColumn from pyams_skin.viewlet.menu import MenuItem from pyams_skin.viewlet.toolbar import ToolbarAction from pyams_template.template import template_config -from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter +from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config from pyams_utils.fanstatic import get_resource_path from pyams_utils.request import copy_request from pyams_utils.url import absolute_url -from pyams_viewlet.viewlet import viewlet_config, Viewlet +from pyams_viewlet.viewlet import Viewlet, viewlet_config from pyams_zmi.form import AdminDialogAddForm +from pyams_zmi.interfaces.menu import ISiteManagementMenu +from pyams_zmi.layer import IAdminLayer from pyams_zmi.view import ContainerAdminView -from pyramid.decorator import reify -from pyramid.exceptions import NotFound -from pyramid.view import view_config -from z3c.form import field, button -from z3c.table.column import GetAttrColumn -from zope.interface import Interface -from zope.schema import TextLine, Bool from pyams_content import _ @@ -224,8 +220,11 @@ def getValue(self, obj): if obj.reference: target = obj.target - return '{0} ({1})'.format(II18n(target).query_attribute('title', request=self.request), - ISequentialIdInfo(target).get_short_oid()) + if target is not None: + return '{0} ({1})'.format(II18n(target).query_attribute('title', request=self.request), + ISequentialIdInfo(target).get_short_oid()) + else: + return self.request.localizer.translate(_("Internal reference: {0} (not found)")).format(obj.reference) else: return super(RedirectionsContainerTargetColumn, self).getValue(obj) diff -r 978a2b9123b9 -r 40deb3d316ac 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 978a2b9123b9 -r 40deb3d316ac src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po --- a/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Thu Nov 15 12:11:23 2018 +0100 @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE 1.0\n" -"POT-Creation-Date: 2018-11-07 18:21+0100\n" +"POT-Creation-Date: 2018-11-14 17:16+0100\n" "PO-Revision-Date: 2015-09-10 10:42+0200\n" "Last-Translator: Thierry Florac \n" "Language-Team: French\n" @@ -470,7 +470,7 @@ #: src/pyams_content/component/gallery/zmi/file.py:57 #: src/pyams_content/component/gallery/zmi/file.py:69 -#: src/pyams_content/component/gallery/zmi/paragraph.py:163 +#: src/pyams_content/component/gallery/zmi/paragraph.py:172 msgid "Add media(s)" msgstr "Ajouter un média / un groupe de médias (zip)" @@ -490,11 +490,11 @@ msgid "Audio content" msgstr "Contenu audio associé" -#: src/pyams_content/component/gallery/zmi/__init__.py:57 +#: src/pyams_content/component/gallery/zmi/__init__.py:61 msgid "Update gallery properties" msgstr "Propriétés de la galerie de médias" -#: src/pyams_content/component/gallery/zmi/__init__.py:84 +#: src/pyams_content/component/gallery/zmi/__init__.py:88 msgid "Update gallery contents" msgstr "Contenu de la galerie de médias" @@ -508,35 +508,26 @@ "Vous pouvez déposer les médias un par un, ou en nombre en les réunissant au " "préalable dans un fichier ZIP" -#: src/pyams_content/component/gallery/zmi/paragraph.py:61 +#: src/pyams_content/component/gallery/zmi/paragraph.py:63 msgid "Medias gallery..." msgstr "Galerie de médias" -#: src/pyams_content/component/gallery/zmi/paragraph.py:74 +#: src/pyams_content/component/gallery/zmi/paragraph.py:76 msgid "Add new gallery" msgstr "Ajout d'une galerie de médias" -#: src/pyams_content/component/gallery/zmi/paragraph.py:110 +#: src/pyams_content/component/gallery/zmi/paragraph.py:98 msgid "Edit gallery properties" msgstr "Propriétés de la galerie de médias" -#: src/pyams_content/component/gallery/zmi/paragraph.py:95 -msgid "(gallery contains 1 media)" -msgstr "(1 média dans la galerie)" - -#: src/pyams_content/component/gallery/zmi/paragraph.py:97 -msgid "(empty gallery)" -msgstr "(aucun média dans la galerie)" - -#: src/pyams_content/component/gallery/zmi/paragraph.py:184 +#: src/pyams_content/component/gallery/zmi/paragraph.py:134 +msgid "Visible medias" +msgstr "Médias visibles" + +#: src/pyams_content/component/gallery/zmi/paragraph.py:193 msgid "Media(s) successfully added" msgstr "Les médias ont été ajoutés dans la galerie." -#: src/pyams_content/component/gallery/zmi/paragraph.py:93 -#, python-format -msgid "(gallery contains {0} medias)" -msgstr "({0} medias dans la galerie)" - #: src/pyams_content/component/gallery/zmi/templates/gallery-medias.pt:12 msgid "Gallery medias" msgstr "Contenu de la galerie" @@ -1039,69 +1030,87 @@ msgid "Presentation template used for this header" msgstr "Mode de rendu utilisé par ce chapô" -#: src/pyams_content/component/paragraph/interfaces/contact.py:44 +#: src/pyams_content/component/paragraph/interfaces/contact.py:41 msgid "Contact card" msgstr "Fiche contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:51 +#: src/pyams_content/component/paragraph/interfaces/contact.py:48 msgid "Contact identity" msgstr "Nom du contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:52 +#: src/pyams_content/component/paragraph/interfaces/contact.py:49 msgid "Name of the contact" msgstr "Nom complet du contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:55 +#: src/pyams_content/component/paragraph/interfaces/contact.py:52 #: src/pyams_content/component/paragraph/interfaces/verbatim.py:48 msgid "In charge of" msgstr "Fonction" -#: src/pyams_content/component/paragraph/interfaces/contact.py:56 +#: src/pyams_content/component/paragraph/interfaces/contact.py:53 msgid "Label of contact function" msgstr "Fonction du contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:59 -msgid "Email address" -msgstr "Adresse de messagerie" +#: src/pyams_content/component/paragraph/interfaces/contact.py:56 +msgid "Company" +msgstr "Structure" + +#: src/pyams_content/component/paragraph/interfaces/contact.py:57 +msgid "Business name of the employer" +msgstr "Nom de la structure ou de la société du contact" #: src/pyams_content/component/paragraph/interfaces/contact.py:60 +msgid "Email address" +msgstr "Adresse de messagerie" + +#: src/pyams_content/component/paragraph/interfaces/contact.py:61 msgid "Contact email address" msgstr "Adresse de messagerie \"stricte\", soit uniquement \"xxx@yyy.com\"" -#: src/pyams_content/component/paragraph/interfaces/contact.py:63 +#: src/pyams_content/component/paragraph/interfaces/contact.py:64 msgid "Contact form" msgstr "Formulaire de contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:64 +#: src/pyams_content/component/paragraph/interfaces/contact.py:65 msgid "Reference of contact form" msgstr "Référence d'un formulaire de contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:68 +#: src/pyams_content/component/paragraph/interfaces/contact.py:69 +msgid "Phone number" +msgstr "Téléphone" + +#: src/pyams_content/component/paragraph/interfaces/contact.py:70 +msgid "" +"Phone number in international format.\n" +" E.g. +33 ...." +msgstr "Numéro de téléphone, au format international si besoin (+33...) " + +#: src/pyams_content/component/paragraph/interfaces/contact.py:73 msgid "Photo" msgstr "Photo" -#: src/pyams_content/component/paragraph/interfaces/contact.py:69 +#: src/pyams_content/component/paragraph/interfaces/contact.py:74 msgid "Use 'browse' button to select contact picture" msgstr "Utilisez le bouton 'Parcourir' pour sélectionner la photo du contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:77 +#: src/pyams_content/component/paragraph/interfaces/contact.py:82 msgid "Address" msgstr "Adresse" -#: src/pyams_content/component/paragraph/interfaces/contact.py:80 +#: src/pyams_content/component/paragraph/interfaces/contact.py:85 msgid "Contact template" msgstr "Mode de rendu" -#: src/pyams_content/component/paragraph/interfaces/contact.py:81 +#: src/pyams_content/component/paragraph/interfaces/contact.py:86 msgid "Presentation template used for this contact" msgstr "Modèle de présentation utilisé pour ce contact" -#: src/pyams_content/component/paragraph/interfaces/contact.py:73 +#: src/pyams_content/component/paragraph/interfaces/contact.py:78 #: src/pyams_content/component/paragraph/interfaces/map.py:48 msgid "GPS location" msgstr "Position GPS" -#: src/pyams_content/component/paragraph/interfaces/contact.py:74 +#: src/pyams_content/component/paragraph/interfaces/contact.py:79 msgid "GPS coordinates used to locate contact" msgstr "Coordonnées GPS de situation du contact" @@ -1687,14 +1696,14 @@ #: src/pyams_content/shared/common/zmi/workflow.py:206 #: src/pyams_content/shared/common/zmi/workflow.py:246 #: src/pyams_content/shared/common/zmi/workflow.py:300 -#: src/pyams_content/shared/common/zmi/workflow.py:389 -#: src/pyams_content/shared/common/zmi/workflow.py:445 -#: src/pyams_content/shared/common/zmi/workflow.py:485 -#: src/pyams_content/shared/common/zmi/workflow.py:526 -#: src/pyams_content/shared/common/zmi/workflow.py:569 -#: src/pyams_content/shared/common/zmi/workflow.py:609 -#: src/pyams_content/shared/common/zmi/workflow.py:650 -#: src/pyams_content/shared/common/zmi/workflow.py:701 +#: src/pyams_content/shared/common/zmi/workflow.py:391 +#: src/pyams_content/shared/common/zmi/workflow.py:447 +#: src/pyams_content/shared/common/zmi/workflow.py:487 +#: src/pyams_content/shared/common/zmi/workflow.py:528 +#: src/pyams_content/shared/common/zmi/workflow.py:571 +#: src/pyams_content/shared/common/zmi/workflow.py:611 +#: src/pyams_content/shared/common/zmi/workflow.py:652 +#: src/pyams_content/shared/common/zmi/workflow.py:703 msgid "Cancel" msgstr "Annuler" @@ -1970,7 +1979,7 @@ #: src/pyams_content/component/illustration/thesaurus.py:32 #: src/pyams_content/component/illustration/zmi/__init__.py:56 #: src/pyams_content/component/illustration/zmi/__init__.py:126 -#: src/pyams_content/component/illustration/zmi/paragraph.py:153 +#: src/pyams_content/component/illustration/zmi/paragraph.py:155 msgid "Illustration" msgstr "Illustration" @@ -2163,7 +2172,7 @@ #: src/pyams_content/interfaces/__init__.py:113 #: src/pyams_content/features/review/interfaces.py:74 -#: src/pyams_content/shared/view/interfaces.py:37 +#: src/pyams_content/shared/view/interfaces.py:39 msgid "Creation date" msgstr "Date de création" @@ -2321,8 +2330,8 @@ "temporaire" #: src/pyams_content/features/redirect/interfaces.py:56 -#: src/pyams_content/features/redirect/zmi/container.py:210 -#: src/pyams_content/features/redirect/zmi/container.py:366 +#: src/pyams_content/features/redirect/zmi/container.py:206 +#: src/pyams_content/features/redirect/zmi/container.py:365 msgid "URL pattern" msgstr "Schéma d'URL" @@ -2355,31 +2364,31 @@ msgid "You must provide an internal reference OR a target URL" msgstr "Vous devez fournir une référence interne OU une URL de redirection !" -#: src/pyams_content/features/redirect/zmi/container.py:67 +#: src/pyams_content/features/redirect/zmi/container.py:63 msgid "Redirections" msgstr "Redirections" -#: src/pyams_content/features/redirect/zmi/container.py:161 +#: src/pyams_content/features/redirect/zmi/container.py:157 msgid "Enable/disable rule" msgstr "Activer/désactiver la règle" -#: src/pyams_content/features/redirect/zmi/container.py:188 +#: src/pyams_content/features/redirect/zmi/container.py:184 msgid "Chain/unchain rule" msgstr "Enchaîner la règle avec la suivante" -#: src/pyams_content/features/redirect/zmi/container.py:220 +#: src/pyams_content/features/redirect/zmi/container.py:216 msgid "Target" msgstr "Cible" -#: src/pyams_content/features/redirect/zmi/container.py:246 +#: src/pyams_content/features/redirect/zmi/container.py:245 msgid "Redirections list" msgstr "Liste des règles de redirection" -#: src/pyams_content/features/redirect/zmi/container.py:261 +#: src/pyams_content/features/redirect/zmi/container.py:260 msgid "Redirection rules" msgstr "Règles de redirection" -#: src/pyams_content/features/redirect/zmi/container.py:262 +#: src/pyams_content/features/redirect/zmi/container.py:261 msgid "" "Redirection rules are use to handle redirections responses when a request " "generates \n" @@ -2416,47 +2425,52 @@ "\", la nouvelle URL qu'elle génère est passée aux règles suivantes, jusqu'à " "ce qu'une règle s'applique à cette nouvelle URL.\n" -#: src/pyams_content/features/redirect/zmi/container.py:288 +#: src/pyams_content/features/redirect/zmi/container.py:287 msgid "Test" msgstr "Tester !" -#: src/pyams_content/features/redirect/zmi/container.py:323 +#: src/pyams_content/features/redirect/zmi/container.py:322 msgid "Test redirection rules" msgstr "Test des règles de redirection" -#: src/pyams_content/features/redirect/zmi/container.py:301 +#: src/pyams_content/features/redirect/zmi/container.py:300 msgid "Test URL" msgstr "URL à tester" +#: src/pyams_content/features/redirect/zmi/container.py:303 +msgid "Check inactive rules?" +msgstr "Tester les règles inactive ?" + #: src/pyams_content/features/redirect/zmi/container.py:304 -msgid "Check inactive rules?" -msgstr "Tester les règles inactive ?" - -#: src/pyams_content/features/redirect/zmi/container.py:305 msgid "If 'yes', inactive rules will also be tested" msgstr "Si 'oui', les règles inactives seront également testées" +#: src/pyams_content/features/redirect/zmi/container.py:312 +msgid "Close" +msgstr "Fermer" + #: src/pyams_content/features/redirect/zmi/container.py:313 -msgid "Close" -msgstr "Fermer" - -#: src/pyams_content/features/redirect/zmi/container.py:314 msgid "Test rules" msgstr "Tester cette URL" -#: src/pyams_content/features/redirect/zmi/container.py:123 +#: src/pyams_content/features/redirect/zmi/container.py:119 msgid "No currently defined redirection rule." msgstr "Aucune règle de redirection n'est définie actuellement." -#: src/pyams_content/features/redirect/zmi/container.py:371 +#: src/pyams_content/features/redirect/zmi/container.py:370 msgid "No matching rule!" msgstr "Aucune règle ne correspond !" -#: src/pyams_content/features/redirect/zmi/container.py:365 +#: src/pyams_content/features/redirect/zmi/container.py:227 +#, python-format +msgid "Internal reference: {0} (not found)" +msgstr "Référence interne: {0} (non trouvée)" + +#: src/pyams_content/features/redirect/zmi/container.py:364 msgid "Input URL" msgstr "URL en entrée" -#: src/pyams_content/features/redirect/zmi/container.py:367 +#: src/pyams_content/features/redirect/zmi/container.py:366 msgid "Output URL" msgstr "URL générée" @@ -2727,10 +2741,6 @@ msgid "Edit renderer properties" msgstr "Propriétés de ce mode de rendu" -#: src/pyams_content/features/renderer/skin/__init__.py:65 -msgid "Hidden content" -msgstr "NON affiché" - #: src/pyams_content/features/preview/zmi/__init__.py:62 msgid "Content preview" msgstr "Aperçu du contenu" @@ -2776,10 +2786,6 @@ msgid "Don't inherit parent footer" msgstr "Ne pas hériter du pied de pages du parent" -#: src/pyams_content/features/footer/skin/__init__.py:91 -msgid "Hidden footer" -msgstr "Ne pas afficher de pied de pages" - #: src/pyams_content/features/menu/interfaces.py:60 msgid "Menu title" msgstr "Libellé" @@ -2828,30 +2834,34 @@ msgid "Link has no illustration" msgstr "Le lien n'a pas d'illustration" -#: src/pyams_content/features/menu/zmi/__init__.py:77 +#: src/pyams_content/features/menu/zmi/__init__.py:80 msgid "Add menu..." msgstr "Ajouter une entrée" -#: src/pyams_content/features/menu/zmi/__init__.py:88 +#: src/pyams_content/features/menu/zmi/__init__.py:91 msgid "Add new menu" msgstr "Ajout d'un menu" -#: src/pyams_content/features/menu/zmi/__init__.py:121 +#: src/pyams_content/features/menu/zmi/__init__.py:124 msgid "Edit menu properties" msgstr "Propriétés du menu" -#: src/pyams_content/features/menu/zmi/__init__.py:215 +#: src/pyams_content/features/menu/zmi/__init__.py:218 #: src/pyams_content/shared/form/interfaces.py:60 #: src/pyams_content/shared/form/zmi/field.py:167 #: src/pyams_content/shared/common/interfaces/types.py:47 msgid "Label" msgstr "Libellé" -#: src/pyams_content/features/menu/zmi/__init__.py:108 +#: src/pyams_content/features/menu/zmi/__init__.py:230 +msgid "Inner content" +msgstr "Contenu interne" + +#: src/pyams_content/features/menu/zmi/__init__.py:111 msgid "Menu was correctly added." msgstr "Le menu a été ajouté." -#: src/pyams_content/features/menu/zmi/__init__.py:395 +#: src/pyams_content/features/menu/zmi/__init__.py:415 msgid "Link was correctly added." msgstr "Le lien a été ajouté." @@ -3051,9 +3061,25 @@ msgid "Don't inherit parent header" msgstr "Ne pas hériter de l'en-tête de pages du parent" -#: src/pyams_content/features/header/skin/__init__.py:96 -msgid "Hidden header" -msgstr "Ne pas afficher d'en-tête de pages" +#: src/pyams_content/zmi/viewlet/toplinks/__init__.py:43 +msgid "Shared sites" +msgstr "Sites et blogs" + +#: src/pyams_content/zmi/viewlet/toplinks/__init__.py:64 +msgid "Shared contents" +msgstr "Gabarits" + +#: src/pyams_content/zmi/viewlet/toplinks/__init__.py:87 +msgid "Shared tools" +msgstr "Outils" + +#: src/pyams_content/zmi/viewlet/toplinks/__init__.py:110 +msgid "My roles" +msgstr "Mes rôles" + +#: src/pyams_content/zmi/viewlet/toplinks/templates/user-addings.pt:7 +msgid "Create new content" +msgstr "Créer un nouveau contenu" #: src/pyams_content/profile/interfaces.py:33 msgid "User favorites" @@ -3075,26 +3101,6 @@ msgid "Admin. profile" msgstr "Profil intervenant" -#: src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:43 -msgid "Shared sites" -msgstr "Sites et blogs" - -#: src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:64 -msgid "Shared contents" -msgstr "Gabarits" - -#: src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:87 -msgid "Shared tools" -msgstr "Outils" - -#: src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:110 -msgid "My roles" -msgstr "Mes rôles" - -#: src/pyams_content/skin/zmi/viewlet/toplinks/templates/user-addings.pt:7 -msgid "Create new content" -msgstr "Créer un nouveau contenu" - #: src/pyams_content/root/__init__.py:63 msgid "Site root" msgstr "Racine du site" @@ -3800,160 +3806,166 @@ "Trier tous les résultats sur la date de première publication (du plus récent " "au plus ancien)" -#: src/pyams_content/shared/view/interfaces.py:29 +#: src/pyams_content/shared/view/interfaces.py:31 msgid "View" msgstr "Vue" -#: src/pyams_content/shared/view/interfaces.py:160 -msgid "Always include selected internal references" -msgstr "Toujours inclure toutes les références internes" - -#: src/pyams_content/shared/view/interfaces.py:161 -msgid "Include selected internal references only if empty" -msgstr "Inclure les références internes seulement lorsque la vue est vide" - -#: src/pyams_content/shared/view/interfaces.py:38 +#: src/pyams_content/shared/view/interfaces.py:40 msgid "Last update date" msgstr "Date de dernière modification" -#: src/pyams_content/shared/view/interfaces.py:39 +#: src/pyams_content/shared/view/interfaces.py:41 msgid "Current publication date" msgstr "Date de publication de la version actuelle" -#: src/pyams_content/shared/view/interfaces.py:40 +#: src/pyams_content/shared/view/interfaces.py:42 msgid "First publication date" msgstr "Date de première publication" -#: src/pyams_content/shared/view/interfaces.py:58 +#: src/pyams_content/shared/view/interfaces.py:60 msgid "Select context type?" msgstr "Même gabarit que le contexte ?" -#: src/pyams_content/shared/view/interfaces.py:59 +#: src/pyams_content/shared/view/interfaces.py:61 msgid "If 'yes', content type will be extracted from context" msgstr "" "Si 'oui', seuls des contenus du même gabarit que le contexte seront " "automatiquement sélectionnés" -#: src/pyams_content/shared/view/interfaces.py:63 +#: src/pyams_content/shared/view/interfaces.py:65 msgid "Other content types" msgstr "Autres gabarits" -#: src/pyams_content/shared/view/interfaces.py:64 +#: src/pyams_content/shared/view/interfaces.py:66 msgid "Selected content types; leave empty for all" msgstr "" "Autres gabarits sélectionnés ; si l'on n'extrait pas le gabarit du contexte " "et si cette sélection est vide, tous les gabarits seront pris en charge" -#: src/pyams_content/shared/view/interfaces.py:71 +#: src/pyams_content/shared/view/interfaces.py:73 msgid "Select context data type?" msgstr "Même type que le contexte ?" -#: src/pyams_content/shared/view/interfaces.py:72 +#: src/pyams_content/shared/view/interfaces.py:74 msgid "" "If 'yes', content data type (if available) will be extracted from context" msgstr "" "Si 'oui', et si le contexte de la vue est \"typé\", seuls des contenus du " "même type que le contexte seront automatiquement sélectionnés" -#: src/pyams_content/shared/view/interfaces.py:77 +#: src/pyams_content/shared/view/interfaces.py:79 msgid "Other data types" msgstr "Autres types de contenus" -#: src/pyams_content/shared/view/interfaces.py:78 +#: src/pyams_content/shared/view/interfaces.py:80 msgid "Selected data types; leave empty for all" msgstr "" "Autres types de contenus sélectionnés ; si l'on n'extrait pas le type du " "contexte et si cette sélection est vide, tous les contenus (typés ou non) " "seront pris en charge" -#: src/pyams_content/shared/view/interfaces.py:85 +#: src/pyams_content/shared/view/interfaces.py:87 msgid "Order by" msgstr "Ordre de tri" -#: src/pyams_content/shared/view/interfaces.py:86 +#: src/pyams_content/shared/view/interfaces.py:88 msgid "Property to use to sort results" msgstr "" "Propriété utilisée pour trier les résultats ; par défaut, le tri se fait en " "ordre inverse, donc du plus récent au plus ancien" -#: src/pyams_content/shared/view/interfaces.py:91 +#: src/pyams_content/shared/view/interfaces.py:93 msgid "Reversed order?" msgstr "Ordre inverse ?" -#: src/pyams_content/shared/view/interfaces.py:92 +#: src/pyams_content/shared/view/interfaces.py:94 msgid "If 'yes', items order will be reversed" msgstr "" "Si 'non', le tri se fera en ordre \"naturel\", donc du plus ancien au plus " "récent" -#: src/pyams_content/shared/view/interfaces.py:96 +#: src/pyams_content/shared/view/interfaces.py:98 #: src/pyams_content/shared/view/portlet/interfaces.py:91 msgid "Results count limit" msgstr "Limite de résultats" -#: src/pyams_content/shared/view/interfaces.py:97 +#: src/pyams_content/shared/view/interfaces.py:99 msgid "Maximum number of results that the view may retrieve" msgstr "Nombre maximal de résultats que la vue doit renvoyer" -#: src/pyams_content/shared/view/interfaces.py:170 +#: src/pyams_content/shared/view/interfaces.py:163 +msgid "Always include selected internal references" +msgstr "Toujours inclure toutes les références internes" + +#: src/pyams_content/shared/view/interfaces.py:164 +msgid "Include selected internal references only if view is empty" +msgstr "Inclure les références internes seulement lorsque la vue est vide" + +#: src/pyams_content/shared/view/interfaces.py:165 +msgid "Include ONLY selected references (no search will be made)" +msgstr "" +"N'inclure QUE les références internes (aucune autre recherche ne sera " +"effectuée)" + +#: src/pyams_content/shared/view/interfaces.py:174 msgid "Internal references usage" msgstr "Utilisation des références internes" -#: src/pyams_content/shared/view/interfaces.py:171 +#: src/pyams_content/shared/view/interfaces.py:175 msgid "Specify how selected references are included into view results" msgstr "" "Indique comment les références internes indiquées seront intégrées à la " "liste des résultats" -#: src/pyams_content/shared/view/interfaces.py:176 +#: src/pyams_content/shared/view/interfaces.py:180 msgid "Exclude context?" msgstr "Exclure le contexte ?" -#: src/pyams_content/shared/view/interfaces.py:177 +#: src/pyams_content/shared/view/interfaces.py:181 msgid "If 'yes', context will be excluded from results list" msgstr "" "Si 'oui', le contexte d'application de la vue sera automatiquement exclu de " "la liste des résultats" -#: src/pyams_content/shared/view/interfaces.py:188 +#: src/pyams_content/shared/view/interfaces.py:192 msgid "Select context tags?" msgstr "Tags du contexte ?" -#: src/pyams_content/shared/view/interfaces.py:189 +#: src/pyams_content/shared/view/interfaces.py:193 msgid "If 'yes', tags will be extracted from context" msgstr "" "Si 'oui', les tags associés au contexte d'application de la vue seront " "automatiquement sélectionnés" -#: src/pyams_content/shared/view/interfaces.py:193 +#: src/pyams_content/shared/view/interfaces.py:197 msgid "Other tags" msgstr "Autres tags" -#: src/pyams_content/shared/view/interfaces.py:209 +#: src/pyams_content/shared/view/interfaces.py:213 msgid "Select context themes?" msgstr "Thèmes du contexte ?" -#: src/pyams_content/shared/view/interfaces.py:210 +#: src/pyams_content/shared/view/interfaces.py:214 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.py:214 +#: src/pyams_content/shared/view/interfaces.py:218 msgid "Other themes" msgstr "Autres thèmes" -#: src/pyams_content/shared/view/interfaces.py:230 +#: src/pyams_content/shared/view/interfaces.py:234 msgid "Select context collections?" msgstr "Collections du contexte ?" -#: src/pyams_content/shared/view/interfaces.py:231 +#: src/pyams_content/shared/view/interfaces.py:235 msgid "If 'yes', collections will be extracted from context" msgstr "" "Si 'oui', les collections associées au contexte d'application de la vue " "seront automatiquement sélectionnés" -#: src/pyams_content/shared/view/interfaces.py:235 +#: src/pyams_content/shared/view/interfaces.py:239 msgid "Other collections" msgstr "Autres collections" @@ -4056,10 +4068,34 @@ msgid "No result found" msgstr "aucun" -#: src/pyams_content/shared/view/zmi/properties.py:45 +#: src/pyams_content/shared/view/zmi/properties.py:43 msgid "Main view settings" msgstr "Paramètres de la vue" +#: src/pyams_content/shared/view/zmi/properties.py:69 +msgid "" +"These settings apply to search made by the view.\n" +"\n" +"If you select the option \"Include ONLY selected references\", via the " +"\"References\" menu, only \n" +"selected references will be selected (if published) and no real search will " +"be made !\n" +"\n" +"In other modes, and if no search criteria is defined (in this form, or in " +"other settings forms), ALL\n" +"published contents will be selected by the view !!\n" +msgstr "" +"Ces paramètres s'appliquent aux recherches effectuées par la vue.\n" +"\n" +"Si vous sélectionnez l'option \"N'inclure QUE les références internes\", via " +"le menu \"Références\", seules les références imposées seront sélectionnées " +"(si elles sont publiées) et aucune recherche complémentaire ne sera " +"effectuée !\n" +"\n" +"Dans les autres modes, si aucun critère de recherche n'est indiqué (dans ce " +"formulaire, ou via les autres menus), ce sont TOUS les contenus publiées qui " +"seront sélectionnés par la vue !!\n" + #: src/pyams_content/shared/view/zmi/__init__.py:44 msgid "This view" msgstr "Cette vue" @@ -4933,7 +4969,7 @@ msgid "Change owner" msgstr "Changer le propriétaire" -#: src/pyams_content/shared/common/zmi/workflow.py:843 +#: src/pyams_content/shared/common/zmi/workflow.py:845 msgid "Prior checks" msgstr "Contrôles préalables : avez-vous ?" @@ -4955,32 +4991,32 @@ msgid "Publish" msgstr "Publier" -#: src/pyams_content/shared/common/zmi/workflow.py:390 +#: src/pyams_content/shared/common/zmi/workflow.py:392 msgid "Request retire" msgstr "Demander le retrait" -#: src/pyams_content/shared/common/zmi/workflow.py:446 +#: src/pyams_content/shared/common/zmi/workflow.py:448 msgid "Cancel retire request" msgstr "Annuler la demande de retrait" -#: src/pyams_content/shared/common/zmi/workflow.py:486 +#: src/pyams_content/shared/common/zmi/workflow.py:488 msgid "Retire" msgstr "Retirer" -#: src/pyams_content/shared/common/zmi/workflow.py:527 +#: src/pyams_content/shared/common/zmi/workflow.py:529 #: src/pyams_content/workflow/__init__.py:437 msgid "Request archive" msgstr "Demander l'archivage" -#: src/pyams_content/shared/common/zmi/workflow.py:570 +#: src/pyams_content/shared/common/zmi/workflow.py:572 msgid "Cancel archive request" msgstr "Annuler la demande d'archivage" -#: src/pyams_content/shared/common/zmi/workflow.py:610 +#: src/pyams_content/shared/common/zmi/workflow.py:612 msgid "Archive" msgstr "Archiver" -#: src/pyams_content/shared/common/zmi/workflow.py:651 +#: src/pyams_content/shared/common/zmi/workflow.py:653 #: src/pyams_content/workflow/__init__.py:502 #: src/pyams_content/workflow/__init__.py:514 #: src/pyams_content/workflow/__init__.py:526 @@ -4991,39 +5027,39 @@ msgid "Create new version" msgstr "Créer une nouvelle version" -#: src/pyams_content/shared/common/zmi/workflow.py:702 +#: src/pyams_content/shared/common/zmi/workflow.py:704 #: src/pyams_content/workflow/__init__.py:562 #: src/pyams_content/workflow/basic.py:249 msgid "Delete version" msgstr "Supprimer cette version" -#: src/pyams_content/shared/common/zmi/workflow.py:789 +#: src/pyams_content/shared/common/zmi/workflow.py:791 msgid "Previewed content?" msgstr "Prévisualisé ce contenu ?" -#: src/pyams_content/shared/common/zmi/workflow.py:793 +#: src/pyams_content/shared/common/zmi/workflow.py:795 msgid "Verified content?" msgstr "Audité ce contenu ?" #: src/pyams_content/shared/common/zmi/workflow.py:177 -#: src/pyams_content/shared/common/zmi/workflow.py:359 +#: src/pyams_content/shared/common/zmi/workflow.py:361 msgid "Publication start date is required" msgstr "La date de début de publication est obligatoire" #: src/pyams_content/shared/common/zmi/workflow.py:270 -#: src/pyams_content/shared/common/zmi/workflow.py:416 +#: src/pyams_content/shared/common/zmi/workflow.py:418 msgid "A comment is required" msgstr "Le commentaire est obligatoire" -#: src/pyams_content/shared/common/zmi/workflow.py:728 +#: src/pyams_content/shared/common/zmi/workflow.py:730 msgid "Delete content" msgstr "Supprimer définitivement ce contenu" -#: src/pyams_content/shared/common/zmi/workflow.py:737 +#: src/pyams_content/shared/common/zmi/workflow.py:739 msgid "Delete definitively" msgstr "Supprimer définitivement" -#: src/pyams_content/shared/common/zmi/workflow.py:866 +#: src/pyams_content/shared/common/zmi/workflow.py:868 msgid "" "You must confirm that you previewed and checked this content before " "requesting publication!!" @@ -5036,7 +5072,7 @@ msgid "{state} | by {principal}" msgstr "{state} | par {principal}" -#: src/pyams_content/shared/common/zmi/workflow.py:869 +#: src/pyams_content/shared/common/zmi/workflow.py:871 msgid "" "You must confirm that you checked this content before requesting " "publication!!" @@ -5521,7 +5557,7 @@ msgid "Rent existing content" msgstr "Lier un contenu existant" -#: src/pyams_content/shared/site/zmi/link.py:134 +#: src/pyams_content/shared/site/zmi/link.py:137 msgid "Edit content link properties" msgstr "Propriétés du lien" @@ -6107,6 +6143,27 @@ msgid "Add automatic content archiver" msgstr "Ajout d'une tâche d'archivage automatique" +#~ msgid "Only include internal references" +#~ msgstr "N'inclure que les références internes, sans effectuer de recherche" + +#~ msgid "(gallery contains 1 media)" +#~ msgstr "(1 média dans la galerie)" + +#~ msgid "(empty gallery)" +#~ msgstr "(aucun média dans la galerie)" + +#~ msgid "(gallery contains {0} medias)" +#~ msgstr "({0} medias dans la galerie)" + +#~ msgid "Hidden content" +#~ msgstr "NON affiché" + +#~ msgid "Hidden footer" +#~ msgstr "Ne pas afficher de pied de pages" + +#~ msgid "Hidden header" +#~ msgstr "Ne pas afficher d'en-tête de pages" + #~ msgid "Consult content" #~ msgstr "Accéder au contenu" @@ -6387,9 +6444,6 @@ #~ msgid "Add new identity card paragraph" #~ msgstr "Ajout d'une vidéo" -#~ msgid "internal reference is not defined" -#~ msgstr "la référence interne n'est pas définie" - #~ msgid "internal references are not defined" #~ msgstr "aucun logo sélectionné" diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/locales/pyams_content.pot --- a/src/pyams_content/locales/pyams_content.pot Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/locales/pyams_content.pot Thu Nov 15 12:11:23 2018 +0100 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE 1.0\n" -"POT-Creation-Date: 2018-11-07 18:21+0100\n" +"POT-Creation-Date: 2018-11-14 17:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" @@ -456,7 +456,7 @@ #: ./src/pyams_content/component/gallery/zmi/file.py:57 #: ./src/pyams_content/component/gallery/zmi/file.py:69 -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:163 +#: ./src/pyams_content/component/gallery/zmi/paragraph.py:172 msgid "Add media(s)" msgstr "" @@ -476,11 +476,11 @@ msgid "Audio content" msgstr "" -#: ./src/pyams_content/component/gallery/zmi/__init__.py:57 +#: ./src/pyams_content/component/gallery/zmi/__init__.py:61 msgid "Update gallery properties" msgstr "" -#: ./src/pyams_content/component/gallery/zmi/__init__.py:84 +#: ./src/pyams_content/component/gallery/zmi/__init__.py:88 msgid "Update gallery contents" msgstr "" @@ -492,35 +492,26 @@ msgid "You can upload a single file or choose to upload a whole ZIP archive" msgstr "" -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:61 +#: ./src/pyams_content/component/gallery/zmi/paragraph.py:63 msgid "Medias gallery..." msgstr "" -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:74 +#: ./src/pyams_content/component/gallery/zmi/paragraph.py:76 msgid "Add new gallery" msgstr "" -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:110 +#: ./src/pyams_content/component/gallery/zmi/paragraph.py:98 msgid "Edit gallery properties" msgstr "" -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:95 -msgid "(gallery contains 1 media)" -msgstr "" - -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:97 -msgid "(empty gallery)" -msgstr "" - -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:184 +#: ./src/pyams_content/component/gallery/zmi/paragraph.py:134 +msgid "Visible medias" +msgstr "" + +#: ./src/pyams_content/component/gallery/zmi/paragraph.py:193 msgid "Media(s) successfully added" msgstr "" -#: ./src/pyams_content/component/gallery/zmi/paragraph.py:93 -#, python-format -msgid "(gallery contains {0} medias)" -msgstr "" - #: ./src/pyams_content/component/gallery/zmi/templates/gallery-medias.pt:12 msgid "Gallery medias" msgstr "" @@ -989,69 +980,87 @@ msgid "Presentation template used for this header" msgstr "" -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:44 +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:41 msgid "Contact card" msgstr "" -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:51 +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:48 msgid "Contact identity" msgstr "" +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:49 +msgid "Name of the contact" +msgstr "" + #: ./src/pyams_content/component/paragraph/interfaces/contact.py:52 -msgid "Name of the contact" -msgstr "" - -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:55 #: ./src/pyams_content/component/paragraph/interfaces/verbatim.py:48 msgid "In charge of" msgstr "" +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:53 +msgid "Label of contact function" +msgstr "" + #: ./src/pyams_content/component/paragraph/interfaces/contact.py:56 -msgid "Label of contact function" -msgstr "" - -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:59 -msgid "Email address" +msgid "Company" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:57 +msgid "Business name of the employer" msgstr "" #: ./src/pyams_content/component/paragraph/interfaces/contact.py:60 +msgid "Email address" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:61 msgid "Contact email address" msgstr "" -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:63 -msgid "Contact form" -msgstr "" - #: ./src/pyams_content/component/paragraph/interfaces/contact.py:64 +msgid "Contact form" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:65 msgid "Reference of contact form" msgstr "" -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:68 -msgid "Photo" -msgstr "" - #: ./src/pyams_content/component/paragraph/interfaces/contact.py:69 -msgid "Use 'browse' button to select contact picture" -msgstr "" - -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:77 -msgid "Address" -msgstr "" - -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:80 -msgid "Contact template" -msgstr "" - -#: ./src/pyams_content/component/paragraph/interfaces/contact.py:81 -msgid "Presentation template used for this contact" +msgid "Phone number" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:70 +msgid "" +"Phone number in international format.\n" +" E.g. +33 ...." msgstr "" #: ./src/pyams_content/component/paragraph/interfaces/contact.py:73 -#: ./src/pyams_content/component/paragraph/interfaces/map.py:48 -msgid "GPS location" +msgid "Photo" msgstr "" #: ./src/pyams_content/component/paragraph/interfaces/contact.py:74 +msgid "Use 'browse' button to select contact picture" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:82 +msgid "Address" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:85 +msgid "Contact template" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:86 +msgid "Presentation template used for this contact" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:78 +#: ./src/pyams_content/component/paragraph/interfaces/map.py:48 +msgid "GPS location" +msgstr "" + +#: ./src/pyams_content/component/paragraph/interfaces/contact.py:79 msgid "GPS coordinates used to locate contact" msgstr "" @@ -1597,14 +1606,14 @@ #: ./src/pyams_content/shared/common/zmi/workflow.py:206 #: ./src/pyams_content/shared/common/zmi/workflow.py:246 #: ./src/pyams_content/shared/common/zmi/workflow.py:300 -#: ./src/pyams_content/shared/common/zmi/workflow.py:389 -#: ./src/pyams_content/shared/common/zmi/workflow.py:445 -#: ./src/pyams_content/shared/common/zmi/workflow.py:485 -#: ./src/pyams_content/shared/common/zmi/workflow.py:526 -#: ./src/pyams_content/shared/common/zmi/workflow.py:569 -#: ./src/pyams_content/shared/common/zmi/workflow.py:609 -#: ./src/pyams_content/shared/common/zmi/workflow.py:650 -#: ./src/pyams_content/shared/common/zmi/workflow.py:701 +#: ./src/pyams_content/shared/common/zmi/workflow.py:391 +#: ./src/pyams_content/shared/common/zmi/workflow.py:447 +#: ./src/pyams_content/shared/common/zmi/workflow.py:487 +#: ./src/pyams_content/shared/common/zmi/workflow.py:528 +#: ./src/pyams_content/shared/common/zmi/workflow.py:571 +#: ./src/pyams_content/shared/common/zmi/workflow.py:611 +#: ./src/pyams_content/shared/common/zmi/workflow.py:652 +#: ./src/pyams_content/shared/common/zmi/workflow.py:703 msgid "Cancel" msgstr "" @@ -1866,7 +1875,7 @@ #: ./src/pyams_content/component/illustration/thesaurus.py:32 #: ./src/pyams_content/component/illustration/zmi/__init__.py:56 #: ./src/pyams_content/component/illustration/zmi/__init__.py:126 -#: ./src/pyams_content/component/illustration/zmi/paragraph.py:153 +#: ./src/pyams_content/component/illustration/zmi/paragraph.py:155 msgid "Illustration" msgstr "" @@ -2047,7 +2056,7 @@ #: ./src/pyams_content/interfaces/__init__.py:113 #: ./src/pyams_content/features/review/interfaces.py:74 -#: ./src/pyams_content/shared/view/interfaces.py:37 +#: ./src/pyams_content/shared/view/interfaces.py:39 msgid "Creation date" msgstr "" @@ -2190,8 +2199,8 @@ msgstr "" #: ./src/pyams_content/features/redirect/interfaces.py:56 -#: ./src/pyams_content/features/redirect/zmi/container.py:210 -#: ./src/pyams_content/features/redirect/zmi/container.py:366 +#: ./src/pyams_content/features/redirect/zmi/container.py:206 +#: ./src/pyams_content/features/redirect/zmi/container.py:365 msgid "URL pattern" msgstr "" @@ -2221,31 +2230,31 @@ msgid "You must provide an internal reference OR a target URL" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:67 +#: ./src/pyams_content/features/redirect/zmi/container.py:63 msgid "Redirections" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:161 +#: ./src/pyams_content/features/redirect/zmi/container.py:157 msgid "Enable/disable rule" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:188 +#: ./src/pyams_content/features/redirect/zmi/container.py:184 msgid "Chain/unchain rule" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:220 +#: ./src/pyams_content/features/redirect/zmi/container.py:216 msgid "Target" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:246 +#: ./src/pyams_content/features/redirect/zmi/container.py:245 msgid "Redirections list" msgstr "" +#: ./src/pyams_content/features/redirect/zmi/container.py:260 +msgid "Redirection rules" +msgstr "" + #: ./src/pyams_content/features/redirect/zmi/container.py:261 -msgid "Redirection rules" -msgstr "" - -#: ./src/pyams_content/features/redirect/zmi/container.py:262 msgid "" "Redirection rules are use to handle redirections responses when a request generates \n" "a famous « 404 NotFound » error.\n" @@ -2261,47 +2270,52 @@ "next rule, until a matching rule is found.\n" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:288 +#: ./src/pyams_content/features/redirect/zmi/container.py:287 msgid "Test" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:323 +#: ./src/pyams_content/features/redirect/zmi/container.py:322 msgid "Test redirection rules" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:301 +#: ./src/pyams_content/features/redirect/zmi/container.py:300 msgid "Test URL" msgstr "" +#: ./src/pyams_content/features/redirect/zmi/container.py:303 +msgid "Check inactive rules?" +msgstr "" + #: ./src/pyams_content/features/redirect/zmi/container.py:304 -msgid "Check inactive rules?" -msgstr "" - -#: ./src/pyams_content/features/redirect/zmi/container.py:305 msgid "If 'yes', inactive rules will also be tested" msgstr "" +#: ./src/pyams_content/features/redirect/zmi/container.py:312 +msgid "Close" +msgstr "" + #: ./src/pyams_content/features/redirect/zmi/container.py:313 -msgid "Close" -msgstr "" - -#: ./src/pyams_content/features/redirect/zmi/container.py:314 msgid "Test rules" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:123 +#: ./src/pyams_content/features/redirect/zmi/container.py:119 msgid "No currently defined redirection rule." msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:371 +#: ./src/pyams_content/features/redirect/zmi/container.py:370 msgid "No matching rule!" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:365 +#: ./src/pyams_content/features/redirect/zmi/container.py:227 +#, python-format +msgid "Internal reference: {0} (not found)" +msgstr "" + +#: ./src/pyams_content/features/redirect/zmi/container.py:364 msgid "Input URL" msgstr "" -#: ./src/pyams_content/features/redirect/zmi/container.py:367 +#: ./src/pyams_content/features/redirect/zmi/container.py:366 msgid "Output URL" msgstr "" @@ -2524,10 +2538,6 @@ msgid "Edit renderer properties" msgstr "" -#: ./src/pyams_content/features/renderer/skin/__init__.py:65 -msgid "Hidden content" -msgstr "" - #: ./src/pyams_content/features/preview/zmi/__init__.py:62 msgid "Content preview" msgstr "" @@ -2571,10 +2581,6 @@ msgid "Don't inherit parent footer" msgstr "" -#: ./src/pyams_content/features/footer/skin/__init__.py:91 -msgid "Hidden footer" -msgstr "" - #: ./src/pyams_content/features/menu/interfaces.py:60 msgid "Menu title" msgstr "" @@ -2617,30 +2623,34 @@ msgid "Link has no illustration" msgstr "" -#: ./src/pyams_content/features/menu/zmi/__init__.py:77 +#: ./src/pyams_content/features/menu/zmi/__init__.py:80 msgid "Add menu..." msgstr "" -#: ./src/pyams_content/features/menu/zmi/__init__.py:88 +#: ./src/pyams_content/features/menu/zmi/__init__.py:91 msgid "Add new menu" msgstr "" -#: ./src/pyams_content/features/menu/zmi/__init__.py:121 +#: ./src/pyams_content/features/menu/zmi/__init__.py:124 msgid "Edit menu properties" msgstr "" -#: ./src/pyams_content/features/menu/zmi/__init__.py:215 +#: ./src/pyams_content/features/menu/zmi/__init__.py:218 #: ./src/pyams_content/shared/form/interfaces.py:60 #: ./src/pyams_content/shared/form/zmi/field.py:167 #: ./src/pyams_content/shared/common/interfaces/types.py:47 msgid "Label" msgstr "" -#: ./src/pyams_content/features/menu/zmi/__init__.py:108 +#: ./src/pyams_content/features/menu/zmi/__init__.py:230 +msgid "Inner content" +msgstr "" + +#: ./src/pyams_content/features/menu/zmi/__init__.py:111 msgid "Menu was correctly added." msgstr "" -#: ./src/pyams_content/features/menu/zmi/__init__.py:395 +#: ./src/pyams_content/features/menu/zmi/__init__.py:415 msgid "Link was correctly added." msgstr "" @@ -2825,8 +2835,24 @@ msgid "Don't inherit parent header" msgstr "" -#: ./src/pyams_content/features/header/skin/__init__.py:96 -msgid "Hidden header" +#: ./src/pyams_content/zmi/viewlet/toplinks/__init__.py:43 +msgid "Shared sites" +msgstr "" + +#: ./src/pyams_content/zmi/viewlet/toplinks/__init__.py:64 +msgid "Shared contents" +msgstr "" + +#: ./src/pyams_content/zmi/viewlet/toplinks/__init__.py:87 +msgid "Shared tools" +msgstr "" + +#: ./src/pyams_content/zmi/viewlet/toplinks/__init__.py:110 +msgid "My roles" +msgstr "" + +#: ./src/pyams_content/zmi/viewlet/toplinks/templates/user-addings.pt:7 +msgid "Create new content" msgstr "" #: ./src/pyams_content/profile/interfaces.py:33 @@ -2849,26 +2875,6 @@ msgid "Admin. profile" msgstr "" -#: ./src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:43 -msgid "Shared sites" -msgstr "" - -#: ./src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:64 -msgid "Shared contents" -msgstr "" - -#: ./src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:87 -msgid "Shared tools" -msgstr "" - -#: ./src/pyams_content/skin/zmi/viewlet/toplinks/__init__.py:110 -msgid "My roles" -msgstr "" - -#: ./src/pyams_content/skin/zmi/viewlet/toplinks/templates/user-addings.pt:7 -msgid "Create new content" -msgstr "" - #: ./src/pyams_content/root/__init__.py:63 msgid "Site root" msgstr "" @@ -3548,137 +3554,141 @@ msgid "Sort all results by first publication date" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:29 +#: ./src/pyams_content/shared/view/interfaces.py:31 msgid "View" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:160 -msgid "Always include selected internal references" -msgstr "" - -#: ./src/pyams_content/shared/view/interfaces.py:161 -msgid "Include selected internal references only if empty" -msgstr "" - -#: ./src/pyams_content/shared/view/interfaces.py:38 -msgid "Last update date" -msgstr "" - -#: ./src/pyams_content/shared/view/interfaces.py:39 -msgid "Current publication date" -msgstr "" - #: ./src/pyams_content/shared/view/interfaces.py:40 +msgid "Last update date" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:41 +msgid "Current publication date" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:42 msgid "First publication date" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:58 +#: ./src/pyams_content/shared/view/interfaces.py:60 msgid "Select context type?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:59 +#: ./src/pyams_content/shared/view/interfaces.py:61 msgid "If 'yes', content type will be extracted from context" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:63 +#: ./src/pyams_content/shared/view/interfaces.py:65 msgid "Other content types" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:64 +#: ./src/pyams_content/shared/view/interfaces.py:66 msgid "Selected content types; leave empty for all" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:71 +#: ./src/pyams_content/shared/view/interfaces.py:73 msgid "Select context data type?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:72 +#: ./src/pyams_content/shared/view/interfaces.py:74 msgid "" "If 'yes', content data type (if available) will be extracted from context" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:77 +#: ./src/pyams_content/shared/view/interfaces.py:79 msgid "Other data types" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:78 +#: ./src/pyams_content/shared/view/interfaces.py:80 msgid "Selected data types; leave empty for all" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:85 +#: ./src/pyams_content/shared/view/interfaces.py:87 msgid "Order by" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:86 +#: ./src/pyams_content/shared/view/interfaces.py:88 msgid "Property to use to sort results" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:91 +#: ./src/pyams_content/shared/view/interfaces.py:93 msgid "Reversed order?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:92 +#: ./src/pyams_content/shared/view/interfaces.py:94 msgid "If 'yes', items order will be reversed" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:96 +#: ./src/pyams_content/shared/view/interfaces.py:98 #: ./src/pyams_content/shared/view/portlet/interfaces.py:91 msgid "Results count limit" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:97 +#: ./src/pyams_content/shared/view/interfaces.py:99 msgid "Maximum number of results that the view may retrieve" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:170 +#: ./src/pyams_content/shared/view/interfaces.py:163 +msgid "Always include selected internal references" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:164 +msgid "Include selected internal references only if view is empty" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:165 +msgid "Include ONLY selected references (no search will be made)" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:174 msgid "Internal references usage" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:171 +#: ./src/pyams_content/shared/view/interfaces.py:175 msgid "Specify how selected references are included into view results" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:176 +#: ./src/pyams_content/shared/view/interfaces.py:180 msgid "Exclude context?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:177 +#: ./src/pyams_content/shared/view/interfaces.py:181 msgid "If 'yes', context will be excluded from results list" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:188 +#: ./src/pyams_content/shared/view/interfaces.py:192 msgid "Select context tags?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:189 -msgid "If 'yes', tags will be extracted from context" -msgstr "" - #: ./src/pyams_content/shared/view/interfaces.py:193 +msgid "If 'yes', tags will be extracted from context" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:197 msgid "Other tags" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:209 +#: ./src/pyams_content/shared/view/interfaces.py:213 msgid "Select context themes?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:210 -msgid "If 'yes', themes will be extracted from context" -msgstr "" - #: ./src/pyams_content/shared/view/interfaces.py:214 +msgid "If 'yes', themes will be extracted from context" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:218 msgid "Other themes" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:230 +#: ./src/pyams_content/shared/view/interfaces.py:234 msgid "Select context collections?" msgstr "" -#: ./src/pyams_content/shared/view/interfaces.py:231 -msgid "If 'yes', collections will be extracted from context" -msgstr "" - #: ./src/pyams_content/shared/view/interfaces.py:235 +msgid "If 'yes', collections will be extracted from context" +msgstr "" + +#: ./src/pyams_content/shared/view/interfaces.py:239 msgid "Other collections" msgstr "" @@ -3762,10 +3772,21 @@ msgid "No result found" msgstr "" -#: ./src/pyams_content/shared/view/zmi/properties.py:45 +#: ./src/pyams_content/shared/view/zmi/properties.py:43 msgid "Main view settings" msgstr "" +#: ./src/pyams_content/shared/view/zmi/properties.py:69 +msgid "" +"These settings apply to search made by the view.\n" +"\n" +"If you select the option \"Include ONLY selected references\", via the \"References\" menu, only \n" +"selected references will be selected (if published) and no real search will be made !\n" +"\n" +"In other modes, and if no search criteria is defined (in this form, or in other settings forms), ALL\n" +"published contents will be selected by the view !!\n" +msgstr "" + #: ./src/pyams_content/shared/view/zmi/__init__.py:44 msgid "This view" msgstr "" @@ -4562,7 +4583,7 @@ msgid "Change owner" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:843 +#: ./src/pyams_content/shared/common/zmi/workflow.py:845 msgid "Prior checks" msgstr "" @@ -4584,32 +4605,32 @@ msgid "Publish" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:390 +#: ./src/pyams_content/shared/common/zmi/workflow.py:392 msgid "Request retire" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:446 +#: ./src/pyams_content/shared/common/zmi/workflow.py:448 msgid "Cancel retire request" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:486 +#: ./src/pyams_content/shared/common/zmi/workflow.py:488 msgid "Retire" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:527 +#: ./src/pyams_content/shared/common/zmi/workflow.py:529 #: ./src/pyams_content/workflow/__init__.py:437 msgid "Request archive" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:570 +#: ./src/pyams_content/shared/common/zmi/workflow.py:572 msgid "Cancel archive request" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:610 +#: ./src/pyams_content/shared/common/zmi/workflow.py:612 msgid "Archive" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:651 +#: ./src/pyams_content/shared/common/zmi/workflow.py:653 #: ./src/pyams_content/workflow/__init__.py:502 #: ./src/pyams_content/workflow/__init__.py:514 #: ./src/pyams_content/workflow/__init__.py:526 @@ -4620,39 +4641,39 @@ msgid "Create new version" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:702 +#: ./src/pyams_content/shared/common/zmi/workflow.py:704 #: ./src/pyams_content/workflow/__init__.py:562 #: ./src/pyams_content/workflow/basic.py:249 msgid "Delete version" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:789 +#: ./src/pyams_content/shared/common/zmi/workflow.py:791 msgid "Previewed content?" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:793 +#: ./src/pyams_content/shared/common/zmi/workflow.py:795 msgid "Verified content?" msgstr "" #: ./src/pyams_content/shared/common/zmi/workflow.py:177 -#: ./src/pyams_content/shared/common/zmi/workflow.py:359 +#: ./src/pyams_content/shared/common/zmi/workflow.py:361 msgid "Publication start date is required" msgstr "" #: ./src/pyams_content/shared/common/zmi/workflow.py:270 -#: ./src/pyams_content/shared/common/zmi/workflow.py:416 +#: ./src/pyams_content/shared/common/zmi/workflow.py:418 msgid "A comment is required" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:728 +#: ./src/pyams_content/shared/common/zmi/workflow.py:730 msgid "Delete content" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:737 +#: ./src/pyams_content/shared/common/zmi/workflow.py:739 msgid "Delete definitively" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:866 +#: ./src/pyams_content/shared/common/zmi/workflow.py:868 msgid "" "You must confirm that you previewed and checked this content before " "requesting publication!!" @@ -4663,7 +4684,7 @@ msgid "{state} | by {principal}" msgstr "" -#: ./src/pyams_content/shared/common/zmi/workflow.py:869 +#: ./src/pyams_content/shared/common/zmi/workflow.py:871 msgid "" "You must confirm that you checked this content before requesting " "publication!!" @@ -5084,7 +5105,7 @@ msgid "Rent existing content" msgstr "" -#: ./src/pyams_content/shared/site/zmi/link.py:134 +#: ./src/pyams_content/shared/site/zmi/link.py:137 msgid "Edit content link properties" msgstr "" diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/shared/view/__init__.py --- a/src/pyams_content/shared/view/__init__.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/shared/view/__init__.py Thu Nov 15 12:11:23 2018 +0100 @@ -163,26 +163,33 @@ # check publication dates now = tztime(datetime.utcnow()) params = Lt(catalog['effective_date'], now) - params &= Gt(catalog['push_end_date'], now) - # check content types - content_types = view.get_content_types(context) - if content_types: - params &= Any(catalog['content_type'], content_types) - # check data types - data_types = view.get_data_types(context) - if data_types: - params &= Any(catalog['data_type'], data_types) # check workflow states wf_params = None for workflow in registry.getAllUtilitiesRegisteredFor(IWorkflow): wf_params = or_(wf_params, Any(catalog['workflow_state'], workflow.published_states)) params &= wf_params # check custom extensions + do_search = True for name, adapter in sorted(registry.getAdapters((view,), IViewQueryParamsExtension), key=lambda x: x[1].weight): new_params = adapter.get_params(context) + if isinstance(new_params, tuple): + new_params, do_search = new_params if new_params: params &= new_params + if not do_search: + break + # activate search + if do_search: + params &= Gt(catalog['push_end_date'], now) + # check content types + content_types = view.get_content_types(context) + if content_types: + params &= Any(catalog['content_type'], content_types) + # check data types + data_types = view.get_data_types(context) + if data_types: + params &= Any(catalog['data_type'], data_types) return params def get_results(self, context, sort_index, reverse, limit): diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/shared/view/interfaces.py --- a/src/pyams_content/shared/view/interfaces.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/shared/view/interfaces.py Thu Nov 15 12:11:23 2018 +0100 @@ -12,6 +12,8 @@ __docformat__ = 'restructuredtext' +from collections import OrderedDict + from zope.interface import Attribute, Interface from zope.schema import Bool, Choice, Int, Set from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary @@ -155,11 +157,13 @@ ALWAYS_REFERENCE_MODE = 'always' IFEMPTY_REFERENCE_MODE = 'if_empty' +ONLY_REFERENCE_MODE = 'only' -REFERENCES_MODES = { - ALWAYS_REFERENCE_MODE: _("Always include selected internal references"), - IFEMPTY_REFERENCE_MODE: _("Include selected internal references only if empty") -} +REFERENCES_MODES = OrderedDict(( + (ALWAYS_REFERENCE_MODE, _("Always include selected internal references")), + (IFEMPTY_REFERENCE_MODE, _("Include selected internal references only if view is empty")), + (ONLY_REFERENCE_MODE, _("Include ONLY selected references (no search will be made)")) +)) REFERENCES_MODES_VOCABULARY = SimpleVocabulary([SimpleTerm(v, title=t) for v, t in REFERENCES_MODES.items()]) diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/shared/view/reference.py --- a/src/pyams_content/shared/view/reference.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/shared/view/reference.py Thu Nov 15 12:11:23 2018 +0100 @@ -22,7 +22,8 @@ from pyams_catalog.query import CatalogResultSet, and_ from pyams_content.shared.view.interfaces import ALWAYS_REFERENCE_MODE, IViewInternalReferencesSettings, \ - IViewQueryFilterExtension, IViewQueryParamsExtension, IViewSettings, IWfView, VIEW_REFERENCES_SETTINGS_KEY + IViewQueryFilterExtension, IViewQueryParamsExtension, IViewSettings, IWfView, VIEW_REFERENCES_SETTINGS_KEY, \ + ONLY_REFERENCE_MODE from pyams_content.workflow import VISIBLE_STATES from pyams_sequence.interfaces import ISequentialIdInfo from pyams_utils.adapter import ContextAdapter, adapter_config, get_annotation_adapter @@ -54,19 +55,23 @@ class ViewThemesQueryParamsExtension(ContextAdapter): """View internal references query params extension""" - weight = 50 + weight = 10 def get_params(self, context): settings = IViewInternalReferencesSettings(self.context) params = None - # check themes + # check view references mode + if settings.references_mode == ONLY_REFERENCE_MODE: + catalog = get_utility(ICatalog) + params = Any(catalog['oid'], settings.references) + # check view settings if settings.exclude_context: sequence = ISequentialIdInfo(context, None) if sequence is not None: oid = sequence.hex_oid catalog = get_utility(ICatalog) params = and_(params, NotEq(catalog['oid'], oid)) - return params + return params, settings.references_mode != ONLY_REFERENCE_MODE @adapter_config(name='references', context=IWfView, provides=IViewQueryFilterExtension) diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/shared/view/theme.py --- a/src/pyams_content/shared/view/theme.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/shared/view/theme.py Thu Nov 15 12:11:23 2018 +0100 @@ -9,31 +9,27 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # -from pyams_content.component.theme import ICollectionsInfo __docformat__ = 'restructuredtext' - -# import standard library - -# import interfaces from hypatia.interfaces import ICatalog -from pyams_content.component.theme.interfaces import ITagsInfo, IThemesInfo -from pyams_content.shared.view.interfaces import IWfView, IViewSettings, IViewThemesSettings, \ - IViewQueryParamsExtension, VIEW_THEMES_SETTINGS_KEY, IViewTagsSettings, VIEW_TAGS_SETTINGS_KEY, \ - IViewCollectionsSettings, VIEW_COLLECTIONS_SETTINGS_KEY -from zope.intid.interfaces import IIntIds - -# import packages from hypatia.query import Any from persistent import Persistent -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.intid.interfaces import IIntIds from zope.schema.fieldproperty import FieldProperty +from pyams_content.component.theme import ICollectionsInfo +from pyams_content.component.theme.interfaces import ITagsInfo, IThemesInfo +from pyams_content.shared.view.interfaces import IViewCollectionsSettings, IViewQueryParamsExtension, IViewSettings, \ + IViewTagsSettings, IViewThemesSettings, IWfView, VIEW_COLLECTIONS_SETTINGS_KEY, VIEW_TAGS_SETTINGS_KEY, \ + VIEW_THEMES_SETTINGS_KEY +from pyams_utils.adapter import ContextAdapter, adapter_config, get_annotation_adapter +from pyams_utils.registry import get_utility + +from pyams_catalog.query import and_ + # # Tags management diff -r 978a2b9123b9 -r 40deb3d316ac src/pyams_content/shared/view/zmi/properties.py --- a/src/pyams_content/shared/view/zmi/properties.py Tue Nov 13 14:06:54 2018 +0100 +++ b/src/pyams_content/shared/view/zmi/properties.py Thu Nov 15 12:11:23 2018 +0100 @@ -12,24 +12,22 @@ __docformat__ = 'restructuredtext' - -# import standard library import json -# import interfaces -from pyams_content.shared.view.interfaces import IWfView -from pyams_form.interfaces.form import IInnerSubForm -from pyams_skin.layer import IPyAMSLayer -from pyams_utils.interfaces.data import IObjectData +from z3c.form import field +from zope.interface import alsoProvides -# import packages from pyams_content.shared.common.types import get_all_data_types from pyams_content.shared.common.zmi.properties import SharedContentPropertiesEditForm +from pyams_content.shared.view.interfaces import IWfView +from pyams_form.help import FormHelp +from pyams_form.interfaces.form import IFormHelp, IInnerSubForm from pyams_form.widget import HiddenSelect2FieldWidget +from pyams_skin.layer import IPyAMSLayer from pyams_utils.adapter import adapter_config +from pyams_utils.interfaces.data import IObjectData from pyams_zmi.form import InnerAdminEditForm -from z3c.form import field -from zope.interface import alsoProvides +from pyams_zmi.layer import IAdminLayer from pyams_content import _ @@ -62,3 +60,18 @@ 'ams-select2-data': json.dumps(get_all_data_types(self.request)) } alsoProvides(widget, IObjectData) + + +@adapter_config(context=(IWfView, IAdminLayer, ViewPropertiesEditForm), provides=IFormHelp) +class ViewPropertiesFormHelp(FormHelp): + """View properties form help""" + + message = _("""These settings apply to search made by the view. + +If you select the option "Include ONLY selected references", via the "References" menu, only +selected references will be selected (if published) and no real search will be made ! + +In other modes, and if no search criteria is defined (in this form, or in other settings forms), ALL +published contents will be selected by the view !! +""") + message_format = 'rest'