[Mpuls-commits] r662 - in waska/trunk: . waskaweb/controllers waskaweb/lib waskaweb/model waskaweb/templates/casemanagement/evaluation waskaweb/templates/logbook

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 28 15:14:56 CET 2009


Author: torsten
Date: 2009-10-28 15:14:55 +0100 (Wed, 28 Oct 2009)
New Revision: 662

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/controllers/case.py
   waska/trunk/waskaweb/lib/evaluation.py
   waska/trunk/waskaweb/model/logbook.py
   waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_effort.mako
   waska/trunk/waskaweb/templates/logbook/overview.mako
Log:
Adopted logbook categorys


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2009-10-28 11:38:18 UTC (rev 661)
+++ waska/trunk/ChangeLog.txt	2009-10-28 14:14:55 UTC (rev 662)
@@ -2,10 +2,12 @@
 
 	Adopted logbook categorys
 
-	* waskaweb/model/logbook.py,
-	  waskaweb/templates/logbook/edit_body.mako,
-	  waskaweb/templates/logbook/overview.mako: Added new catagorys and
-	  renamed some.
+	* waskaweb/model/logbook.py
+	  waskaweb/controllers/case.py
+	  waskaweb/lib/evaluation.py
+	  waskaweb/templates/logbook/overview.mako
+	  waskaweb/templates/casemanagement/evaluation/evaluation_effort.mako:
+	  Added new catagorys and renamed some.
 
 2009-09-26 	Torsten Irlaender  <torsten.irlaender at intevation.de>
 

Modified: waska/trunk/waskaweb/controllers/case.py
===================================================================
--- waska/trunk/waskaweb/controllers/case.py	2009-10-28 11:38:18 UTC (rev 661)
+++ waska/trunk/waskaweb/controllers/case.py	2009-10-28 14:14:55 UTC (rev 662)
@@ -67,7 +67,7 @@
 from waskaweb.lib.security         import checkRole
 from waskaweb.model.document       import listDocuments
 from waskaweb.model.data           import FilteredNodeComponentProxy
-from waskaweb.model.logbook        import Logbook, LogbookEntry, LogbookEntryChecker
+from waskaweb.model.logbook        import Logbook, LogbookEntry, LogbookEntryChecker, KIND2TEXT, GROUPS, SUMKIND2TEXT, GROUPKIND
 
 from waskaweb.model.phases_factory   import phases_pairs
 from waskaweb.model.phases           import Phase
@@ -717,6 +717,10 @@
         c.logbook = logbook
 
         # Evaluation
+        c.kind2text = KIND2TEXT
+        c.groupkind = GROUPKIND 
+        c.sumkind2text = SUMKIND2TEXT
+        c.groups = GROUPS
         c.eval_effort = logbook.getEvaluation()
         return render('/logbook/overview.mako')
 

Modified: waska/trunk/waskaweb/lib/evaluation.py
===================================================================
--- waska/trunk/waskaweb/lib/evaluation.py	2009-10-28 11:38:18 UTC (rev 661)
+++ waska/trunk/waskaweb/lib/evaluation.py	2009-10-28 14:14:55 UTC (rev 662)
@@ -880,6 +880,12 @@
                    '8': [0,0],
                    '9': [0,0],
                    '10': [0,0],
+                   '11': [0,0],
+                   '12': [0,0],
+                   '13': [0,0],
+                   '14': [0,0],
+                   '15': [0,0],
+                   '16': [0,0],
                    'sum_cat1': [0,0],
                    'sum_cat2': [0,0],
                    'sum_cat3': [0,0],
@@ -915,13 +921,13 @@
                     if type in ['1','2','3','4','9','10']:
                         result['sum_cat1'][0] += num
                         result['sum_cat1'][1] += int(duration)
-                    if type in ['5','6','7','8']:
+                    if type in ['11', '12', '13']:
                         result['sum_cat2'][0] += num
                         result['sum_cat2'][1] += int(duration)
-                    if type in ['-1']:
+                    if type in ['5', '6', '7', '8']:
                         result['sum_cat3'][0] += num
                         result['sum_cat3'][1] += int(duration)
