コード例 #1
0
class EditForm(base_EditForm):
    if PLONE5:
        schema = IRRSSBPortlet
    else:
        fields = field.Fields(IRRSSBPortlet)

    label = _(u"Edit RRSSB portlet")
    description = _(
        u"This portlet renders the Ridiculously Responsive Social Sharing Buttons."
    )
コード例 #2
0
class AddForm(base_AddForm):
    if PLONE5:
        schema = IRRSSBPortlet
    else:
        fields = field.Fields(IRRSSBPortlet)

    label = _(u"Add RRSSB portlet")
    description = _(
        u"This portlet renders the Ridiculously Responsive Social Sharing Buttons."
    )

    def create(self, data):
        return Assignment(**data)
コード例 #3
0
class IRRSSBContent(Interface):
    """
    This interface defines the weekdays record on the registry
    """

    render_email = schema.Bool(title=_(u"render_email", default=u"Email"),
                               required=False)

    render_facebook = schema.Bool(title=_(u"render_facebook",
                                          default=u"Facebook"),
                                  default=False,
                                  required=False)

    render_linkedin = schema.Bool(title=_(u"render_linkedin",
                                          default=u"Linkedin"),
                                  default=False,
                                  required=False)

    render_twitter = schema.Bool(title=_(u"render_twitter",
                                         default=u"Twitter"),
                                 default=False,
                                 required=False)

    render_googleplus = schema.Bool(title=_(u"render_googleplus",
                                            default=u"Google +"),
                                    required=False)

    render_pinterest = schema.Bool(title=_(u"render_pinterest",
                                           default=u"Pinterest"),
                                   default=False,
                                   required=False)

    render_tumblr = schema.Bool(title=_(u"render_tumblr", default=u"Tumblr"),
                                required=False)
コード例 #4
0
class IRRSSBPortlet(IPortletDataProvider):
    """A portlet that renders the Ridiculously Responsive Social Sharing Buttons
    """
    render_email = schema.Bool(title=_(u"render_email", default=u"Email"),
                               required=False)

    render_facebook = schema.Bool(title=_(u"render_facebook",
                                          default=u"Facebook"),
                                  default=False,
                                  required=False)

    render_twitter = schema.Bool(title=_(u"render_twitter",
                                         default=u"Twitter"),
                                 default=False,
                                 required=False)

    render_linkedin = schema.Bool(title=_(u"render_linkedin",
                                          default=u"Linkedin"),
                                  default=False,
                                  required=False)

    render_googleplus = schema.Bool(title=_(u"render_googleplus",
                                            default=u"Google +"),
                                    required=False)

    render_pinterest = schema.Bool(title=_(u"render_pinterest",
                                           default=u"Pinterest"),
                                   default=False,
                                   required=False)

    render_tumblr = schema.Bool(title=_(u"render_tumblr", default=u"Tumblr"),
                                required=False)

    render_whatsapp = schema.Bool(title=_(u"render_whatsapp",
                                          default=u"Whatsapp"),
                                  required=False)
コード例 #5
0
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen. Here, we use the title that the user gave or
     static string if title not defined.
     """
     return _(u'rrssb_portlet', default=u"RRSSB Portlet")