[Mpuls-commits] r393 - in wasko/trunk: . waskaweb/controllers waskaweb/lib waskaweb/templates/caselifetime
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 18 11:08:05 CET 2009
Author: torsten
Date: 2009-03-18 11:08:03 +0100 (Wed, 18 Mar 2009)
New Revision: 393
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/controllers/caselifetime.py
wasko/trunk/waskaweb/lib/helpers.py
wasko/trunk/waskaweb/templates/caselifetime/overview.mako
Log:
Fixed display of dates
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-18 09:47:50 UTC (rev 392)
+++ wasko/trunk/ChangeLog.txt 2009-03-18 10:08:03 UTC (rev 393)
@@ -12,6 +12,13 @@
* formed/annotations.xhtml
+ Fixed display of dates
+
+ * waskaweb/controllers/caselifetime.py,
+ waskaweb/lib/helpers.py,
+ waskaweb/templates/caselifetime/overview.mako: Use dateconvert
+ function from helpers to display the date in the correct format.
+
2009-03-17 Torsten Irlaender <torsten.irlaender at intevation.de>
Last snapshot before rc-candidate
Modified: wasko/trunk/waskaweb/controllers/caselifetime.py
===================================================================
--- wasko/trunk/waskaweb/controllers/caselifetime.py 2009-03-18 09:47:50 UTC (rev 392)
+++ wasko/trunk/waskaweb/controllers/caselifetime.py 2009-03-18 10:08:03 UTC (rev 393)
@@ -39,6 +39,7 @@
end_art = g.formedTree.getData('cm_end_art')
c.casedata = g.formedTree
c.phase = g.formedTree.getData('phase')
+ c.phase = 3
# Welche Beendigung?
c.erfolgreiche_reintegration = False
Modified: wasko/trunk/waskaweb/lib/helpers.py
===================================================================
--- wasko/trunk/waskaweb/lib/helpers.py 2009-03-18 09:47:50 UTC (rev 392)
+++ wasko/trunk/waskaweb/lib/helpers.py 2009-03-18 10:08:03 UTC (rev 393)
@@ -140,6 +140,12 @@
def dd_mm_YYYY(d, empty = ''):
''' datetime.strftime() dislikes years before 1900. '''
if d is None: return empty
+ if type(d) == str:
+ try:
+ y,m,d = d.split('-')
+ d = datetime(y,m,d)
+ except:
+ return empty
return "%02d.%02d.%d" % (d.day, d.month, d.year)
def HH_MM(d):
Modified: wasko/trunk/waskaweb/templates/caselifetime/overview.mako
===================================================================
--- wasko/trunk/waskaweb/templates/caselifetime/overview.mako 2009-03-18 09:47:50 UTC (rev 392)
+++ wasko/trunk/waskaweb/templates/caselifetime/overview.mako 2009-03-18 10:08:03 UTC (rev 393)
@@ -81,7 +81,7 @@
% else:
<div class="waska_form_element w50">
<label for="cm_datum_verlaengerung_1"><a name="cm_datum_verlaengerung_1">Datum erste Verlängerung bis</a> </label><br>
- <input type="text" id="cm_datum_verlaengerung_1" name="cm_datum_verlaengerung_1" value="${c.casedata.getData('cm_datum_verlaengerung_1')| F.NA}" disabled>
+ <input type="text" id="cm_datum_verlaengerung_1" name="cm_datum_verlaengerung_1" value="${h.dd_mm_YYYY(c.casedata.getData('cm_datum_verlaengerung_1'))| F.NA}" disabled>
</div>
<div class="waska_form_element w50">
% if c.casedata.getData('cm_bestaet_verlaengerung_1'):
@@ -228,11 +228,11 @@
</div>
<div class="waska_form_element w50">
<label for="cm_wiederauf_genehm_datum_1"><a name="cm_wiederauf_genehm_datum_1">Wiederaufnahme genehmigt am:</a> </label><br>
- <input type="text" class="field" name="cm_wiederauf_genehm_datum_1" id="cm_wiederauf_genehm_datum_1" value="${c.casedata.getData('cm_wiederauf_genehm_datum_1') | F.NA}" onchange="setModification();" disabled>
+ <input type="text" class="field" name="cm_wiederauf_genehm_datum_1" id="cm_wiederauf_genehm_datum_1" value="${h.dd_mm_YYYY(c.casedata.getData('cm_wiederauf_genehm_datum_1')) | F.NA}" onchange="setModification();" disabled>
</div>
<div class="waska_form_element w50">
<label for="cm_wiederauf_datum_bis_1"><a name="cm_wiederauf_datum_bis_1">Wiederaufnahme genehmigt bis:</a></label><br>
- <input type="text" class="field" name="cm_wiederauf_datum_bis_1" id="cm_wiederauf_datum_bis_1" value="${c.casedata.getData('cm_wiederauf_datum_bis_1') | F.NA}" onchange="setModification();" disabled>
+ <input type="text" class="field" name="cm_wiederauf_datum_bis_1" id="cm_wiederauf_datum_bis_1" value="${h.dd_mm_YYYY(c.casedata.getData('cm_wiederauf_datum_bis_1')) | F.NA}" onchange="setModification();" disabled>
</div>
<div class="waska_form_element w100">
<label for="anmerkungen"><a name="anmerkungen">Anmerkungen:</a> </label><br>
More information about the Mpuls-commits
mailing list