コード例 #1
0
ファイル: image.py プロジェクト: collective/fourdigits.seo
class IImage(form.Schema):
    """Add properties
    """

    form.fieldset(
        'seo',
        label=_(u'SEO'),
        fields=('seo_image', ),
    )

    seo_image = RelationChoice(
        title=_(u"Image"),
        description=_(u"Add image when social sharing this page."),
        source=ObjPathSourceBinder(),
        required=False,
    )
コード例 #2
0
class ICanonical(form.Schema):
    """Add properties
    """

    form.fieldset(
        'seo',
        label=_(u'SEO'),
        fields=('seo_canonical', ),
    )

    seo_canonical = RelationChoice(
        title=_(u"Canonical"),
        description=_(u"Add reference to canonical object."),
        source=ObjPathSourceBinder(),
        required=False,
    )
コード例 #3
0
class IMultiLanguage(form.Schema):
    """Add properties
    """

    form.fieldset(
        'seo',
        label=_(u'SEO'),
        fields=('language_links', ),
    )

    language_links = RelationList(
        title=_(u"Language Links"),
        description=_(
            u"Add reference to other languages of the same content."),
        value_type=RelationChoice(
            title=_(u"Language Links"),
            source=ObjPathSourceBinder(),
            required=False,
        ),
        required=False,
    )
コード例 #4
0
class ISeo(form.Schema):
    """Add properties
    """

    form.fieldset(
        'seo',
        label=_(u'SEO'),
        fields=(
            'seo_title',
            'seo_description',
            'seo_noindex',
            'seo_nofollow',
            'seo_noarchive',
            'seo_nosnippet',
        ),
    )

    seo_title = schema.TextLine(
        title=_(u"Title"),
        description=
        _(u"Override the meta title. When empty the default title will be used. Use maximum 50 chararcters."
          ),
        required=False,
        max_length=70,
    )

    seo_description = schema.TextLine(
        title=_(u"Description"),
        description=
        _(u"Override the meta description. When empty the default description will be used. Use maximum 150 characters."
          ),
        required=False,
        max_length=155,
    )

    seo_noindex = schema.Bool(
        title=_(u"No Index"),
        description=_(u"Tells search engines not to index this page"),
        required=False,
    )

    seo_nofollow = schema.Bool(
        title=_(u"No Follow"),
        description=_(
            u"Tells search engines not to follow links on this page"),
        required=False,
    )

    seo_noarchive = schema.Bool(
        title=_(u"No Archive"),
        description=_(
            u"Tells search engines not to store a cached copy of this page"),
        required=False,
    )

    seo_nosnippet = schema.Bool(
        title=_(u"No Snippet"),
        description=_(
            u"Tells search engines not to show a snippet under your listing"),
        required=False,
    )
コード例 #5
0
ファイル: settings.py プロジェクト: collective/fourdigits.seo
class SeoIndexingSettingsForm(Group):
    label = _(u"Indexing")
    fields = Fields(ISeoIndexingSettings)
コード例 #6
0
ファイル: settings.py プロジェクト: collective/fourdigits.seo
class SeoIconsSettingsForm(Group):
    label = _(u"Icons")
    fields = Fields(ISeoIconsSettings)
コード例 #7
0
ファイル: settings.py プロジェクト: collective/fourdigits.seo
class SeoSocialSettingsForm(Group):
    label = _(u"Social")
    fields = Fields(ISeoSocialSettings)
コード例 #8
0
ファイル: userdata.py プロジェクト: collective/fourdigits.seo
class IEnhancedUserDataSchema(IUserDataSchema):
    linkedin_author = schema.TextLine(
        title=_(u'label_linkedin_author', default=u'Linkedin author'),
        description=_(
            u'help_linkedin_author',
            default=
            u"Fill in your linkedin author page, ie. http://nl.linkedin.com/in/username"
        ),
        required=False,
    )

    google_author = schema.TextLine(
        title=_(u'label_google_author', default=u'Google author'),
        description=_(
            u'help_google_author',
            default=
            u"Fill in your google author page, ie. https://plus.google.com/123456789012345678901/"
        ),
        required=False,
    )

    twitter_author = schema.TextLine(
        title=_(u'label_twitter_author', default=u'Twitter author'),
        description=_(u'help_twitter_author',
                      default=u"Fill in your twitter author, ie. @johndoe"),
        required=False,
    )

    facebook_id = schema.TextLine(
        title=_(u'label_facebook_id', default=u'Facebook ID'),
        description=_(
            u'help_facebook_id',
            default=u"Fill in your facebook id, or the url to your profile page"
        ),
        required=False,
    )

    first_name = schema.TextLine(
        title=_(u'label_first_name', default=u'First name'),
        description=_(u'help_first_name', default=u"Fill in your first name"),
        required=False,
    )

    last_name = schema.TextLine(
        title=_(u'label_last_name', default=u'Last name'),
        description=_(u'help_last_name', default=u"Fill in your last name"),
        required=False,
    )

    gender = schema.Choice(
        title=_(u'label_gender', default=u'Gender'),
        description=_(u'help_gender', default=u"Fill in your gender"),
        source=SimpleVocabulary([
            SimpleVocabulary.createTerm('male', 'male', _('Male')),
            SimpleVocabulary.createTerm('female', 'female', _('Female'))
        ]),
        required=False,
    )