Beispiel #1
0
 def invoke(self, **kwargs):
     """Vyvolej v aplikaci zpracování příkazu s danými argumenty."""
     if self.enabled(**kwargs):
         if self._log:
             kind = pytis.util.EVENT
         else:
             kind = pytis.util.DEBUG
         pytis.util.log(kind, 'Invoking command:', (self, kwargs))
         return self._handler.invoke_command(self, **kwargs)
     else:
         from pytis.form import message
         message(_(u"Command invocation refused: %s") % (self.id(),), beep_=True)
         return False
Beispiel #2
0
 def _page_content(self, row):
     text = row['content'].value()
     if text:
         storage = self._attachment_storage(row)
         if storage:
             try:
                 resources = storage.resources()
             except pp.AttachmentStorage.StorageError as e:
                 from pytis.form import message
                 message(_(u"Chyba přísutu k úložišti příloh: %s") % e, beep_=True)
                 resources = ()
         else:
             resources = ()
         return pu.parse_lcg_text(text, resources=resources)
     else:
         return ''
Beispiel #3
0
 def _page_content(self, row):
     text = row['content'].value()
     if text:
         storage = self._attachment_storage(row)
         if storage:
             try:
                 resources = storage.resources()
             except pp.AttachmentStorage.StorageError as e:
                 from pytis.form import message
                 message(_(u"Chyba přísutu k úložišti příloh: %s") % e,
                         beep_=True)
                 resources = ()
         else:
             resources = ()
         return pu.parse_lcg_text(text, resources=resources)
     else:
         return ''