Ejemplo n.º 1
0
class ICookieConsentSettings(Interface):
    """ Interface for cookie consent controlpanel """

    accept_on_scroll = Bool(
        title=_("accept_on_scroll_label", default="Accept policy on scroll"),
        description=_(
            "accept_on_scroll_help",
            default="If checked, scrolling the page will be interrpreted"
            " as the user accepted the cookie policy.",
        ),
    )

    cookie_consent_configuration = SourceText(
        title=_(
            "cookie_consent_configuration_label",
            default="Cookie consent configuration",
        ),
        description=_(
            "cookie_consent_configuration_help",
            default="Provide a configuration of the cookie consent banner."
            "You can set different configurations for each enabled language."
            "The first defined policy configuration will be the default one "
            "(the one used when not language specific configuration is found).",  # noqa
        ),
        default="{}",
        required=True,
        constraint=validate_cfg_json,
    )
class ISEOConfigletAdvancedSchema(Interface):
    custom_script = SourceText(
        title=_("label_custom_script", default=u'Header JavaScript'),
        description=_("help_custom_script",
                      default=u"This JavaScript code will be included in "
                      "the rendered HTML as entered in the page header."),
        default=u'',
        required=False)

    fields = List(
        title=_("label_fields", default='Fields for keywords statistic '
                'calculation.'),
        description=_("help_fields", default='Fill in filds (one per line)'
                      'which statistics of keywords usage should '
                      'be calculated for.'),
        required=False)

    stop_words = List(
        title=_("label_stop_words", default='Stop words.'),
        description=_("help_stop_words", default='Fill in stop words '
                      '(one per line) which will be excluded from kewords '
                      'statistics calculation.'),
        required=False)

    external_keywords_test = Bool(
        title=_("label_external_keywords_test",
                default='External keywords check'),
        description=_("description_external_keywords_test",
                      default='Make keywords test by opening context url as '
                      'external resource with urllib2.openurl(). This is '
                      'useful when xdv/Deliverance transformation is used '
                      'on the site.'),
        default=False,
        required=False)
Ejemplo n.º 3
0
class IZPTPage(Interface):
    """ZPT Pages are a persistent implementation of Page Templates."""
    def setSource(text, content_type='text/html'):
        """Save the source of the page template.

        'text' must be Unicode.
        """

    def getSource():
        """Get the source of the page template."""

    source = SourceText(title=_("Source"),
                        description=_("The source of the page template."),
                        required=True)

    expand = Bool(title=_("Expand macros when editing"),
                  description=_(
                      "Expand macros so that they all are shown in the "
                      "code."),
                  default=False,
                  required=True)

    evaluateInlineCode = Bool(
        title=_("Evaluate Inline Code"),
        description=_("Evaluate code snippets in TAL. We usually discourage "
                      "people from using this feature."),
        default=False,
        required=True)
Ejemplo n.º 4
0
class IDropDownMenu(IControlpanel):
    menu_configuration = SourceText(
        title=_("menu_configuration_label", default="Menu configuration"),
        description="",
        required=True,
        default=json.dumps([{
            "rootPath": "/",
            "items": []
        }]),
    )
class ISocialSettings(Interface):
    """ Interface for social settings controlpanel """

    social_links = SourceText(
        title=_("social_links_label", default="Social links"),
        description=_(
            "social_links_help",
            default="Insert a list of values for social links.",
        ),
        default="",
    )
Ejemplo n.º 6
0
class ISourceTextOnlineHelpTopic(IOnlineHelpTopic):
    """REstructed text based online help topic."""

    source = SourceText(
        title=_(u"Source Text"),
        description=_(u"Renderable source text of the topic."),
        default=u"",
        required=True,
        readonly=True)

    type = Choice(
        title=_(u"Source Type"),
        description=_(u"Type of the source text, e.g. structured text"),
        default=u"zope.source.rest",
        required=True,
        vocabulary="SourceTypes")
Ejemplo n.º 7
0
class ISiteSchema(Interface):

    site_title = TextLine(title=_(u'Site title'),
                          description=_(u"This shows up in the title bar of "
                                        "browsers and in syndication feeds."),
                          default=u'')

    site_description = Text(title=_(u'Site description'),
                            description=_(
                                u"The site description is available "
                                "in syndicated content and in search engines. "
                                "Keep it brief."),
                            default=u'',
                            required=False)

    exposeDCMetaTags = Bool(
        title=_(u"Expose Dublin Core metadata"),
        description=_(u"Exposes the Dublin Core properties as metatags."),
        default=False,
        required=False)

    display_pub_date_in_byline = Bool(
        title=_(u"Display publication date in 'about' information"),
        description=_(u"Displays content publication date on site pages."),
        default=False,
        required=False)

    enable_sitemap = Bool(title=_(u"Expose sitemap.xml.gz"),
                          description=_(
                              u"Exposes your content as a file "
                              "according to the sitemaps.org standard. You "
                              "can submit this to compliant search engines "
                              "like Google, Yahoo and Microsoft. It allows "
                              "these search engines to more intelligently "
                              "crawl your site."),
                          default=False,
                          required=False)

    webstats_js = SourceText(
        title=_(u'JavaScript for web statistics support'),
        description=_(u"For enabling web statistics support "
                      "from external providers (for e.g. Google "
                      "Analytics). Paste the code snippets provided. "
                      "It will be included in the rendered HTML as "
                      "entered near the end of the page."),
        default=u'',
        required=False)
