Esempio n. 1
0
        ),
    ),

    StringField(
        name='projectStatus',
        widget=StringWidget(
            label='Project Status',
            description='The current projetct status.',
            label_msgid='label_project_status',
            description_msgid='help_project_status',
            i18n_domain='extropy',
            size='60',
        ),
    ),

)) +  TimeSchema.copy() + BudgetSchema.copy()


class ExtropyProject(ExtropyTracking, ExtropyBase, OrderedBaseFolder):
    """An Extropy Project contains all the information needed to manage a project."""
    implements(IExtropyTracking, IExtropyBase)

    schema = ExtropyProjectSchema

    security = ClassSecurityInfo()
    _at_rename_after_creation = True

    security.declareProtected('View','getPhases')
    def getPhases(self):
        """Gets the list of phases."""
        return self.objectValues(['ExtropyPhase'])
Esempio n. 2
0
from AccessControl import ClassSecurityInfo

from Products.Archetypes.public import *

from Products.CMFCore import permissions
from Products.CMFCore.utils import getToolByName

from Products.Extropy.config import *
from Products.Extropy.interfaces import IExtropyBase
from Products.Extropy.interfaces import IExtropyTracking
from Products.Extropy.content.ExtropyBase import ExtropyBase
from Products.Extropy.content.ExtropyBase import TimeSchema,ExtropyBaseSchema,  BudgetSchema
from Products.Extropy.content.ExtropyTracking import ExtropyTracking


ExtropyPhaseSchema = ExtropyBaseSchema.copy() + TimeSchema.copy() + BudgetSchema.copy()


class ExtropyPhase(ExtropyTracking, ExtropyBase, BaseFolder):
    """A Package is a unit of work that contains a number of tasks. Aka. milestone in other systems."""
    implements(IExtropyTracking, IExtropyBase)

    schema = ExtropyPhaseSchema
    _at_rename_after_creation = True

    security = ClassSecurityInfo()

    def getParticipants(self):
        """Gets the participants.
        """
        parent = self.getExtropyParent()