[Mpuls-commits] r6127 - in wasko/trunk: . waskoweb/controllers waskoweb/templates/settings

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 16 16:56:57 CEST 2012


Author: roland
Date: 2012-10-16 16:56:57 +0200 (Tue, 16 Oct 2012)
New Revision: 6127

Added:
   wasko/trunk/wasko.json
Modified:
   wasko/trunk/waskoweb/controllers/mpuls.py
   wasko/trunk/waskoweb/controllers/settings.py
   wasko/trunk/waskoweb/templates/settings/edit.mako
   wasko/trunk/waskoweb/templates/settings/show.mako
Log:
Activate the case key (Fallschluessel) functionality

Copied: wasko/trunk/wasko.json (from rev 6066, wasko/trunk/wasko.json)
===================================================================
--- wasko/trunk/wasko.json	                        (rev 0)
+++ wasko/trunk/wasko.json	2012-10-16 14:56:57 UTC (rev 6127)
@@ -0,0 +1,275 @@
+{
+	"module": {
+		"casemanagement": "1",
+		"appointments": "1",
+		"evaluation": "1",
+		"documents": "1",
+		"news": "1"
+	},
+	"case-module": {
+		"import": "1",
+		"reminders": "1",
+		"appointments": "1",
+		"exportXLS": "1",
+		"exportCSV": "1",
+		"casebundle": "1",
+		"logbook": "1",
+		"tags": "1",
+		"checktags": "1"
+	},
+	"phases": {
+		"phases": ["-1","0","1","2"],
+		"changemode" : "1",
+		"description": [{
+			"-1": "Unbekannt",
+			"0": "Eingangs­dokumentation",
+			"1": "Case Management",
+			"2": "Nach­betreuung"
+		}],
+		"shortdescription": [{
+			"-1": "U",
+			"0": "EA",
+			"1": "CM",
+			"2": "NB"
+		}],
+		"notanonymizable": ["-1", "0", "1"],
+		"minimal_consistence_conditon": "$cm_end_art 3 ==",
+		"minimal_fields_to_anonymize": ["erstgespraech", "datum_cm_start", "datum_cm_ende", "cm_end_art", "nbetr_start", "nbetr_ende"],
+		"pairs": [{
+			"-1": ["-1","-1"],
+			"0": ["0","1"],
+			"1": ["2","3"],
+			"2": ["4","5"]
+		}],
+		"casetype": [{
+			"-1": "In der Klärung",
+			"0": "In der Klärung",
+			"1": "In der Klärung",
+			"2": "Case Management",
+			"3": "Case Management",
+			"4": "Case Management",
+			"5": "Case Management"
+		}],
+		"active": ["-1", "0", "1", "2"],
+		"finished": ["3", "4", "5"],
+		"successors": [{
+			"-1": ["0"],
+			"0": ["1"],
+			"1": ["2"],
+			"2": []
+		}]
+	},
+	"search": {
+		"default-start-date": "2010-09-01",
+		"default-end-date": "2011-08-31",
+		"default-sorting": "name", 
+		"admin_defaults": [
+            		{"search_str": "", 
+			 "state": [3, 4], 
+			 "editor": -1,
+			 "phase": [-1, 0, 1, 2, 3],
+			 "type_ending": [-3, -1, 1, 2, 3, 4]}
+		],
+		"cm_defaults": [
+            		{"own": 1,
+			 "search_str": "", 
+			 "editor": -1,
+			 "state": [1], 
+			 "phase": [-1, 0, 1, 2, 3],
+			 "type_ending": [-3, -1, 1, 2, 3, 4]}
+		]
+	},
+	"logbook": {
+		"categories": [
+			{
+				"name": "unmittelbare Arbeit mit dem Jugendlichen",
+				"items": ["1", "2", "3", "4", "5"]
+			},
+			{
+				"name": "Arbeit mit Eltern/Personensorgeberechtigte",
+			 	"items": ["6", "7", "8"]
+			},
+			{
+				"name": "Arbeit mit Dritten",
+			 	"items": ["9", "10", "18", "11", "12", "13", "14"]
+			},
+			{
+				"name": "Sonstiges",
+			 	"items": ["15", "16", "17", "-2", "-1"]
+			}
+		],
+		"descriptions": [
+			{
+				"1": "Gespräch mit dem/der Jugendlichen",
+    				"2": "Kompetenzfeststellung",
+    				"3": "Korrespondenz mit dem/der Jugendlichen (Telefonate/Schriftverkehr)",
+    				"4": "Begleitung des/der Jugendlichen zu externen Stellen",
+    				"5": "Sonstige Betreuung des Jugendlichen",
+				
+    				"6": "Gespräch mit Eltern/Personensorgeberechtigten",
+    				"7": "Korrespondenz mit Eltern/Personensorgeberechtigten (Telefonat/Schriftverkehr)",
+    				"8": "Sonstige Maßnahmen der Elternarbeit",
+
+    				"9": "Gespräch mit schulischen Mitarbeiter/-innen",
+    				"10": "Korrespondenz mit Schule (Telefonat/Schriftverkehr)",
+    				"18": "Gespräch mit Mitarbeiter/-innen der Jugendhilfe",
+    				"11": "Korrespondenz mit Jugendhilfe (Telefonat/Schriftverkehr)",
+    				"12": "Gespräch mit beteiligten Dritten/Kooperationspartnern",
+    				"13": "Korrespondenz mit beteiligten Dritten/Kooperationspartnern (Telefonat/Schriftverkehr)",
+    				"14": "Förder- bzw. Fallkonferenz",
+
+    				"15": "Fahrtwege",
+    				"16": "Dokumentation WASKO",
+    				"17": "Teambesprechung",
+    				"-2": "sonstige Angaben",
+    				"-1": "Keine Angabe"
+
+			}
+		],
+		"types": [{
+			"db_field": "art",
+			"label": "Art des Eintrags",
+			"options": [
+				{
+					"label": "unmittelbare Arbeit mit dem jungen Menschen",
+					"options": [
+						["1", "Gespräch mit dem/der Jugendlichen"],
+						["2", "Kompetenzfeststellung"],
+						["3", "Korrespondenz mit dem/der Jugendlichen (Telefonate/Schriftverkehr)"],
+						["4", "Begleitung des/der Jugendlichen zu externen Stellen"],
+						["5", "Sonstige Betreuung des Jugendlichen"]
+					]
+				},
+				{
+					"label": "Arbeit mit Eltern/Personensorgeberechtigten",
+					"options": [
+						["6", "Gespräch mit Eltern/Personensorgeberechtigten"],
+						["7", "Korrespondenz mit Eltern/Personensorgeberechtigten (Telefonat/Schriftverkehr)"],
+						["8", "Sonstige Maßnahmen der Elternarbeit"]
+					]
+				},
+				{
+					"label": "Arbeit mit Dritten",
+					"options": [
+						["9", "Gespräch mit schulischen Mitarbeiter/-innen"],
+						["10", "Korrespondenz mit Schule (Telefonat/Schriftverkehr)"],
+						["18", "Gespräch mit Mitarbeiter/-innen der Jugendhilfe"],
+						["11", "Korrespondenz mit Jugendhilfe (Telefonat/Schriftverkehr)"],
+						["12", "Gespräch mit beteiligten Dritten/Kooperationspartnern"],
+						["13", "Korrespondenz mit beteiligten Dritten/Kooperationspartnern (Telefonat/Schriftverkehr)"],
+						["14", "Förder bzw. Fallkonferenz"]
+					]
+				},
+				{
+					"label": "Sonstiges",
+					"options": [
+						["15", "Fahrtwege"],
+						["16", "Dokumentation WASKO"],
+						["17", "Teambesprechung"],
+						["-2", "sonstige Angaben"],
+						["-1", "Keine Angabe"]
+					]
+				}
+			]
+			}]
+
+	},
+	"case": {
+     		"fields": [
+		{"name":"fn", "digest":true,
+          	"search_retrieve":true, "search_match":true,
+          	"preload":true, "session":true, "alias": "fn",
+		"overview":true, "overview_label": "Fallnr.", "info":true,
+		"info_label":"Fallnummer"},
+         	{"name":"name", "digest":true,
+          	"search_retrieve":true, "search_match":true,
+          	"preload":true, "session":true, "alias":"last_name",
+		"overview":true, "overview_label": "Name", "info":true,
+		"info_label":"Name"},
+         	{"name":"vorname", "digest":true,
+         	 "search_retrieve":true, "search_match":true,
+         	 "preload":true, "session":true, "alias":"first_name",
+		 "overview":true, "overview_label": "Vorname", "info":true,
+		 "info_label":"Vorname"},
+		{"name":"geburtsdatum", "digest":true},
+         	{"name":"addresse_strasse_1", "digest":true,
+         	 "session":true, "alias":"street", "alias_force_string":true},
+         	{"name":"addresse_strassenr_1", "digest":true,
+         	 "session":true, "alias":"streetnr", "alias_force_string":true},
+         	{"name":"addresse_plz_1", "digest":true,
+         	 "session":true, "alias":"plz", "alias_force_string":true},
+         	{"name":"addresse_ort_1", "digest":true,
+         	 "session":true, "alias":"city", "alias_force_string":true},
+		{"name":"addresse1_vorwahl_1", "digest":true},
+		{"name":"addresse1_telefonnummer_1", "digest":true},
+		{"name":"addresse2_vorwahl_1", "digest":true},
+		{"name":"addresse2_telefonnummer_2", "digest":true},
+		{"name":"addresse_weiteretelefonnummern_1", "digest":true},
+		{"name":"addresse_email_1", "digest":true},
+		{"name":"mutter_n", "digest":true},
+		{"name":"mutter_vn", "digest":true},
+		{"name":"mutter_vorwahl1_1", "digest":true},
+		{"name":"mutter_telefonnummer1_1", "digest":true},
+		{"name":"mutter_vorwahl2_1", "digest":true},
+		{"name":"mutter_telefonnummer2_1", "digest":true},
+		{"name":"mutter_email_1", "digest":true},
+		{"name":"vater_n", "digest":true},
+		{"name":"vater_vn", "digest":true},
+		{"name":"vater_vorwahl1_1", "digest":true},
+		{"name":"vater_telefonnummer1_1", "digest":true},
+		{"name":"vater_vorwahl2_1", "digest":true},
+		{"name":"vater_telefonnummer2_1", "digest":true},
+		{"name":"vater_email_1", "digest":true},
+		{"name":"cm_end_art", "digest":true},
+		{"name":"cm_end_verm", "digest":true},
+		{"name":"erstgespraech", "session":true,
+         	 "alias":"first_meeting", "alias_force_string":false},
+         	{"name":"bearbeiter_id", "search_retrieve":true,
+         	 "preload":true, "alias":"editor", "alias_force_string":true}
+     		],
+		"remindermindays": "7",
+		"remindermaxdays": "180"
+ 	},
+	"evaluations": {
+		"adele-phases": ["1"],
+		"default-phases": ["1"],
+		"enabled": [
+			{"name": "Verwendungsnachweis", "id": "0", "config": "eval_adele.xml"},
+			{"name": "Gesamtzahlen", "id": "2", "config": "eval_zusammenfassung.xml"},
+			{"name": "Aktive Fälle", "id": "3", "config": "eval_aktiv.xml"},
+			{"name": "Weitere Kriterien", "id": "4", "config": "eval_weitere.xml"},
+			{"name": "Verlauf", "id": "5", "config": "eval_verlauf.xml"},
+			{"name": "Tagebuch", "id": "6", "config": "eval_tagebuch.xml"},
+			{"name": "Fallaktenanalyse", "id": "7", "config": "eval_analyse.xml"}	
+		]
+	},
+	"validities": {
+		"enabled": [
+			{
+			 "name": "Nicht auswertbar",
+			 "id": "0",
+			 "tags": [],
+			 "icon": "validity-0-22.png"
+			 },
+			{
+			 "name": "Grundsätzlich auswertbar",
+			 "id": "1",
+			 "tags": [1],
+			 "icon": "validity-1-22.png"
+			},
+			{
+			 "name": "Berichtsfähig",
+			 "id": "2",
+			 "tags": [1,2],
+			 "icon": "validity-2-22.png"
+			}
+		]
+	},
+    "job_percentage":{
+        "enabled": "1",
+        "threshold_lower": "0.1",
+        "threshold_higher": "0.3",
+        "from_email": "roland at intevation.de",
+        "to_email" : "roland.geider at intevation.de"
+    }
+}