Ejemplo n.º 8
0
class ISiteSchema(Interface):

    site_title_1 = TextLine(title=_(u'Site title (First Line)'),
                            description=_(u'First line of site title'),
                            required=False,
                            default=u'')

    site_title_2 = TextLine(title=_(u'Site title (Second Line)'),
                            description=_(u'Second line of site title'),
                            default=u'')

    site_orgao = TextLine(title=_(u'Department'),
                          description=_(u'Name of Ministry or Department '
                                        u'to which this site is subject.'),
                          required=False,
                          default=u'')

    url_orgao = TextLine(
        title=_(u'Url ID of Department'),
        description=_(
            u'Url ID for Ministry or Department to which this site is subject.'
        ),
        required=False,
        default=u'')

    site_description = Text(
        title=_(u'Site description'),
        description=_(u'The site description is available '
                      u'in syndicated content and in search engines. '
                      u'Keep it brief.'),
        default=u'',
        required=False)

    exposeDCMetaTags = Bool(
        title=_(u'Expose Dublin Core metadata'),
        description=_(u'Exposes the Dublin Core properties as metatags.'),
        default=False,
        required=False)

    display_pub_date_in_byline = Bool(
        title=_(u'Display publication date in about information'),
        description=_(u'Displays content publication date on site pages.'),
        default=False,
        required=False)

    enable_sitemap = Bool(title=_(u'Expose sitemap.xml.gz'),
                          description=_(
                              u'Exposes your content as a file '
                              u'according to the sitemaps.org standard. You '
                              u'can submit this to compliant search engines '
                              u'like Google, Yahoo and Microsoft. It allows '
                              u'these search engines to more intelligently '
                              u'crawl your site.'),
                          default=False,
                          required=False)

    webstats_js = SourceText(
        title=_(u'JavaScript for web statistics support'),
        description=_(u'For enabling web statistics support '
                      u'from external providers (for e.g. Google '
                      u'Analytics). Paste the code snippets provided. '
                      u'It will be included in the rendered HTML as '
                      u'entered near the end of the page.'),
        default=u'',
        required=False)
Ejemplo n.º 9
0
class IMarscatSchema(Interface):

    cats_import = SourceText(title=_(u'Import Text'),
                             description=_(u"Paste text here."),
                             default=u'',
                             required=False)
Ejemplo n.º 10
0
class IDesignPloneSettings(Interface):
    tipologie_notizia = SourceText(
        title=_("tipologie_notizia_label", default="Tipologie Notizia"),
        description=_(
            "tipologie_notizia_help",
            default="Inserisci i valori utilizzabili per le tipologie di una"
            " Notizia. Se il sito è multilingua, puoi inserire valori diversi"
            " a seconda delle lingue del sito.",
        ),
        required=True,
        default=json.dumps({"it": ["Avviso", "Comunicato stampa", "Novità"]}),
    )

    tipologie_unita_organizzativa = SourceText(
        title=_(
            "tipologie_unita_organizzativa_label",
            default="Tipologie Unità Organizzativa",
        ),
        description=_(
            "tipologie_unita_organizzativa_help",
            default="Inserisci i valori utilizzabili per le tipologie di un' "
            "Unità Organizzativa. Se il sito è multilingua, puoi inserire "
            "valori diversi a seconda delle lingue del sito.",
        ),
        required=True,
        default=json.dumps({"it": ["Politica", "Amministrativa", "Altro"]}),
    )

    tipologie_documento = SourceText(
        title=_("tipologie_documento_label", default="Tipologie Documento"),
        description=_(
            "tipologie_documento_help",
            default="Inserisci i valori utilizzabili per le tipologie di un "
            "Documento. Se il sito è multilingua, puoi inserire "
            "valori diversi a seconda delle lingue del sito.",
        ),
        required=True,
        default=json.dumps(
            {
                "it": [
                    "Accordi tra enti",
                    "Atti normativi",
                    "Dataset",
                    "Documenti (tecnici) di supporto",
                    "Documenti albo pretorio",
                    "Documenti attività politica",
                    "Documenti funzionamento interno",
                    "Istanze",
                    "Modulistica",
                ]
            }
        ),
    )

    tipologie_persona = SourceText(
        title=_("tipologie_persona_label", default="Tipologie Persona"),
        description=_(
            "tipologie_persona_help",
            default="Inserisci i valori utilizzabili per le tipologie di "
            "una Persona. Se il sito è multilingua, puoi inserire "
            "valori diversi a seconda delle lingue del sito.",
        ),
        required=True,
        default=json.dumps({"it": ["Amministrativa", "Politica", "Altro tipo"]}),
    )

    ruoli_persona = SourceText(
        title=_("ruoli_persona_label", default="Ruoli Persona"),
        description=_(
            "ruoli_persona_help",
            default="Inserisci i valori utilizzabili per il ruolo di "
            "una Persona. Se il sito è multilingua, puoi inserire "
            "valori diversi a seconda delle lingue del sito.",
        ),
        required=True,
        default=json.dumps(
            {
                "it": [
                    "Assessore",
                    "Sindaco",
                    "Consigliere",
                    "Referente ufficio",
                    "Responsabile",
                    "Presidente",
                ]
            }
        ),
    )

    lead_image_dimension = List(
        title=_(
            "lead_image_dimension_label",
            default="Dimensioni lead image",
        ),
        description=_(
            "lead_image_dimension_help",
            default="Se un content-type deve avere una dimensione della "
            "leadimage particolare, indicarle qui. "
            "Inserire le dimensioni nella forma di esempio "
            "PortalType|900x900",
        ),
        required=True,
        default=[
            "News Item|1920x600",
            "Servizio|1920x600",
            "UnitaOrganizzativa|1920x600",
            "Persona|180x100",
        ],
        value_type=TextLine(),
    )

    search_sections = SourceText(
        title=_("search_sections_label", default="Sezioni ricerca"),
        description=_(
            "search_sections_help",
            default="Inserire una lista di sezioni per la ricerca.",
        ),
        default="",
        required=False,
    )

    show_modified_default = Bool(
        title=_("show_modified_default_label", default="Mostra la data di modifica"),
        description=_(
            "show_modified_default_help",
            default="Questo è il valore di default per decidere se mostrare "
            "o meno la data di modifica nei contenuti che hanno la behavior "
            "abilitata. E' poi possibile sovrascrivere il default nei singoli "
            'contenuti (nel tab "Impostazioni").',
        ),
        default=True,
        required=False,
    )
