示例#1
0
 def UpdateFulltext(self, **kw):
     """
     Update fulltext for entry. Text is generated automatically.
     """
     if not self.app.configuration.fulltextIndex:
         return
     if IPage.providedBy(self):
         # get text from contained elements
         text = [self.GetTexts()]
         for e in self.GetPageElements(addBoxContents=1, addColumnContents=1):
             text.append(e.GetTexts())
         self.dbEntry.WriteFulltext(self.FormatFulltext(text))
     elif IPage.providedBy(self) or IRoot.providedBy(self):
         # get text from contained elements
         text = []
         for e in self.GetPageElements(addBoxContents=1, addColumnContents=1):
             text.append(e.GetTexts())
         #!fulltext storage root
         #self.dbEntry.WriteFulltext(self.FormatFulltext(text))
     else:
         self.GetPage().UpdateFulltext()
示例#2
0
 def CanCopy(self):
     """
     """
     if IRoot.providedBy(self):
         return False
     return not hasattr(self, "disableCopy") or not self.disableCopy
示例#3
0
 def IsPage(self):
     """ returns if the element is a column """
     return IPage.providedBy(self) or IRoot.providedBy(self)
示例#4
0
 def CanCopy(self):
     """
     """
     if IRoot.providedBy(self):
         return False
     return not hasattr(self, "disableCopy") or not self.disableCopy
示例#5
0
 def IsPage(self):
     """ returns if the element is a column """
     return IPage.providedBy(self) or IRoot.providedBy(self)