Exemple #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)
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)
Exemple #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,
    )
Exemple #4
0
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _("Blog Monthly archive")
Exemple #5
0
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):
Exemple #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 _("Categories")