예제 #1
0
def finalizeArticleSchema(schema):
    schema['title'].storage = atapi.AnnotationStorage()
    schema['title'].widget.description = _(u"Article title.")
    schema['description'].storage = atapi.AnnotationStorage()
    schema['description'].required = True
    schema['description'].widget.label = _('Abstract')
    schema['description'].widget.description = _('A short summary of your article.')
    schema['subject'].storage = atapi.AnnotationStorage()
    #schema['subject'].widget.label = _('Keywords')
    #schema['subject'].widget.description  = _('Please select among the existing keywords or add new ones to describe the subjects of your article.')
    schema['subject'].widget = AjaxKeywordsWidget(
                label=_('Keywords'),
                description=('Please select among the existing keywords or add new ones to describe the subjects of your article. Use semicolon or press ENTER to add a tag.')
    )
 
    # Reorder
    schema.moveField('description', after=RelatorsMixin.lastField)
    schema.moveField('subject', after='description')
    
    # Hide this fields
    for field in ('effectiveDate', 'expirationDate', 'allowDiscussion'):
        schema[field].widget.visible = {'edit': 'invisible', 'view': 'invisible'}
    
    # Call ATContentTypes
    schemata.finalizeATCTSchema(
        schema,
        folderish=True,
        moveDiscussion=False
    )
    
    # Fix after ATContentTypes
    schema.changeSchemataForField('subject', 'default')
    return schema
예제 #2
0
def finalizeArticleSchema(schema):
    schema['title'].storage = atapi.AnnotationStorage()
    schema['title'].widget.description = _(u"Article title.")
    schema['description'].storage = atapi.AnnotationStorage()
    schema['description'].required = True
    schema['description'].widget.label = _('Abstract')
    schema['description'].widget.description = _(
        'A short summary of your article.')
    schema['subject'].storage = atapi.AnnotationStorage()
    schema['subject'].widget.label = _('Keywords')
    schema['subject'].widget.description = _(
        'Please select among the existing keywords or add new ones to describe the subjects of your article.'
    )

    # Reorder
    schema.moveField('description', after=RelatorsMixin.lastField)
    schema.moveField('subject', after='description')

    # Hide this fields
    for field in ('effectiveDate', 'expirationDate', 'allowDiscussion'):
        schema[field].widget.visible = {
            'edit': 'invisible',
            'view': 'invisible'
        }

    # Call ATContentTypes
    schemata.finalizeATCTSchema(schema, folderish=True, moveDiscussion=False)

    # Fix after ATContentTypes
    schema.changeSchemataForField('subject', 'default')
    return schema
예제 #3
0
    def test(self):
        """
        test method
        """
        dummy = _(u'a dummy string')

        return {'dummy': dummy}
예제 #4
0
    def test(self):
        """
        test method
        """
        dummy = _(u'a dummy string')

        return {'dummy': dummy}
예제 #5
0
from gcommons.Journal.config import PROJECTNAME

