1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__="""Report
15
16 Report represents a group of devices
17
18 $Id: Report.py,v 1.3 2004/04/06 02:19:04 edahl Exp $"""
19
20 __version__ = "$Revision: 1.3 $"[11:-2]
21
22 from urllib import quote
23
24 from Globals import InitializeClass
25 from AccessControl import ClassSecurityInfo
26
27 from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
28 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
29
30 from ZenModelRM import ZenModelRM
31 from ZenPackable import ZenPackable
32
33 -def manage_addReport(context, id, title = None, text=None,
34 REQUEST = None, submit=None):
62
63
64 addReport = PageTemplateFile('www/reportAdd', globals(),
65 __name__='addReport')
66
67
68 -class Report(ZenModelRM, ZenPackable):
69 """Report object"""
70
71 __pychecker__ = 'no-override'
72
73 meta_type = 'Report'
74
75
76 description = ""
77
78 security = ClassSecurityInfo()
79
80 _relations = ZenPackable._relations
81
82 - def __init__(self, id, title = None, text=None, content_type=None):
86
88 """Return our rendered template not our default page
89 """
90 if not kwargs.has_key('args'):
91 kwargs['args'] = args
92 template = self._template.__of__(self)
93 return template.pt_render(extra_context={'options': kwargs})
94
95
100
101
102 - def manage_main(self):
103 """Return the ZMI edit page of our template not ourself
104 """
105 template = self._template.__of__(self)
106 return template.pt_editForm()
107 pt_editForm = manage_main
108
109
110 - def pt_editAction(self, REQUEST, title, text, content_type, expand):
115
116
117 InitializeClass(Report)
118