Exemplo n.º 1
0
class IQuarterly(form.Schema, IImageScaleTraversable):
    """
    TBFAC Quarterly Type
    """
    
    # If you want a schema-defined interface, delete the form.model
    # line below and delete the matching file in the models sub-directory.
    # If you want a model-based interface, edit
    # models/quarterly.xml to define the content type
    # and add directives here as necessary.
    
    #form.model("models/quarterly.xml")

    title = schema.TextLine(
        title=_(u"Title"),
    )

    info = RelationChoice(
        title=_(u"Info"),
        source=ObjPathSourceBinder(object_provides=IInfo.__identifier__),
        required=False,
    )

    text = RichText(
        title=_(u"Body"),
        required=False,
    )
Exemplo n.º 2
0
class IFolder(form.Schema):
    """TBFAC Folder Type
    """

    image = NamedBlobImage(
        title=_(u"Link Image"),
        required=False,
    )

    link = schema.TextLine(
        title=_(u"Link URL"),
        required=False,
    )
Exemplo n.º 3
0
class INomination(form.Schema):
    """
    TBFAC Nomination Type
    """

    title = schema.TextLine(
        title=_(u'Title'),
        required=False,
    )

    category = schema.List(
        title=_(u'Award Category'),
        value_type=schema.Choice(values=[
            _(u'Visual Arts'),
            _(u'Performing Arts'),
            _(u'Uncatrgorized')
        ]),
        required=False,
    )

    info = RelationList(
        title=_(u'Nominated Info'),
        value_type=RelationChoice(
            source=ObjPathSourceBinder(
                object_provides=IInfo.__identifier__,
                #navigation_tree_query={
                #    'path': {'query': '/taishin/event/info'}
                #},
            ), ),
    )

    text = RichText(
        title=_(u'Body'),
        required=False,
    )
Exemplo n.º 4
0
class IJury(form.Schema, IImageScaleTraversable):
    """
    TBFAC Jury Type
    """

    # If you want a schema-defined interface, delete the form.model
    # line below and delete the matching file in the models sub-directory.
    # If you want a model-based interface, edit
    # models/jury.xml to define the content type
    # and add directives here as necessary.

    #form.model("models/jury.xml")

    title = schema.TextLine(title=_(u"Name"), )

    description = schema.Text(
        title=_(u"Description"),
        required=False,
    )

    category = schema.Choice(
        title=_(u'Award Category'),
        values=[_(u'Visual Arts'),
                _(u'Performing Arts'),
                _(u'Uncatrgorized')],
        required=True,
    )

    form.primary('bio')
    bio = RichText(
        title=_(u"Bio"),
        required=False,
    )

    form.primary('photo')
    photo = NamedImage(
        title=_(u"Photo"),
        description=_(u"Upload Photo"),
        required=False,
    )
Exemplo n.º 5
0
class IArticle(form.Schema, IImageScaleTraversable):
    """
    TBFAC Article Type
    """
    
    # If you want a schema-defined interface, delete the form.model
    # line below and delete the matching file in the models sub-directory.
    # If you want a model-based interface, edit
    # models/article.xml to define the content type
    # and add directives here as necessary.
    
    #form.model("models/article.xml")

    dexteritytextindexer.searchable('title')
    title = schema.TextLine(
        title=_(u"Title"),
    )

    dexteritytextindexer.searchable('author')
    author = schema.TextLine(
        title=_(u"Author"),
        required=True,
    )

    form.widget(info_ref=AutocompleteMultiFieldWidget)
    info_ref = RelationList(
        title=_(u"Referenced Info"),
        description=_(u"If no referenced Info items to select, please manually fill them in the next field."),
        value_type=RelationChoice(
            source=ObjPathSourceBinder(
                object_provides=IInfo.__identifier__,
            ),
        ),
        required=False,
    )

    info_rvw = schema.TextLine(
        title=_(u"Reviewed Info"),
        description=_(u"Use comma to separate multiple Info data."),
        required=False,
    )

    dexteritytextindexer.searchable('text')
    text = RichText(
        title=_(u"Body"),
        required=False,
    )
