def workflow_policies(context):
    context = getattr(context, 'context', context)
    placeful_workflow = getToolByName(context, 'portal_placeful_workflow', None)
    items = []
    if placeful_workflow is not None:
        if PLACEFUL_WORKFLOW_POLICY in placeful_workflow.objectIds():
            items.append((_(u"Default project workflow"), PLACEFUL_WORKFLOW_POLICY))
    items.sort()
    return SimpleVocabulary.fromItems(items)
def workflow_policies(context):
    context = getattr(context, 'context', context)
    placeful_workflow = getToolByName(context, 'portal_placeful_workflow',
                                      None)
    items = []
    if placeful_workflow is not None:
        if PLACEFUL_WORKFLOW_POLICY in placeful_workflow.objectIds():
            items.append(
                (_(u"Default project workflow"), PLACEFUL_WORKFLOW_POLICY))
    items.sort()
    return SimpleVocabulary.fromItems(items)
Example #3
0
class ISpace(Interface):
    """A space workspace, where special local roles may apply
    """

    title = schema.TextLine(title=_(u"Title"),
                            description=_(u"Name of the Space"),
                            required=True)

    description = schema.Text(title=_(u"Description"),
                              description=_(u"A short summary for the Space"),
                              required=False)

    #managers = schema.List(title=_(u"Managers"),
    #                       description=_(u"The following users should be managers of this Space"),
    #                       value_type=schema.Choice(title=_(u"User id"),
    #                                               source=UsersSource,),
    #                       required=False)

    #members = schema.List(title=_(u"Members"),
    #                      description=_(u"The following users should be members of this Space"),
    #                      value_type=schema.Choice(title=_(u"User id"),
    #                                               source=UsersSource,),
    #                      required=False)

    #groups = schema.List(title=_(u"Member groups"),
    #                     description=_(u"Members of the following groups should be members of this Space"),
    #                     value_type=schema.Choice(title=_(u"Group id"),
    #                                              source=GroupsSource,),
    #                     required=False)

    #viewers = schema.List(title=_(u"Viewers"),
    #                      description=_(u"The following users should be viewers of this Space"),
    #                      value_type=schema.Choice(title=_(u"User id"),
    #                                               source=UsersSource,),
    #                      required=False)

    #viewergroups = schema.List(title=_(u"Viewer groups"),
    #                     description=_(u"Members of the following groups should be viewers of this Space"),
    #                     value_type=schema.Choice(title=_(u"Group id"),
    #                                              source=GroupsSource,),
    #                     required=False)
    #
    #workflow_policy = schema.Choice(title=_(u"Workflow policy"),
    #                                description=_(u"Choose a workflow policy for this Space"),
    #                                vocabulary="ubify.spaces.WorkflowPolicies")
    #
    #addable_types = schema.Set(title=_(u"Addable types"),
    #                           description=_(u"These types will be addable by Space members"),
    #                           value_type=schema.Choice(title=_(u"Type id"),
    #                                                    vocabulary="ubify.spaces.AddableTypes"))

    space_icon = schema.Choice(
        title=_(u"Space Icon"),
        description=_(u"Choose a space icon for this Space"),
        vocabulary="ubify.spaces.ListSpaceIcons")
from plone.app.content.interfaces import INameFromTitle
from plone.app.content.container import Container
from Products.ATContentTypes.content.folder import ATFolder
#from Products.ATContentTypes.content.base import registerATCT

from ubify.spaces import SpaceMessageFactory as _
from ubify.spaces.interfaces import ISpace
from ubify.spaces.interfaces import IMindMappable

from BTrees.OOBTree import OOSet

class Space(ATFolder):
    implements(ISpace, ITTWLockable, INameFromTitle, IMindMappable)
    portal_type = "Space"

    title = u""
    description = u""
    space_icon = u"aaspace-icon.png"
    
    def __init__(self, id=None):
        super(Space, self).__init__(id)
        self.space_icon = u"aaspace-icon.png"
    
    def Description(self):
        if self.description is None:
            return ""
        else:
            return self.description
    
spaceFactory = Factory(Space, title=_(u"Create a new Space"))
Example #5
0
from Products.ATContentTypes.content.folder import ATFolder
#from Products.ATContentTypes.content.base import registerATCT

from ubify.spaces import SpaceMessageFactory as _
from ubify.spaces.interfaces import ISpace
from ubify.spaces.interfaces import IMindMappable

from BTrees.OOBTree import OOSet


class Space(ATFolder):
    implements(ISpace, ITTWLockable, INameFromTitle, IMindMappable)
    portal_type = "Space"

    title = u""
    description = u""
    space_icon = u"aaspace-icon.png"

    def __init__(self, id=None):
        super(Space, self).__init__(id)
        self.space_icon = u"aaspace-icon.png"

    def Description(self):
        if self.description is None:
            return ""
        else:
            return self.description


spaceFactory = Factory(Space, title=_(u"Create a new Space"))