Beispiel #1
0
 def period(self):
     """ Wait period
     """
     ptype = getattr(self.context, 'portal_type', '')
     if ptype.lower() in ('collection', 'topic', 'folder', 'atfolder'):
         return _(u"minutes")
     return _(u"seconds")
Beispiel #2
0
 def period(self):
     """ Wait period
     """
     ptype = getattr(self.context, "portal_type", "")
     if ptype.lower() in ("collection", "topic", "folder", "atfolder"):
         return _(u"minutes")
     return _(u"seconds")
Beispiel #3
0
 def period(self):
     """ Wait period
     """
     ptype = getattr(self.context, 'portal_type', '')
     if ptype.lower() in ('collection', 'topic', 'folder', 'atfolder'):
         return _(u"minutes")
     return _(u"seconds")
Beispiel #4
0
class IExtraSettings(model.Schema):
    """ Extra settings
    """
    epub = schema.Bool(title=_(u"ePub"),
                       description=_(u"Invalidate latest generated ePub file"),
                       required=False,
                       default=False)
Beispiel #5
0
 def finish(self, email=""):
     """ Finish download
     """
     if email:
         self._email = email
         self._title = _(u"An email will be sent to you when the ePub is ready")
         self._message = _(
             u"If you don't have access to your email address "
             u"check <a href='${link}'>this link</a> in a few ${period}.",
             mapping={u"link": u"%s?direct=1" % self.link(), u"period": self.period()},
         )
     return self._redirect()
Beispiel #6
0
 def finish(self, email=''):
     """ Finish download
     """
     if email:
         self._email = email
         self._title = _(
             u"An email will be sent to you when the ePub is ready")
         self._message = _(
             u"If you don't have access to your email address "
             u"check <a href='${link}'>this link</a> in a few ${period}.",
             mapping={
                 u"link": u"%s?direct=1" % self.link(),
                 u"period": self.period()
             })
     return self._redirect()
Beispiel #7
0
 def __init__(self, context, request):
     super(AsyncExportView, self).__init__(context, request)
     self._title = ""
     self._message = _(
         u"* The email is only used for the purpose of sending the ePub. " u"We do not store it for any other use."
     )
     self._email = ""
     self._link = ""
Beispiel #8
0
 def __init__(self, context, request):
     super(AsyncExportView, self).__init__(context, request)
     self._title = ''
     self._message = _(
         u"* The email is only used for the purpose of sending the ePub. "
         u"We do not store it for any other use.")
     self._email = ''
     self._link = ''
Beispiel #9
0
    def title(self):
        """ Title
        """
        if self._title:
            return self._title

        title = self.context.title_or_id()
        if isinstance(title, str):
            title = title.decode("utf-8")

        return _(u"Enter your email address where to send '${title}' ePub when ready", mapping={"title": title})
Beispiel #10
0
    def title(self):
        """ Title
        """
        if self._title:
            return self._title

        title = self.context.title_or_id()
        if isinstance(title, str):
            title = title.decode('utf-8')

        return _(
            u"Enter your email address where to send '${title}' ePub when ready",
            mapping={'title': title})