Ejemplo n.º 11
0
class ISettingsSchema(Interface):
    """
        Defines the control panel schema for the iServices Theme
        settings
    """
    rsslink = URI(
        title=_(u"RSS Feed"),
        description=_(
            u"The URL to your news in RSS format (Clear it to disable)"),
        required=False)
    facebooklink = URI(
        title=_(u"Facebook link"),
        description=_(
            u"The URL to your FaceBook web page (Clear it to disable)"),
        required=False)
    twitterlink = URI(
        title=_(u"Twitter link"),
        description=_(
            u"The URL to your Twitter account (Clear it to disable)"),
        required=False)
    custom_colophon_enable = Bool(title=_(u'Enable custom colophon text'),
                                  default=False,
                                  required=False)
    colophon_text = SourceText(
        title=_(u"Colophon text"),
        description=_(u"Define the text that will appear on "
                      u"your colophon (you can use html code)"),
        default=_(
            u'Powered by Plone © CMS/WCM and iServices de México'),
        required=False,
        max_length=80)
    custom_footer_enable = Bool(title=_(u'Enable custom footer text'),
                                default=False,
                                required=False)
    footer_text = SourceText(
        title=_(u'Text - Additional advert area'),
        description=_(
            u'HTML text that will appear in the Additional advert area'),
        default=_(
            u"The Plone CMS/WSM is copyrighted by the Plone Foundation and Friends."
            u"It is distributed under the GNU LGPL License."),
        required=False)
    enable_color_switch = Bool(
        title=_(u'Enable changing plone colors'),
        description=
        _(u"Enabling this option and defining the colors below, allows you "
          u"to do a very basic plone theming for free. It allows you to change the most "
          "two most prominent colors of the default Plone 4 theme(sunburst)"),
        default=False,
        required=False)
    background_color = TextLine(
        title=_(u"Background color of the site"),
        description=_(u", use the HTML/CSS notation. The default is #205C90"),
        default=u'#205C90',
        required=False)
    strong_color = TextLine(
        title=_(u"Strong color for plone"),
        description=_(
            u"There are two main prominent colors in the plone Sunburst Theme."
            u"This option allows you to change the 'blue' color to "
            u"something that suits your needs. Use the HTML/CSS "
            u"notation. The default is #205C90"),
        default=u'#205C90',
        required=False)
    light_color = TextLine(
        title=_(u"Light color for plone"),
        description=_(
            u"There are two main prominent colors in the plone Sunburst Theme."
            u"This option allows you to change the 'light gray' color to "
            u"something that suits your needs. Use the HTML/CSS "
            u"notation. The default is #DDDDDD"),
        default=u'#DDDDDD',
        required=False)
Ejemplo n.º 12
0
class IMarscatSchema(Interface):

    cats_import = SourceText(title=_(u'Categories CSV Import'),
                             description=_(u"Import text for the categories."),
                             default=u'',
                             required=False)