Exemplo n.º 6
0
 def __call__(self, context=None):
     items = (
         SimpleTerm(value='KeelungCity', title=_(u'Keelung City')),
         SimpleTerm(value='TaipeiCity', title=_(u'Taipei City')),
         SimpleTerm(value='NewTaipeiCity', title=_(u'New Taipei City')),
         SimpleTerm(value='TaoyuanCounty', title=_(u'Taoyuan County')),
         SimpleTerm(value='HsinchuCounty', title=_(u'Hsinchu County')),
         SimpleTerm(value='HsinchuCity', title=_(u'Hsinchu City')),
         SimpleTerm(value='MiaoliCounty', title=_(u'Miaoli County')),
         SimpleTerm(value='TaichungCity', title=_(u'Taichung City')),
         SimpleTerm(value='NantouCounty', title=_(u'Nantou County')),
         SimpleTerm(value='ChanghuaCounty', title=_(u'Changhua County')),
         SimpleTerm(value='YunlinCounty', title=_(u'Yunlin County')),
         SimpleTerm(value='ChiayiCity', title=_(u'Chiayi City')),
         SimpleTerm(value='ChiayiCounty', title=_(u'Chiayi County')),
         SimpleTerm(value='TainanCity', title=_(u'Tainan City')),
         SimpleTerm(value='KaohsiungCity', title=_(u'Kaohsiung City')),
         SimpleTerm(value='PingtungCounty', title=_(u'Pingtung County')),
         SimpleTerm(value='YilanCounty', title=_(u'Yilan County')),
         SimpleTerm(value='HualienCounty', title=_(u'Hualien County')),
         SimpleTerm(value='TaitungCounty', title=_(u'Taitung County')),
         SimpleTerm(value='PenghuCounty', title=_(u'Penghu County')),
         SimpleTerm(value='LienchiangCounty', title=_(u'Lienchiang County')),
         SimpleTerm(value='KinmenCounty', title=_(u'Kinmen County')),
     )
     return SimpleVocabulary(items)
Exemplo n.º 7
0
class IInfo(form.Schema, IImageScaleTraversable):
    """
    TBFAC Info Type
    """

    # If you want a schema-defined interface, delete the form.model
    # line below and delete the matching file in the models sub-directory.
    # If you want a model-based interface, edit
    # models/info.xml to define the content type
    # and add directives here as necessary.

    #form.model("models/info.xml")

    organizer = schema.TextLine(
        title=_(u'Organizer'),
        required=False,
    )

    category = schema.List(
        title=_(u'Category'),
        value_type=schema.Choice(values=[
            _(u'Show'),
            _(u'Dancing'),
            _(u'Music'),
            _(u'Drama'),
            _(u'Opera')
        ]),
        required=False,
    )

    startDate = schema.Date(title=_(u'Start Date'), )

    endDate = schema.Date(title=_(u'End Date'), )

    dateDetails = schema.Text(
        title=_(u'Date Details'),
        description=_(u'Date Details Description'),
        required=False,
    )

    region = schema.List(
        title=_(u"Region"),
        value_type=schema.Choice(
            vocabulary='regions',
            required=False,
        ),
    )

    venue = RelationList(
        title=_(u'Venue'),
        value_type=RelationChoice(
            source=ObjPathSourceBinder(
                object_provides=IVenue.__identifier__,
                #navigation_tree_query={
                #    'path': {'query': '/taishin/venues'}
                #},
            ), ),
        required=False,
    )

    form.primary('text')
    text = RichText(
        title=_(u'Body'),
        required=False,
    )

    feeDetails = schema.Text(
        title=_(u'Fee Details'),
        description=_(u'Fee Details Description'),
        required=False,
    )

    ticketURL = schema.TextLine(
        title=_(u'Ticket URL'),
        required=False,
    )

    contactPhone = schema.TextLine(
        title=_(u'Contact Phone'),
        required=False,
    )

    contactName = schema.TextLine(
        title=_(u'Contact Name'),
        required=False,
    )

    eventURL = schema.TextLine(
        title=_(u'Event URL'),
        required=False,
    )

    image = NamedBlobImage(
        title=_(u'Lead Image'),
        description=_(u"Upload a Image of Size 230x230."),
        required=True,
    )

    banner = NamedBlobImage(
        title=_(u'Banner Image'),
        description=_(u"Upload a Image of Size 710x300."),
        required=False,
    )
Exemplo n.º 8
0
 def __call__(self, context=None):
     items = (
         SimpleTerm(value='KeelungCity', title=_(u'Keelung City')),
         SimpleTerm(value='TaipeiCity', title=_(u'Taipei City')),
         SimpleTerm(value='NewTaipeiCity', title=_(u'New Taipei City')),
         SimpleTerm(value='TaoyuanCounty', title=_(u'Taoyuan County')),
         SimpleTerm(value='HsinchuCounty', title=_(u'Hsinchu County')),
         SimpleTerm(value='HsinchuCity', title=_(u'Hsinchu City')),
         SimpleTerm(value='MiaoliCounty', title=_(u'Miaoli County')),
         SimpleTerm(value='TaichungCity', title=_(u'Taichung City')),
         SimpleTerm(value='NantouCounty', title=_(u'Nantou County')),
         SimpleTerm(value='ChanghuaCounty', title=_(u'Changhua County')),
         SimpleTerm(value='YunlinCounty', title=_(u'Yunlin County')),
         SimpleTerm(value='ChiayiCity', title=_(u'Chiayi City')),
         SimpleTerm(value='ChiayiCounty', title=_(u'Chiayi County')),
         SimpleTerm(value='TainanCity', title=_(u'Tainan City')),
         SimpleTerm(value='KaohsiungCity', title=_(u'Kaohsiung City')),
         SimpleTerm(value='PingtungCounty', title=_(u'Pingtung County')),
         SimpleTerm(value='YilanCounty', title=_(u'Yilan County')),
         SimpleTerm(value='HualienCounty', title=_(u'Hualien County')),
         SimpleTerm(value='TaitungCounty', title=_(u'Taitung County')),
         SimpleTerm(value='PenghuCounty', title=_(u'Penghu County')),
         SimpleTerm(value='LienchiangCounty',
                    title=_(u'Lienchiang County')),
         SimpleTerm(value='KinmenCounty', title=_(u'Kinmen County')),
     )
     return SimpleVocabulary(items)
Exemplo n.º 9
0
class ICommittee(form.Schema, IImageScaleTraversable):
    """
    TBFAC Committee Type
    """
    
    # If you want a schema-defined interface, delete the form.model
    # line below and delete the matching file in the models sub-directory.
    # If you want a model-based interface, edit
    # models/committee.xml to define the content type
    # and add directives here as necessary.
    
    #form.model("models/committee.xml")

    title = schema.TextLine(
        title=_(u"Name"),
    )

    category = schema.Choice(
        title=_(u'Award Category'),
        values=[_(u'Visual Arts'), _(u'Performing Arts'), _(u'Uncatrgorized')],
        required=True,
    )

    group = schema.List(
        title=_(u"Group"),
        value_type=schema.Choice(
            values=[_(u"NominatorGroup"), _(u"ObserverGroup"), _(u"Jury"), _(u"Committee"), _(u"FinalReviewer"), _(u"RecommendGroup")]
        )
    )

    year = schema.TextLine(
        title=_(u"Year"),
    )

    description = schema.Text(
        title=_(u"Description"),
        required=False,
    )

    form.primary('bio')
    bio = RichText(
        title=_(u"Bio"),
        required=False,
    )

    form.primary('photo')
    photo = NamedImage(
        title=_(u"Photo"),
        description=_(u"Upload Photo"),
        required=False,
    )