-                    if type in ['-2']:
+                    if type in ['-2', '-1', '14', '15', '16']:
                         result['sum_cat4'][0] += num
                         result['sum_cat4'][1] += int(duration)
 

Modified: waska/trunk/waskaweb/model/logbook.py
===================================================================
--- waska/trunk/waskaweb/model/logbook.py	2009-10-28 11:38:18 UTC (rev 661)
+++ waska/trunk/waskaweb/model/logbook.py	2009-10-28 14:14:55 UTC (rev 662)
@@ -48,6 +48,7 @@
      '7': u'Gespräch/Telefonat mit Dritten',
      '8': u'Förder- und Fallkonferenz',
      '9': u'Erstgespräch',
+    '10': u'Kompetenzfeststellung',
     '11': u'Gespräch mit Eltern/ Personensorgeberechtigten',
     '12': u'Korrespondenz mit Eltern/ Personensorgeberechtigten (Telefonate/ Schriftverkehr)',
     '13': u'Sonstige Maßnahmen der Elternarbeit',
@@ -56,11 +57,21 @@
     '16': u'Teambesprechung'}
 
 # sum_cat1 = 1,2,3,4,9,10, sum_cat2 = 5,6,7,8
+
+GROUPS = ['sum_cat1', 'sum_cat2', 'sum_cat3', 'sum_cat4'] 
+
+GROUPKIND = {
+    'sum_cat1': ['1','2','3','4','9','10'],
+    'sum_cat2': ['11', '12', '13'],
+    'sum_cat3': ['5', '6', '7', '8'],
+    'sum_cat4': ['14', '15', '16', '-2', '-1']
+}
+
 SUMKIND2TEXT = {
     'sum_cat1': u'unmittelbare Arbeit mit dem Jugendlichen',
-    'sum_cat2': u'Arbeit mit Dritten',
-    'sum_cat3': u'Sonstiges',
-    'sum_cat4': u'Keine Angabe',
+    'sum_cat2': u'Arbeit mit Eltern/ Personenberechtigen',
+    'sum_cat3': u'Arbeit mit Dritten',
+    'sum_cat4': u'Sonstige',
     'sum_all': u'Gesamt' }
 
 AVGKIND2TEXT = {

Modified: waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_effort.mako
===================================================================
--- waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_effort.mako	2009-10-28 11:38:18 UTC (rev 661)
+++ waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_effort.mako	2009-10-28 14:14:55 UTC (rev 662)
@@ -5,49 +5,23 @@
     <th class="table_header_h table_width_mid_s num">Anzahl</th>
     <th class="table_header_h table_width_mid_s num">Aufwand (Minuten)</th>
   </tr>
+  % for num, g in enumerate(c.groups):
+    <tr>
+      <td class="table_row_h"><b>${c.sumkind2text[g]}</b></td>
+      <td class="table_row_h num"><b>${c.eval_effort[g][0]}</b></td>
+      <td class="table_row_h num"><b>${c.eval_effort[g][1]}</b></td>
+    </tr>
+    % for num2, e in enumerate(c.groupkind[g]):
+      <tr>
+        <td class=""><span>${c.kind2text[e]}</td>
+        <td class="num">${c.eval_effort[e][0]}</td>
+        <td class="num">${c.eval_effort[e][1]}</td>
+      </tr>
+    % endfor
+  % endfor
   <tr>
-    <td><b>unmittelbare Arbeit mit dem Jugendlichen:</td><td class="num"><b>${c.eval_effort['sum_cat1'][0]}</b></td><td class="num"><b>${c.eval_effort['sum_cat1'][1]}</b></td>
+    <td class="table_row_h"><b>GESAMT</b></td>
+    <td class="table_row_h num"><b>${c.eval_effort['sum_all'][0]}</b></td>
+    <td class="table_row_h num"><b>${c.eval_effort['sum_all'][1]}</b></td>
   </tr>
-  <tr>
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Gespräch mit dem Jugendlichen</td><td class="num">${c.eval_effort['1'][0]}</td><td class="num">${c.eval_effort['1'][1]}</td>
-  </tr>
-  <tr>
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Telefonat mit dem Jugendlichen</td><td class="num">${c.eval_effort['2'][0]}</td><td class="num">${c.eval_effort['2'][1]}</td>
-  </tr>
-  <tr>
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Begleitung des Jugendlichen zu externen Stellen</td><td class="num">${c.eval_effort['3'][0]}</td><td class="num">${c.eval_effort['3'][1]}</td>
-  </tr>
-  <tr>
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Betreuung des Jugendlichen</td><td class="num">${c.eval_effort['4'][0]}</td><td class="num">${c.eval_effort['4'][1]}</td>
-  </tr>
-  <tr>
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Erstgespräch</td><td class="num">${c.eval_effort['9'][0]}</td><td class="num">${c.eval_effort['9'][1]}</td>
-  </tr>
-  <tr>
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Kompetenzfeststellung</td><td class="num">${c.eval_effort['10'][0]}</td><td class="num">${c.eval_effort['10'][1]}</td>
-  </tr>
-  <tr class="table_row_v_12">
-    <td><b>Arbeit mit Dritten:</b></td><td class="num"><b>${c.eval_effort['sum_cat2'][0]}</td><td class="num"><b>${c.eval_effort['sum_cat2'][1]}</b></td>
-  </tr>
-  <tr class="table_row_v_12">
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Schriftverkehr</td><td class="num">${c.eval_effort['5'][0]}</td><td class="num">${c.eval_effort['5'][1]}</td>
-  </tr>
-  <tr class="table_row_v_12">
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Gespräch/Telefonat mit Kooperationspartnern</td><td class="num">${c.eval_effort['6'][0]}</td><td class="num">${c.eval_effort['6'][1]}</td>
-  </tr>
-  <tr class="table_row_v_12">
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Gespräch/Telefonat mit Dritten</td><td class="num">${c.eval_effort['7'][0]}</td><td class="num">${c.eval_effort['7'][1]}</td>
-  </tr>
-  <tr class="table_row_v_12">
-    <td>&nbsp;&nbsp;&nbsp;&nbsp;Fallkonferenz</td><td class="num">${c.eval_effort['8'][0]}</td><td class="num">${c.eval_effort['8'][1]}</td>
-  </tr>
-  <tr>
-    <td><b>Sonstiges</b></td><td class="num">${c.eval_effort['-2'][0]}</td><td class="num">${c.eval_effort['-2'][1]}</td>
-  </tr>
-  <tr class="table_row_v_12">
-    <td><b>Keine Angabe</b></td><td class="num">${c.eval_effort['-1'][0]}</td><td class="num">${c.eval_effort['-1'][1]}</td>
-  </tr>
-  <tr>
-    <td><b>GESAMT</b></td><td class="num"><b>${c.eval_effort['sum_all'][0]}</b></td><td class="num"><b>${c.eval_effort['sum_all'][1]}</b></td>
-  </tr>
 </table>

Modified: waska/trunk/waskaweb/templates/logbook/overview.mako
===================================================================
--- waska/trunk/waskaweb/templates/logbook/overview.mako	2009-10-28 11:38:18 UTC (rev 661)
+++ waska/trunk/waskaweb/templates/logbook/overview.mako	2009-10-28 14:14:55 UTC (rev 662)
@@ -48,7 +48,7 @@
     <td class="date">${entry.getDate() | h} ${entry.getTime()}</td>
     <td class="title">${entry.getEditor() | h}</td>
     <td class="title">${entry.getKind() | h}</td>
-    <td class="title">${entry.getDuration() | h}</td>
+    <td class="title num">${entry.getDuration() | h}</td>
     <td class="action">
         <a href="${h.url_for(controller='/case', action='showLogbookEntry', id=entry.id)}">
             <img src="/images/icons/view_red.gif" border="0" alt="Eintrag ansehen" title="Eintrag ansehen"></a>
@@ -70,5 +70,4 @@
 % endif
 </table>
 <h3>Auswertung</h3>
-...Derzeit in Bearbeitung...
-##<%include file="/casemanagement/evaluation/evaluation_effort.mako"/>
+<%include file="/casemanagement/evaluation/evaluation_effort.mako"/>



More information about the Mpuls-commits mailing list