provide report and view for all qualifications
This commit is contained in:
parent
21ac74f764
commit
0dee3c28aa
2 changed files with 25 additions and 5 deletions
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div metal:define-macro="results">
|
<div metal:define-macro="results">
|
||||||
|
<br />
|
||||||
<table class="report"
|
<table class="report"
|
||||||
tal:define="results reportView/results">
|
tal:define="results reportView/results">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -34,7 +35,8 @@
|
||||||
tal:attributes="class col/cssClass"
|
tal:attributes="class col/cssClass"
|
||||||
i18n:translate="" />
|
i18n:translate="" />
|
||||||
</tr>
|
</tr>
|
||||||
<tr tal:repeat="row results">
|
<tr tal:repeat="row results"
|
||||||
|
tal:attributes="class python:(repeat['row'].index() % 2) and 'even' or 'odd'">
|
||||||
<td tal:repeat="col results/displayedColumns"
|
<td tal:repeat="col results/displayedColumns"
|
||||||
tal:attributes="class col/cssClass">
|
tal:attributes="class col/cssClass">
|
||||||
<metal:column use-macro="python:
|
<metal:column use-macro="python:
|
||||||
|
|
|
@ -20,11 +20,14 @@
|
||||||
Qualification management report definitions.
|
Qualification management report definitions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from zope.cachedescriptors.property import Lazy
|
||||||
|
|
||||||
from cybertools.util.jeep import Jeep
|
from cybertools.util.jeep import Jeep
|
||||||
from loops.expert.report import ReportInstance
|
from loops.expert.report import ReportInstance
|
||||||
from loops.organize.work.report import WorkRow
|
from loops.organize.work.report import WorkRow
|
||||||
from loops.organize.work.report import deadline, day, task, party, state
|
from loops.organize.work.report import deadline, day, task, party, state
|
||||||
from loops.organize.work.report import workTitle, workDescription
|
from loops.organize.work.report import workTitle, workDescription
|
||||||
|
from loops import util
|
||||||
|
|
||||||
|
|
||||||
class QualificationOverview(ReportInstance):
|
class QualificationOverview(ReportInstance):
|
||||||
|
@ -34,10 +37,25 @@ class QualificationOverview(ReportInstance):
|
||||||
|
|
||||||
rowFactory = WorkRow
|
rowFactory = WorkRow
|
||||||
|
|
||||||
fields = Jeep((day, deadline, party, task, workTitle, state))
|
fields = Jeep((task, party, workTitle, day, state)) # +deadline?
|
||||||
|
|
||||||
taskTypeNames = ('folder','query', 'competence',)
|
|
||||||
defaultOutputFields = fields
|
defaultOutputFields = fields
|
||||||
|
|
||||||
def getTasks(self, parts):
|
def getOptions(self, option):
|
||||||
return []
|
return self.view.options(option)
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def states(self):
|
||||||
|
return self.getOptions('report_select_state' or ('planned',))
|
||||||
|
|
||||||
|
def selectObjects(self, parts):
|
||||||
|
result = []
|
||||||
|
workItems = self.recordManager['work']
|
||||||
|
pred = self.conceptManager['querytarget']
|
||||||
|
types = self.view.context.getChildren([pred])
|
||||||
|
for t in types:
|
||||||
|
for c in t.getChildren([self.view.typePredicate]):
|
||||||
|
uid = util.getUidForObject(c)
|
||||||
|
for wi in workItems.query(taskId=uid, state=self.states):
|
||||||
|
result.append(wi)
|
||||||
|
return result
|
||||||
|
|
Loading…
Add table
Reference in a new issue