Exemplo n.º 1
0
 def getCollageContext(self, context):
    # import pdb; pdb.set_trace()
     if ICollageRow.providedBy(context) or ICollageColumn.providedBy(context):
         return self.getCollageContext(context.aq_parent)
     if ICollage.providedBy(context):
         return context
     else:
         return self.context
Exemplo n.º 2
0
 def getCollageContext(self, context):
     # import pdb; pdb.set_trace()
     if ICollageRow.providedBy(context) or ICollageColumn.providedBy(
             context):
         return self.getCollageContext(context.aq_parent)
     if ICollage.providedBy(context):
         return context
     else:
         return self.context
Exemplo n.º 3
0
    def aggregateSearchableText(self):
        """Append references' searchable fields."""

        data = super(LayoutContainer, self).SearchableText()

        # Must we add subcontents texts?
        if ICollageColumn.providedBy(self):
            helper = self.restrictedTraverse('@@collage_helper')
            collage = helper.getCollageObject()
            if not collage.mustIndexSubobjects():
                return data

        data = [data]
        for child in self.contentValues():
            data.append(child.SearchableText())

        data = ' '.join(data)
        return data
Exemplo n.º 4
0
    def aggregateSearchableText(self):
        """Append references' searchable fields."""

        data = super(LayoutContainer, self).SearchableText()

        # Must we add subcontents texts?
        if ICollageColumn.providedBy(self):
            helper = self.restrictedTraverse('@@collage_helper')
            collage = helper.getCollageObject()
            if not collage.mustIndexSubobjects():
                return data

        data = [data]
        for child in self.contentValues():
            data.append(child.SearchableText())

        data = ' '.join(data)
        return data