Modified: wasko/trunk/waskoweb/controllers/mpuls.py
===================================================================
--- wasko/trunk/waskoweb/controllers/mpuls.py	2012-10-16 14:53:30 UTC (rev 6126)
+++ wasko/trunk/waskoweb/controllers/mpuls.py	2012-10-16 14:56:57 UTC (rev 6127)
@@ -33,7 +33,8 @@
 from pylons import tmpl_context as c, app_globals as g
 
 from mpulsweb.model.appointment import MaxSaveTimeReminderOverview, \
-                CaseReminderOverview, CaseAppointmentOverview
+                CaseReminderOverview, CaseAppointmentOverview, \
+                JobPercentageReminderOverview
 from mpulsweb.lib.base import BaseController, render, session
 from mpulsweb.controllers.mpuls import MpulsController
 import mpulsweb.lib.helpers as h
@@ -55,6 +56,9 @@
         if h.hasRole(['cm']):
             remindlist.join(CaseReminderOverview())
 
+        if g.mpuls_config.is_enabled('job_percentage', 'enabled'):
+            remindlist.join(JobPercentageReminderOverview())
+
         remindlist.sort()
         
         return remindlist

Modified: wasko/trunk/waskoweb/controllers/settings.py
===================================================================
--- wasko/trunk/waskoweb/controllers/settings.py	2012-10-16 14:53:30 UTC (rev 6126)
+++ wasko/trunk/waskoweb/controllers/settings.py	2012-10-16 14:56:57 UTC (rev 6127)
@@ -1,6 +1,8 @@
 # -*- coding: utf-8 -*-
 import logging
 
