コード例 #1
0
class IBlogRecentPortlet(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)
コード例 #2
0
class IBlogCategoriesPortlet(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.
    """
    archive_view = schema.TextLine(
        title=_(u"Archive view"),
        description=_(u"The name of the archive view"),
        default=u'blog-view',
        required=True)
コード例 #3
0
class IBlogEntry(form.Schema, IImageScaleTraversable):
    """
    A single blogentry that can contain images
    """
    form.primary('text')
    text = RichText(
        title=_(u"Blog Entry"),
        description=_(u"Please enter main body text for this blog entry"),
        required=False,
    )
    allow_discussion = schema.Bool(
        title=_(u"Allow discussion on this item?"),
        default=True,
    )
コード例 #4
0
ファイル: archive.py プロジェクト: potzenheimer/buildout.ifd
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Blog Monthly archive")
コード例 #5
0
ファイル: archive.py プロジェクト: potzenheimer/buildout.ifd
from plone.portlets.interfaces import IPortletDataProvider
from plone.app.portlets.portlets import base
from Products.CMFCore.utils import getToolByName

from zope import schema
from zope.formlib import form

from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from ifd.blog.utils import find_portlet_assignment_context
from ifd.blog.blogentry import IBlogEntry

from ifd.blog import MessageFactory as _

MONTHVOCAB = {
    'month_1': _(u'month_1'),
    'month_2': _(u'month_2'),
    'month_3': _(u'month_3'),
    'month_4': _(u'month_4'),
    'month_5': _(u'month_5'),
    'month_6': _(u'month_6'),
    'month_7': _(u'month_7'),
    'month_8': _(u'month_8'),
    'month_9': _(u'month_9'),
    'month_10': _(u'month_10'),
    'month_11': _(u'month_11'),
    'month_12': _(u'month_12'),
}


class IArchivePortlet(IPortletDataProvider):
コード例 #6
0
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Last entries")
コード例 #7
0
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Categories")