Esempio n. 1
0
 def mode(self):
     """ Display mode
     """
     if (IFacetedSearchMode.providedBy(self.canonical) or
         IFacetedSearchMode.providedBy(self.context)):
         return 'search'
     return 'view'
Esempio n. 2
0
 def mode(self):
     """ Display mode
     """
     if (IFacetedSearchMode.providedBy(self.canonical) or
         IFacetedSearchMode.providedBy(self.context)):
         return 'search'
     return 'view'
    def enable(self):
        """ See IFacetedSubtyper
        """
        if not self.can_enable:
            return self._redirect('Faceted search navigation not supported')

        if not super(FacetedSearchSubtyper, self).is_faceted:
            super(FacetedSearchSubtyper, self).enable()
        if not IFacetedSearchMode.providedBy(self.context):
            alsoProvides(self.context, IFacetedSearchMode)
        self._redirect(_('Faceted search enabled'))
    def enable(self):
        """ See IFacetedSubtyper
        """
        if not self.can_enable:
            return self._redirect('Faceted search navigation not supported')

        if not super(FacetedSearchSubtyper, self).is_faceted:
            super(FacetedSearchSubtyper, self).enable()
        if not IFacetedSearchMode.providedBy(self.context):
            alsoProvides(self.context, IFacetedSearchMode)
        self._redirect(_('Faceted search enabled'))
 def is_faceted(self):
     """ Is faceted navigable?
     """
     if not super(FacetedSearchSubtyper, self).is_faceted:
         return False
     return IFacetedSearchMode.providedBy(self.context)
 def is_faceted(self):
     """ Is faceted navigable?
     """
     if not super(FacetedSearchSubtyper, self).is_faceted:
         return False
     return IFacetedSearchMode.providedBy(self.context)
 def mode(self):
     """ Display mode
     """
     if IFacetedSearchMode.providedBy(self.canonical) or IFacetedSearchMode.providedBy(self.context):
         return "search"
     return "view"