diff --git a/knowledge/qualification/configure.zcml b/knowledge/qualification/configure.zcml index a6ca61b..f5f1487 100644 --- a/knowledge/qualification/configure.zcml +++ b/knowledge/qualification/configure.zcml @@ -37,4 +37,16 @@ set_schema="loops.expert.report.IReportInstance" /> + + + + + + diff --git a/knowledge/qualification/report.py b/knowledge/qualification/report.py index 90a584c..b7991eb 100644 --- a/knowledge/qualification/report.py +++ b/knowledge/qualification/report.py @@ -33,7 +33,7 @@ from loops import util class QualificationOverview(ReportInstance): - type = "qualification_overview" + type = 'qualification_overview' label = u'Qualification Overview' rowFactory = WorkRow @@ -60,3 +60,40 @@ class QualificationOverview(ReportInstance): for wi in workItems.query(taskId=uid, state=self.states): result.append(wi) return result + + +class Qualifications(QualificationOverview): + + type = 'qualifications' + label = u'Qualifications' + + taskTypeNames = ('competence',) + + def getOptions(self, option): + return self.view.typeOptions(option) + + def selectObjects(self, parts): + result = [] + workItems = self.recordManager['work'] + target = self.view.context + tasks = [target] + self.getAllSubtasks(target) + for t in tasks: + uid = util.getUidForObject(t) + for wi in workItems.query(taskId=uid, state=self.states): + result.append(wi) + return result + + def getAllSubtasks(self, concept): + result = [] + for c in concept.getChildren([self.view.defaultPredicate]): + if c.conceptType in self.taskTypes: + result.append(c) + result.extend(self.getAllSubtasks(c)) + return result + + @Lazy + def taskTypes(self): + return [c for c in [self.conceptManager.get(name) + for name in self.taskTypeNames] + if c is not None] + diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index b7a08a1..a98c638 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index d64568b..0b403e5 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: 0.13.0\n" "POT-Creation-Date: 2007-05-22 12:00 CET\n" -"PO-Revision-Date: 2014-06-03 12:00 CET\n" +"PO-Revision-Date: 2014-07-11 12:00 CET\n" "Last-Translator: Helmut Merz \n" "Language-Team: loops developers \n" "MIME-Version: 1.0\n" @@ -849,6 +849,12 @@ msgstr "Beginn" msgid "End date" msgstr "Ende" +msgid "Start Day" +msgstr "Beginn" + +msgid "End Day" +msgstr "Ende" + msgid "Knowledge" msgstr "Kompetenzen"