[Mpuls-commits] r5699 - base/trunk/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 8 10:27:15 CET 2011
Author: bricks
Date: 2011-12-08 10:26:59 +0100 (Thu, 08 Dec 2011)
New Revision: 5699
Modified:
base/trunk/mpulsweb/model/case.py
Log:
Add method to return the current phase name of a State
For mpuls_S the complete phase description could be confusion
for normal users. Therefore only the phase of the current phase
should be shown. To not have to pass a PhasesList to all
casemanagement templates it can now be received via
SessionCase.getStatus().getPhaseName().
Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py 2011-12-07 14:51:59 UTC (rev 5698)
+++ base/trunk/mpulsweb/model/case.py 2011-12-08 09:26:59 UTC (rev 5699)
@@ -1465,6 +1465,10 @@
desc.append(_('Finished'))
return " ".join(desc)
+ def getPhaseName(self):
+ phases = PhaseFactory().load(self.master_id)
+ return phases.get_current().getDescription()
+
def getAccessTime(self):
return self.access
More information about the Mpuls-commits
mailing list