provide informations about registration numbers on service and service manager view
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2142 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
2e4f320fe7
commit
1b67c54099
1 changed files with 15 additions and 4 deletions
|
@ -136,7 +136,8 @@ class ServiceManagerView(BaseView):
|
||||||
result.append(dict(isHeadline=True, level=level,
|
result.append(dict(isHeadline=True, level=level,
|
||||||
name=element.name,
|
name=element.name,
|
||||||
title=element.title,
|
title=element.title,
|
||||||
object=element.object))
|
object=element.object,
|
||||||
|
view=None))
|
||||||
classific = clsf
|
classific = clsf
|
||||||
if level > maxLevel:
|
if level > maxLevel:
|
||||||
maxLevel = level
|
maxLevel = level
|
||||||
|
@ -144,7 +145,8 @@ class ServiceManagerView(BaseView):
|
||||||
name=svc.getName(),
|
name=svc.getName(),
|
||||||
title=svc.title or svc.getName(),
|
title=svc.title or svc.getName(),
|
||||||
fromTo=self.getFromTo(svc),
|
fromTo=self.getFromTo(svc),
|
||||||
object=svc))
|
object=svc,
|
||||||
|
view=ServiceView(svc, self.request)))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def eventsOverview(self):
|
def eventsOverview(self):
|
||||||
|
@ -229,8 +231,17 @@ class ServiceView(BaseView):
|
||||||
def getRegistrationInfo(self, reg):
|
def getRegistrationInfo(self, reg):
|
||||||
registration = self.getRegistrations()[reg]
|
registration = self.getRegistrations()[reg]
|
||||||
state = IStateful(registration).getStateObject()
|
state = IStateful(registration).getStateObject()
|
||||||
return dict(number=registration.number,
|
number=registration.number
|
||||||
state=state.name, stateTitle=state.title)
|
return dict(number=number, state=state.name, stateTitle=state.title)
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def registeredTotalSubmitted(self):
|
||||||
|
total = 0
|
||||||
|
for reg in self.getRegistrations().values():
|
||||||
|
state = IStateful(reg).getStateObject()
|
||||||
|
if state.name != 'temporary':
|
||||||
|
total += reg.number
|
||||||
|
return total
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
newClient = False
|
newClient = False
|
||||||
|
|
Loading…
Add table
Reference in a new issue