work in progress: generic report management
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3796 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
3a24da7cf9
commit
62c8099500
2 changed files with 14 additions and 6 deletions
|
@ -26,7 +26,7 @@ from zope.interface import implements
|
|||
|
||||
from cybertools.composer.base import Component, Element, Compound
|
||||
from cybertools.composer.base import Template
|
||||
from cybertools.composer.report.field import Field
|
||||
from cybertools.composer.report import field
|
||||
from cybertools.composer.report.interfaces import IReportManager, IReport
|
||||
from cybertools.util.jeep import Jeep
|
||||
from cybertools.util.randomname import generateName
|
||||
|
@ -56,20 +56,24 @@ class ReportManager(object):
|
|||
def checkId(self, id):
|
||||
return id not in self.reports.keys()
|
||||
|
||||
|
||||
label = Field('label', u'Label',
|
||||
u'A short text that identifies a row for humans.')
|
||||
def getReport(self, id):
|
||||
if self.reports is None:
|
||||
return None
|
||||
return self.reports.get(id)
|
||||
|
||||
|
||||
class Report(Template):
|
||||
|
||||
implements(IReport)
|
||||
|
||||
name = identifier = u''
|
||||
name = identifier = title = description = u''
|
||||
type = 'generic'
|
||||
manager = None
|
||||
|
||||
fields = Jeep((label,))
|
||||
fields = Jeep((field.label,))
|
||||
renderers = ()
|
||||
sortSpec = ()
|
||||
outputSpec = ()
|
||||
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
|
|
@ -57,3 +57,7 @@ class Field(Component):
|
|||
def name(self):
|
||||
return self.__name__
|
||||
|
||||
|
||||
label = Field('label', u'Label',
|
||||
u'A short text that identifies a row for humans.')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue