コード例 #1
0
    def test(self):
        """
        test method
        """
        dummy = _(u'a dummy string')

        return {'dummy': dummy} 
コード例 #2
0
from uwmarketing.googlemaps import googlemapsMessageFactory as _

from uwmarketing.googlemaps.interfaces import IRegion
from uwmarketing.googlemaps.config import PROJECTNAME

RegionSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.TextField(
        'popup',
        searchable=True,
        storage=atapi.AnnotationStorage(),
        default_output_type = 'text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u"Popup Window"),
            description=_(u"Information in the map popup window"),
        ),
        validators = ('isTidyHtmlWithCleanup',),
    ),


    atapi.TextField(
        'text',
        searchable=True,
        storage=atapi.AnnotationStorage(),
        default_output_type = 'text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u"Body Text"),
            description=_(u"Give a richer, more in-depth description here"),
        ),
コード例 #3
0
# -*- Message Factory Imported Here -*-
from uwmarketing.googlemaps import googlemapsMessageFactory as _

from uwmarketing.googlemaps.interfaces import ILocation
from uwmarketing.googlemaps.config import PROJECTNAME

LocationSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(
    (
        # -*- Your Archetypes field definitions here ... -*-
        atapi.TextField(
            "popup",
            storage=atapi.AnnotationStorage(),
            default_output_type="text/x-html-safe",
            widget=atapi.RichWidget(
                label=_(u"Popup Window"), description=_(u"Information that displays in the popup window")
            ),
            validators=("isTidyHtmlWithCleanup",),
        ),
        atapi.StringField(
            "markerIcon",
            storage=atapi.AnnotationStorage(),
            widget=atapi.SelectionWidget(
                format="select", label=_(u"Marker Icon"), description=_(u"Select the marker icon")
            ),
            vocabulary=["Gold Marker", "Purple Marker", "Red Marker", "Blue Marker", "Green Marker"],
            enforceVocabulary=True,
        ),
        atapi.StringField(
            "longitude",
            default="0.0",
コード例 #4
0
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-
from uwmarketing.googlemaps import googlemapsMessageFactory as _

from uwmarketing.googlemaps.interfaces import IGoogleMap
from uwmarketing.googlemaps.config import PROJECTNAME

GoogleMapSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='dropdownMessage',
        default='Select a district',
        widget=atapi.StringWidget(
            label=_(u"Dropdown Message"),
            description=_(u"Custom message for the dropdown navigation in the map's search toolbar."),
            maxlength=30,
            size=30,
        ),
        required=False,
        searchable=False
    ),

    atapi.StringField(
        name='popupMessage',
        default='Learn more about this district',
        widget=atapi.StringWidget(
            label=_(u"Popup Message"),
            description=_(u"Customize the learn more sentence in the popup window"),
            maxlength=140,