add attribute 'userSetting' for specifying column specifications that may be edited by the user; extend interface definition to resemble currently used attributes
This commit is contained in:
parent
b8db38cf98
commit
67b969a481
2 changed files with 18 additions and 8 deletions
|
@ -74,6 +74,7 @@ class Report(Template):
|
||||||
|
|
||||||
fields = Jeep((field.label,))
|
fields = Jeep((field.label,))
|
||||||
hiddenQueryFields = ()
|
hiddenQueryFields = ()
|
||||||
|
userSettings = (field.label,)
|
||||||
defaultOutputFields = (field.label,)
|
defaultOutputFields = (field.label,)
|
||||||
defaultSortCriteria = (field.label,)
|
defaultSortCriteria = (field.label,)
|
||||||
presentationFormat = None
|
presentationFormat = None
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Report management.
|
Report management.
|
||||||
|
|
||||||
$Id$
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from zope.interface import Interface, Attribute
|
from zope.interface import Interface, Attribute
|
||||||
|
@ -60,10 +58,11 @@ class IReportParams(Interface):
|
||||||
|
|
||||||
queryCriteria = Attribute('The criteria to be used for executing the '
|
queryCriteria = Attribute('The criteria to be used for executing the '
|
||||||
'query step.')
|
'query step.')
|
||||||
sortSpec = Attribute('A sequence of fields/sort directions to be used for '
|
sortCriteria = Attribute('A sequence of fields/sort directions to be '
|
||||||
'executing the sorting step.')
|
'used for executing the sorting step.')
|
||||||
outputSpec = Attribute('A sequence of output fields (column/cell '
|
outputFields = Attribute('A sequence of output fields (column/cell '
|
||||||
'specifications) to be used for presenting the result data.')
|
'specifications) to be used for presenting the result '
|
||||||
|
'data.')
|
||||||
|
|
||||||
|
|
||||||
class IReport(ITemplate, IReportParams):
|
class IReport(ITemplate, IReportParams):
|
||||||
|
@ -97,11 +96,21 @@ class IReport(ITemplate, IReportParams):
|
||||||
required=False,)
|
required=False,)
|
||||||
|
|
||||||
manager = Attribute('The manager of this message object')
|
manager = Attribute('The manager of this message object')
|
||||||
|
|
||||||
fields = Attribute('An ordered collection of all field definitions '
|
fields = Attribute('An ordered collection of all field definitions '
|
||||||
'available for this report type.')
|
'available for this report type.')
|
||||||
|
hiddenQueryFields = Attribute('Fields used for query criteria '
|
||||||
|
'that are not shown to/editable by the user, '
|
||||||
|
'e.g. because they are determined automatically.')
|
||||||
|
userSettings = Attribute('Fields that can be set by the user.')
|
||||||
|
defaultOutputFields = Attribute('Predefined output columns.')
|
||||||
|
defaultSortCriteria = Attribute('Predefined sort columns.')
|
||||||
|
presentationFormat = Attribute('Selected presentation format.')
|
||||||
renderers = Attribute('An ordered collection of renderers available '
|
renderers = Attribute('An ordered collection of renderers available '
|
||||||
'for this report type.')
|
'for this report type.')
|
||||||
|
limits = Attribute('A pair of integers that specify the slice '
|
||||||
|
'(i.e. start and stop values) that has to be taken '
|
||||||
|
'from the sorted result set for output.')
|
||||||
|
|
||||||
|
|
||||||
def getQueryFields():
|
def getQueryFields():
|
||||||
""" Return a sequence of fields that may be used for setting up
|
""" Return a sequence of fields that may be used for setting up
|
||||||
|
|
Loading…
Add table
Reference in a new issue