class ILastEntriesPortlet(IPortletDataProvider):
    """A portlet

    It inherits from IPortletDataProvider because for this portlet, the
    data that is being rendered and the portlet assignment itself are the
    same.
    """
    
    entries = schema.Int(title=_(u"Entries"),
                         description=_(u"The number of entries to show"),
                         default=5,
                         required=True)
class IArchivePortlet(IPortletDataProvider):
    """A portlet

    It inherits from IPortletDataProvider because for this portlet, the
    data that is being rendered and the portlet assignment itself are the
    same.
    """

    header = schema.TextLine(
        title=_(u'Title of the portlet'),
        description=_(
            u'The text that will be shown as the title of the portlet'),
        required=False)

    archive_view = schema.TextLine(
        title=_(u"Archive view"),
        description=_(u"The name of the archive view"),
        default=u'blog_view',
        required=True)

    reversed = schema.Bool(
        title=_(u"Reverse year and month list"),
        description=
        _("When checked, the first shown year will be the current one, and then the previous ones. The same applies to the months"
          ),
        default=False,
    )
class IArchivePortlet(IPortletDataProvider):
    """A portlet

    It inherits from IPortletDataProvider because for this portlet, the
    data that is being rendered and the portlet assignment itself are the
    same.
    """

    header = schema.TextLine(
        title=_(u'Title of the portlet'),
        description=_(
            u'The text that will be shown as the title of the portlet'),
        required=False)

    archive_view = schema.TextLine(
        title=_(u"Archive view"),
        description=_(u"The name of the archive view"),
        default=u'blog_view',
        required=True)

    reversed = schema.Bool(
        title=_(u"Reverse year and month list"),
        description=
        _(u"When checked, the first shown year will be the current one, and then the previous ones. The same applies to the months"
          ),
        default=False,
    )

    depth = schema.Int(
        title=_(u"Sub-folder depth"),
        description=
        _(u"To include blog posts in subfolders, set this to the depth of the subfolders. 0 means no subfolders"
          ),
        default=0,
        min=0,
        # Setting this to 1000000 or similar will slow down the site,
        # so let's prevent silly values.
        max=100,
    )
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Monthly archive")
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Monthly archive")
Beispiel #6
0
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Last entries")
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Last entries")