diff -r d565e0a0c8f3 -r f2cc8872bcc1 src/pyams_content/shared/site/interfaces.py --- a/src/pyams_content/shared/site/interfaces.py Wed Sep 02 17:48:47 2020 +0200 +++ b/src/pyams_content/shared/site/interfaces.py Mon Sep 07 17:25:59 2020 +0200 @@ -9,10 +9,6 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # -from pyams_content.shared.common.interfaces.types import DATA_TYPES_VOCABULARY - - -__docformat__ = 'restructuredtext' from collections import OrderedDict @@ -23,16 +19,22 @@ from zope.schema import Bool, Choice, Text, URI from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary -from pyams_content import _ from pyams_content.interfaces import IBaseContent -from pyams_content.shared.common.interfaces import IBaseContentManagerRoles, IBaseSharedTool, IDeletableElement, \ - ISharedSite +from pyams_content.shared.common.interfaces import IBaseContentManagerRoles, IBaseSharedTool, \ + IDeletableElement, ISharedSite +from pyams_content.shared.common.interfaces.types import DATA_TYPES_VOCABULARY from pyams_content.shared.topic.interfaces import ITopic, IWfTopic, IWfTopicFactory from pyams_i18n.schema import I18nTextField, I18nTextLineField -from pyams_sequence.interfaces import IInternalReference, IInternalReferencesList, ISequentialIdTarget +from pyams_sequence.interfaces import IInternalReference, IInternalReferencesList, \ + ISequentialIdTarget from pyams_workflow.interfaces import IWorkflowPublicationSupport +__docformat__ = 'restructuredtext' + +from pyams_content import _ + + FOLDER_REDIRECT_DISPLAY_MODE = 'redirect' FOLDER_TEMPLATE_DISPLAY_MODE = 'template' @@ -41,7 +43,8 @@ (FOLDER_TEMPLATE_DISPLAY_MODE, _("Use presentation template")) )) -FOLDER_DISPLAY_MODE_VOCABULARY = SimpleVocabulary([SimpleTerm(v, title=t) for v, t in FOLDER_DISPLAY_MODES.items()]) +FOLDER_DISPLAY_MODE_VOCABULARY = SimpleVocabulary([SimpleTerm(v, title=t) + for v, t in FOLDER_DISPLAY_MODES.items()]) class ISiteElement(IContained, IDeletableElement): @@ -85,9 +88,11 @@ required=False) description = I18nTextField(title=_("Meta-description"), - description=_("The folder'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; if description is empty, content's header will be used."), + description=_("The folder'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; if description is empty, content's " + "header will be used."), required=False) notepad = Text(title=_("Notepad"), @@ -95,13 +100,15 @@ required=False) visible_in_list = Bool(title=_("Visible in folders list"), - description=_("If 'no', folder will not be displayed into folders list"), + description=_("If 'no', folder will not be displayed into folders " + "list"), required=True, default=True) navigation_title = I18nTextLineField(title=_("Navigation title"), - description=_("Folder's title displayed in navigation pages; " - "original title will be used if none is specified"), + description=_("Folder's title displayed in navigation " + "pages; original title will be used if " + "none is specified"), required=False) navigation_mode = Choice(title=_("Navigation mode"), @@ -119,7 +126,8 @@ """Site folder roles interface""" -class ISiteManager(ISharedSite, ISiteContainer, IBaseSharedTool, IDeletableElement, ISequentialIdTarget): +class ISiteManager(ISharedSite, ISiteContainer, IBaseSharedTool, + IDeletableElement, ISequentialIdTarget): """Site manager interface""" contains(ISiteElement) @@ -129,10 +137,16 @@ topic_content_type = Attribute("Topic content type") topic_content_factory = Attribute("Topic content factory") + header = I18nTextField(title=_("Header"), + description=_("Site's header is generally displayed in page header"), + required=False) + description = I18nTextField(title=_("Meta-description"), - description=_("The site'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; if description is empty, content's header will be used."), + description=_("The site'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; if description is empty, content's " + "header will be used."), required=False) notepad = Text(title=_("Notepad"), @@ -169,8 +183,9 @@ """Site link interface""" navigation_title = I18nTextLineField(title=_("Navigation title"), - description=_("Alternate content's title displayed in navigation pages; " - "original title will be used if none is specified"), + description=_("Alternate content's title displayed in " + "navigation pages; original title will be " + "used if none is specified"), required=False) show_header = Bool(title=_("Show header?"), @@ -179,8 +194,9 @@ default=True) navigation_header = I18nTextField(title=_("Navigation header"), - description=_("Alternate content's header displayed in navigation pages; " - "original header will be used if none is specified"), + description=_("Alternate content's header displayed in " + "navigation pages; original header will be " + "used if none is specified"), required=False) visible = Bool(title=_("Visible?"),