#
# Schema
#
JournalSchema = folder.ATFolderSchema.copy() + gcContainerMixin.schema.copy(
) + atapi.Schema((
    atapi.StringField(
        name='issn',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata='bibdata',
        widget=atapi.StringWidget(
            label=_(u"ISSN"),
            description=_(u"Journal ISSN"),
        ),
    ),
    atapi.StringField(
        name='publisher',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata='bibdata',
        widget=atapi.StringWidget(
            label=_(u"Publisher"),
            description=_(u"Organization or company publishing the journal"),
        ),
    ),
예제 #6
0
    atapi.ComputedField(
        'title',
        searchable=1,
        expression='context._compute_title()',
        accessor='Title'
    ),

    atapi.StringField(
        name='volume',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata ='default',
        widget=atapi.StringWidget(
            label=_(u"Volume"),
            description=_(u"Volume number in the series"),
        ),
    ),

    atapi.StringField(
        name='number',
        required=False,
        searchable=1,
        storage=atapi.AnnotationStorage(),
        #default='',
        schemata ='default',
        widget=atapi.StringWidget(
            label=_(u"Number"),
            description=_(u"Issue Number"),
        ),
예제 #7
0
IssueSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.ComputedField('title',
                        searchable=1,
                        expression='context._compute_title()',
                        accessor='Title'),
    atapi.StringField(
        name='volume',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata='default',
        widget=atapi.StringWidget(
            label=_(u"Volume"),
            description=_(u"Volume number in the series"),
        ),
    ),
    atapi.StringField(
        name='number',
        required=False,
        searchable=1,
        storage=atapi.AnnotationStorage(),
        #default='',
        schemata='default',
        widget=atapi.StringWidget(
            label=_(u"Number"),
            description=_(u"Issue Number"),
        ),
    ),
예제 #8
0
# Voting
from zope.component import getUtility
from gcommons.Core.interfaces.utilities import IVoteStorage



EditorsMeetingSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='venue',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Venue"),
            description=_(u"Description of the venue(s)"),
        ),
    ),

    #
    # Dates
    atapi.DateTimeField(
        name='startDate',  
        required=True, 
        searchable=False, 
        accessor='start',
        write_permission = permission_EditorsMeetingChangeDate,
        default_method=DateTime,
        languageIndependent=True,
        widget = atapi.CalendarWidget(
예제 #9
0
    ),

    # -*- Your Archetypes field definitions here ... -*-
    atapi.ComputedField('bibreference',
                        searchable=1,
                        expression='context._compute_bibreference()',
                        accessor='BibReference'),
    atapi.StringField(
        name='pages',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata='bibdata',
        widget=atapi.StringWidget(
            label=_(u"Pages"),
            description=_(u"Page range of published article"),
        ),
    ),
    atapi.StringField(
        name='doi',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata='bibdata',
        widget=atapi.StringWidget(
            label=_(u"DOI"),
            description=_(u"Digital Object Identifier for this article"),
        ),
    ),
예제 #10
0
 def __init__(self, portlet_title=_("Article List"), watch_review_state=("eb_draft",)):
     self.portlet_title = portlet_title
     self.watch_review_state = watch_review_state
예제 #11
0
 def create(self, data):
     return Assignment(portlet_title=data.get('portlet_title',_("Article List")), watch_review_state=data.get('watch_review_state', ('eb_draft',)))
예제 #12
0
from gcommons.Journal import JournalMessageFactory as _
from gcommons.Journal.interfaces import IgcFrontPage
from gcommons.Journal.config import PROJECTNAME

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='journal',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata='Journal',
        widget=atapi.StringWidget(
            label=_(u"Journal name"),
            description=_(u"Journal that will be published on the front page"),
        ),
    ),
    atapi.StringField(
        name='issueType',
        required=True,
        searchable=1,
        storage=atapi.AnnotationStorage(),
        vocabulary=((
            ('Issue', u'Issue'),
            ('SpecialIssue', u'Special Issue'),
            ('ResearchThread', u'Research Thread'),
        )),
        enforceVocabulary=True,
        widget=atapi.SelectionWidget(label="Issue Type",
예제 #13
0
    atapi.ComputedField(
        'bibreference',
        searchable=1,
        expression='context._compute_bibreference()',
        accessor='BibReference'
    ),

    atapi.StringField(
        name='pages',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata ='bibdata',
        widget=atapi.StringWidget(
            label=_(u"Pages"),
            description=_(u"Page range of published article"),
        ),
    ),

    atapi.StringField(
        name='doi',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata ='bibdata',
        widget=atapi.StringWidget(
            label=_(u"DOI"),
            description=_(u"Digital Object Identifier for this article"),
        ),
예제 #14
0
from gcommons.Journal.interfaces import IJournal
from gcommons.Journal.config import PROJECTNAME

#
# Schema
#
JournalSchema = folder.ATFolderSchema.copy() + gcContainerMixin.schema.copy() + atapi.Schema((
    atapi.StringField(
        name='issn',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata ='bibdata',
        widget=atapi.StringWidget(
            label=_(u"ISSN"),
            description=_(u"Journal ISSN"),
        ),
    ),

    atapi.StringField(
        name='publisher',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata ='bibdata',
        widget=atapi.StringWidget(
            label=_(u"Publisher"),
            description=_(u"Organization or company publishing the journal"),
        ),
예제 #15
0
 def title(self):
     """return title of feed for portlet"""
     return getattr(self.data, 'portlet_title', _('Article List'))
예제 #16
0
from Products.ATContentTypes.utils import DT2dt
from Products.ATContentTypes.lib.calendarsupport import CalendarSupportMixin
from Products.ATContentTypes.interfaces import ICalendarSupport



EditorsMeetingSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='venue',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Venue"),
            description=_(u"Description of the venue(s)"),
        ),
    ),

    #
    # Dates
    atapi.DateTimeField(
        name='startDate',                  
        required=True,                  
        searchable=False,                  
        accessor='start',                  
#TODO                  write_permission = ChangeEvents,                  
        default_method=DateTime,                  
        languageIndependent=True,                  
        widget = atapi.CalendarWidget(                        
예제 #17
0
from gcommons.Journal import JournalMessageFactory as _
from gcommons.Journal.interfaces import IgcFrontPage
from gcommons.Journal.config import PROJECTNAME

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='journal',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        schemata ='Journal',
        widget=atapi.StringWidget(
            label=_(u"Journal name"),
            description=_(u"Journal that will be published on the front page"),
        ),
    ),

    atapi.StringField(
        name='issueType',
        required=True,
        searchable=1,
        storage=atapi.AnnotationStorage(),
        vocabulary=((
                ('Issue', u'Issue'),
                ('SpecialIssue', u'Special Issue'),
                ('ResearchThread', u'Research Thread'),
                )), 
        enforceVocabulary=True,