+from pylons import tmpl_context as c, app_globals as g
+
 from waskoweb.model.agencysettings import Agency
 
 from mpulsweb.controllers.settings import SettingsController
@@ -16,3 +18,10 @@
 
     def _get_agency(self):
         return Agency()
+
+    def pre_save_hook(self, form_data):
+        
+        # If the job_percentage is enabled, send an email each time the value
+        # is saved and changed
+        if g.mpuls_config.is_enabled('job_percentage', 'enabled'):
+            self.send_job_percentage_email(form_data)
\ No newline at end of file

Modified: wasko/trunk/waskoweb/templates/settings/edit.mako
===================================================================
--- wasko/trunk/waskoweb/templates/settings/edit.mako	2012-10-16 14:53:30 UTC (rev 6126)
+++ wasko/trunk/waskoweb/templates/settings/edit.mako	2012-10-16 14:56:57 UTC (rev 6127)
@@ -91,6 +91,23 @@
           </p>
         </div>
       </fieldset>
+
+      % if g.mpuls_config.is_enabled('job_percentage', 'enabled'):
+      <fieldset>
+        <legend>${_('Edit job percentage')}</legend>
+        <div class="waska_form_element">
+          <label for="meta_user_name">
+            ${_('Job percentage')}
+          </label>
+          <input type="text" id="job_percentage" name="job_percentage" value="" maxlength="120"/>
+          <p class="info">
+            ${_('On changes to this value an email is sent to the Servicestelle Jugendsozialarbeit')}
+          </p>
+        </div>
+      </fieldset>
+      % endif
+
+
       % if g.mpuls_config.is_enabled('case-module', 'meta-server'):
       <fieldset>
         <legend>${_('Edit meta user settings')}</legend>

Modified: wasko/trunk/waskoweb/templates/settings/show.mako
===================================================================
--- wasko/trunk/waskoweb/templates/settings/show.mako	2012-10-16 14:53:30 UTC (rev 6126)
+++ wasko/trunk/waskoweb/templates/settings/show.mako	2012-10-16 14:56:57 UTC (rev 6127)
@@ -70,8 +70,18 @@
       % endif
     </td>
   </tr>
+  % if g.mpuls_config.is_enabled('job_percentage', 'enabled'):
+  <tr>
+    <td class="label table_header table_width_name">
+      ${_('Job percentage')}
+    </td>
+    <td class="table_row_v2">${c.agency.getJobPercentage()}
+    </td>
+  </tr>
+  % endif
 </table>
 
+
 % if g.mpuls_config.is_enabled('case-module', 'meta-server'):
 <p>${_('Here you can see meta user settings')}</p>
 <table>



More information about the Mpuls-commits mailing list