# HG changeset patch # User Thierry Florac # Date 1531409720 -7200 # Node ID 3dcf565c711e41b2596b43593bf842fe008cb1c0 # Parent 37c3280e6defac1c9ac34adcdf49ec69ff13213d Use new TALES extensions diff -r 37c3280e6def -r 3dcf565c711e src/pyams_content/features/menu/portlet/navigation/zmi/double.py --- a/src/pyams_content/features/menu/portlet/navigation/zmi/double.py Thu Jul 12 15:55:45 2018 +0200 +++ b/src/pyams_content/features/menu/portlet/navigation/zmi/double.py Thu Jul 12 17:35:20 2018 +0200 @@ -16,7 +16,6 @@ # import standard library # import interfaces -from pyams_content.component.illustration.interfaces import IIllustration, ILinkIllustration from pyams_content.component.links.interfaces import IInternalLink from pyams_content.features.menu.portlet.navigation.interfaces.double import IDoubleNavigationPortletSettings, \ IDoubleNavigationMenusContainer @@ -89,16 +88,3 @@ return True target = link.get_target() return (target is not None) and IWorkflowPublicationInfo(target).is_published() - - @classmethod - def get_link_illustration(cls, link): - illustration = IIllustration(link, None) - if (illustration is None) or not illustration.has_data(): - if IInternalLink.providedBy(link): - target = link.get_target() - if target is None: - return - illustration = ILinkIllustration(target, None) - if (illustration is None) or not illustration.has_data(): - illustration = IIllustration(target, None) - return illustration diff -r 37c3280e6def -r 3dcf565c711e src/pyams_content/features/menu/portlet/navigation/zmi/simple.py --- a/src/pyams_content/features/menu/portlet/navigation/zmi/simple.py Thu Jul 12 15:55:45 2018 +0200 +++ b/src/pyams_content/features/menu/portlet/navigation/zmi/simple.py Thu Jul 12 17:35:20 2018 +0200 @@ -16,7 +16,6 @@ # import standard library # import interfaces -from pyams_content.component.illustration.interfaces import IIllustration, ILinkIllustration from pyams_content.component.links.interfaces import IInternalLink from pyams_content.features.menu.portlet.navigation.interfaces.simple import ISimpleNavigationPortletSettings, \ ISimpleNavigationMenu @@ -89,16 +88,3 @@ return True target = link.get_target() return (target is not None) and IWorkflowPublicationInfo(target).is_published() - - @classmethod - def get_link_illustration(cls, link): - illustration = IIllustration(link, None) - if (illustration is None) or not illustration.has_data(): - if IInternalLink.providedBy(link): - target = link.get_target() - if target is None: - return - illustration = ILinkIllustration(target, None) - if (illustration is None) or not illustration.has_data(): - illustration = IIllustration(target, None) - return illustration diff -r 37c3280e6def -r 3dcf565c711e src/pyams_content/features/menu/portlet/navigation/zmi/templates/double-preview.pt --- a/src/pyams_content/features/menu/portlet/navigation/zmi/templates/double-preview.pt Thu Jul 12 15:55:45 2018 +0200 +++ b/src/pyams_content/features/menu/portlet/navigation/zmi/templates/double-preview.pt Thu Jul 12 17:35:20 2018 +0200 @@ -1,22 +1,19 @@ -
+
Title
    -
  • +
  • Title
      -
    • +
    • + title="Link has no illustration" i18n:attributes="title"> - User title - – Inner title
    • diff -r 37c3280e6def -r 3dcf565c711e src/pyams_content/features/menu/portlet/navigation/zmi/templates/simple-preview.pt --- a/src/pyams_content/features/menu/portlet/navigation/zmi/templates/simple-preview.pt Thu Jul 12 15:55:45 2018 +0200 +++ b/src/pyams_content/features/menu/portlet/navigation/zmi/templates/simple-preview.pt Thu Jul 12 17:35:20 2018 +0200 @@ -2,18 +2,15 @@ Title
        -
      • +
      • - User title - – Inner title