r252388 - in collective.portlet.sitemap/branches/custom-content-types: collective/portlet/sitemap collective/portlet/sitemap/locales collective/portlet/sitemap/locales/it/LC_MESSAGES collective/portlet/sitemap/profiles/default docs
"Luca Fabbri" <svn-changes-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.collective.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: keul Date: Fri May 10 14:59:57 2013 New Revision: 252388 Modified: collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/collective.portlet.sitemap.pot collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/it/LC_MESSAGES/collective.portlet.sitemap.po collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/navigationextendedportlet.py collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/profiles/default/portlets.xml collective.portlet.sitemap/branches/custom-content-types/docs/HISTORY.txt Log: added a content type filter in the portlet Modified: collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/collective.portlet.sitemap.pot ============================================================================== --- collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/collective.portlet.sitemap.pot (original) +++ collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/collective.portlet.sitemap.pot Fri May 10 14:59:57 2013 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-05-10 14:05+0000\n" +"POT-Creation-Date: 2013-05-10 14:45+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" @@ -17,17 +17,31 @@ msgid "A navigation portlet that can be displayed as a sitemap" msgstr "" -#: ../navigationextendedportlet.py:51 +#: ../navigationextendedportlet.py:35 +msgid "Content types to show" +msgstr "" + +#: ../navigationextendedportlet.py:59 +#: ../profiles/default/portlets.xml msgid "Navigation Extended" msgstr "" +#: ../profiles/default/portlets.xml +msgid "Navigation portlet with sitemap feature" +msgstr "" + +#. Default: "Display only content types in this list.\nIf not provided, the default navigation setting used for sitemap will be used" +#: ../navigationextendedportlet.py:36 +msgid "help_contentTypes" +msgstr "" + #. Default: "If checked display all folders as a site map" #: ../navigationextendedportlet.py:29 msgid "help_display_as_site_map" msgstr "" #. Default: "If previous field is checked set the site map depth" -#: ../navigationextendedportlet.py:37 +#: ../navigationextendedportlet.py:45 msgid "help_site_map_depth" msgstr "" @@ -37,7 +51,7 @@ msgstr "" #. Default: "Site map depth" -#: ../navigationextendedportlet.py:35 +#: ../navigationextendedportlet.py:43 msgid "label_site_map_depth" msgstr "" Modified: collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/it/LC_MESSAGES/collective.portlet.sitemap.po ============================================================================== --- collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/it/LC_MESSAGES/collective.portlet.sitemap.po (original) +++ collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/locales/it/LC_MESSAGES/collective.portlet.sitemap.po Fri May 10 14:59:57 2013 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-05-10 14:05+0000\n" +"POT-Creation-Date: 2013-05-10 14:45+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" @@ -17,17 +17,33 @@ msgid "A navigation portlet that can be displayed as a sitemap" msgstr "Una portlet di navigazione che può essere visualizzata come una mappa del sito" -#: ../navigationextendedportlet.py:51 +#: ../navigationextendedportlet.py:35 +msgid "Content types to show" +msgstr "Tipi di contenuto da mostrare" + +#: ../navigationextendedportlet.py:59 +#: ../profiles/default/portlets.xml msgid "Navigation Extended" msgstr "Navigazione Estesa" +#: ../profiles/default/portlets.xml +msgid "Navigation portlet with sitemap feature" +msgstr "Portlet di navigazione con funzionalità di mappa del sito" + +#. Default: "Display only content types in this list.\nIf not provided, the default navigation setting used for sitemap will be used" +#: ../navigationextendedportlet.py:36 +msgid "help_contentTypes" +msgstr "" +"Mostra solo i tipi di contenuto in questa lista.\n" +"Se non fornita, saranno usate le impostazioni di base usate per la mappa del sito." + #. Default: "If checked display all folders as a site map" #: ../navigationextendedportlet.py:29 msgid "help_display_as_site_map" msgstr "Se selezionato visualizza tutte le cartelle come una mappa del sito" #. Default: "If previous field is checked set the site map depth" -#: ../navigationextendedportlet.py:37 +#: ../navigationextendedportlet.py:45 msgid "help_site_map_depth" msgstr "Se il campo precedente è selezionato, imposta la profondità della mappa del sito" @@ -37,7 +53,7 @@ msgstr "Mostra come mappa del sito" #. Default: "Site map depth" -#: ../navigationextendedportlet.py:35 +#: ../navigationextendedportlet.py:43 msgid "label_site_map_depth" msgstr "Profondità della mappa del sito" Modified: collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/navigationextendedportlet.py ============================================================================== --- collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/navigationextendedportlet.py (original) +++ collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/navigationextendedportlet.py Fri May 10 14:59:57 2013 @@ -30,7 +30,7 @@ default=u"If checked display all folders as a site map"), default=True, required=False) - + siteMapDepth = schema.Int( title=_(u"label_site_map_depth", default=u"Site map depth"), @@ -39,6 +39,14 @@ default=2, required=False) + contentTypes = schema.Tuple( + title=_(u"Content types to show"), + description=_('help_contentTypes', + default=u"Display only content types in this list.\n" + u"If not provided, the default navigation setting used for sitemap will be used"), + required=False, + value_type=schema.Choice(vocabulary=u"plone.app.vocabularies.ReallyUserFriendlyTypes"),) + class Assignment(navigation.Assignment): """Portlet assignment. @@ -58,9 +66,11 @@ bottomLevel = 0 displayAsSiteMap = True siteMapDepth = 2 + contentTypes = tuple() - def __init__(self, name=u"", root=None, currentFolderOnly=False, includeTop=False, topLevel=0, bottomLevel=0, displayAsSiteMap=True, siteMapDepth = 2): + def __init__(self, name=u"", root=None, currentFolderOnly=False, includeTop=False, topLevel=0, + bottomLevel=0, displayAsSiteMap=True, siteMapDepth = 2, contentTypes=()): self.name = name self.root = root self.currentFolderOnly = currentFolderOnly @@ -68,7 +78,8 @@ self.topLevel = topLevel self.bottomLevel = bottomLevel self.displayAsSiteMap = displayAsSiteMap - self.siteMapDepth = siteMapDepth + self.siteMapDepth = siteMapDepth + self.contentTypes = contentTypes @@ -114,7 +125,8 @@ topLevel=data.get('topLevel', 0), bottomLevel=data.get('bottomLevel', 0), displayAsSiteMap=data.get('displayAsSiteMap', True), - siteMapDepth=data.get('siteMapDepth', 2)) + siteMapDepth=data.get('siteMapDepth', 2), + contentTypes=data.get('contentTypes', ())) @@ -187,7 +199,7 @@ # seem to work with EPI. # Only list the applicable types - query['portal_type'] = utils.typesToList(context) + query['portal_type'] = portlet.contentTypes or utils.typesToList(context) # Apply the desired sort sortAttribute = navtree_properties.getProperty('sortAttribute', None) Modified: collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/profiles/default/portlets.xml ============================================================================== --- collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/profiles/default/portlets.xml (original) +++ collective.portlet.sitemap/branches/custom-content-types/collective/portlet/sitemap/profiles/default/portlets.xml Fri May 10 14:59:57 2013 @@ -1,12 +1,14 @@ <?xml version="1.0"?> -<portlets> +<portlets xmlns:i18n="http://xml.zope.org/namespaces/i18n" + i18n:domain="collective.portlet.sitemap"> <!-- Portlet type registrations --> <portlet addview="collective.portlet.sitemap.NavigationExtendedPortlet" title="Navigation Extended" - description="Plone3 navigation portlet extended" + description="Navigation portlet with sitemap feature" + i18n:attributes="title; description" > <for interface="plone.app.portlets.interfaces.IColumn" /> </portlet> Modified: collective.portlet.sitemap/branches/custom-content-types/docs/HISTORY.txt ============================================================================== --- collective.portlet.sitemap/branches/custom-content-types/docs/HISTORY.txt (original) +++ collective.portlet.sitemap/branches/custom-content-types/docs/HISTORY.txt Fri May 10 14:59:57 2013 @@ -6,6 +6,7 @@ * Added i18n support [keul] * Added italian translation [keul] +* Added a custom content type filter in the portlet [keul] 1.0.5 (2012-10-15) ------------------- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Collective-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/collective-checkins