[Mpuls-commits] r44 - in trunk: . waskaweb/controllers waskaweb/i18n/de/LC_MESSAGES waskaweb/model waskaweb/templates waskaweb/templates/administration waskaweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 13 15:12:09 CEST 2008


Author: thomas
Date: 2008-08-13 15:12:08 +0200 (Wed, 13 Aug 2008)
New Revision: 44

Modified:
   trunk/ChangeLog.txt
   trunk/waskaweb/controllers/case_overview.py
   trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
   trunk/waskaweb/model/case.py
   trunk/waskaweb/model/statement.py
   trunk/waskaweb/templates/administration/edit_user.mako
   trunk/waskaweb/templates/administration/overview_user.mako
   trunk/waskaweb/templates/casemanagement/main.mako
   trunk/waskaweb/templates/main.mako
Log:
Load 3b00ff488623 into trunk.


Modified: trunk/ChangeLog.txt
===================================================================
--- trunk/ChangeLog.txt	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/ChangeLog.txt	2008-08-13 13:12:08 UTC (rev 44)
@@ -1,3 +1,32 @@
+2008-03-17 Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/model/case.py: Small fix for casesearch. Display cases if
+	  kundennummer and name and vorname are null (in case of anonymized
+	  cases e.g). Before the case was listed if one of the above fields was
+	  None.
+
+	* waskaweb/templates/casemanagement/main.mako,
+	  waskaweb/templates/main.mako: Privacy field is only displayed for cm
+	  users.
+
+	* waskaweb/controllers/case_overview.py: Fixed filtering for delete
+	  bundle actions. Only cases wich are anonymized or marked for
+	  deletion can be deleted.
+
+	* waskaweb/model/statement.py: Removed None-Values in
+	  Privacy-statement.
+
+	* waskaweb/templates/administration/overview_user.mako: Fixed syntax
+	  error on image title. titel > title
+
+	* waskaweb/templates/administration/edit_user.mako: Fixed missing
+	closing of a fieldset.
+
+2008-03-17  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/templates/administration/overview_user.mako: Fixed HTML
+	  titel -> title.
+
 2008-03-13 Torsten Irlaender  <torsten.irlaender at intevation.de>
 
 	* Changes.txt: Added new features and improvements of the upcoming

Modified: trunk/waskaweb/controllers/case_overview.py
===================================================================
--- trunk/waskaweb/controllers/case_overview.py	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/controllers/case_overview.py	2008-08-13 13:12:08 UTC (rev 44)
@@ -150,7 +150,7 @@
             c.user_list = list.getUserList(filter)
             if action == 'delete':
                 # Filter out cases which aren't marked for deletion (3), or are anonymized (5)
-                case_bundle = self._filterBundle(case_bundle, (1,2))
+                case_bundle = self._filterBundle(case_bundle, (3,5))
                 if case_bundle.isEmpty(): return self._emptyListError()
                 session['casebundle'] = case_bundle
                 session.save()

Modified: trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
===================================================================
--- trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po	2008-08-13 13:12:08 UTC (rev 44)
@@ -328,7 +328,7 @@
 
 #: waskaweb/templates/main.mako:175
 msgid "footer_version"
-msgstr "09.03.2008 | Beta 25"
+msgstr "14.03.2008 | Beta 26"
 
 #: waskaweb/templates/main_login.mako:38
 #: waskaweb/templates/start/responsible.mako:71

Modified: trunk/waskaweb/model/case.py
===================================================================
--- trunk/waskaweb/model/case.py	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/model/case.py	2008-08-13 13:12:08 UTC (rev 44)
@@ -43,12 +43,13 @@
     JOIN ka_status_tbl_view st ON
     m.id = st.master_id
     WHERE
-      (m.vorname_1 ~* %%(needle)s
-      OR m.vorname_1 IS NULL
+      ((m.vorname_1 ~* %%(needle)s
       OR m.name_1 ~* %%(needle)s
-      OR m.name_1 IS NULL
-      OR m.kundennummer ~* %%(needle)s
-      OR m.kundennummer IS NULL)
+      OR m.kundennummer ~* %%(needle)s)
+      OR ( m.vorname_1 IS NULL
+      AND m.name_1 IS NULL
+      AND m.kundennummer IS NULL
+      ))
       AND st.status IN (%s)
       AND %s
       AND %s

Modified: trunk/waskaweb/model/statement.py
===================================================================
--- trunk/waskaweb/model/statement.py	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/model/statement.py	2008-08-13 13:12:08 UTC (rev 44)
@@ -8,6 +8,7 @@
 from waskaweb.lib.db import db
 
 from string import Template
+import waskaweb.lib.filters as F
 
 GET_STATEMENT_FLAG_SQL = """SELECT einverstaendniserklaerung from page_einverstaendnis_view WHERE id = %(id)s"""
 SET_STATEMENT_FLAG_SQL = """UPDATE page_einverstaendnis_view SET einverstaendniserklaerung = %(value)s WHERE id = %(id)s"""
@@ -51,12 +52,12 @@
     def _substitute(self, client, agency):
         # Substitution dictionary
         s = {
-                'VORNAME': client.first_name,
-                'NACHNAME': client.last_name,
-                'PLZ': client.plz,
-                'STRASSE': client.street,
-                'ORT': client.city,
-                'KA_NAME': agency.getName() 
+                'VORNAME': F.NA(client.first_name),
+                'NACHNAME': F.NA(client.last_name),
+                'PLZ': F.NA(client.plz),
+                'STRASSE': F.NA(client.street),
+                'ORT': F.NA(client.city),
+                'KA_NAME': F.NA(agency.getName())
             }
         result = self.template.safe_substitute(s)
         return result 

Modified: trunk/waskaweb/templates/administration/edit_user.mako
===================================================================
--- trunk/waskaweb/templates/administration/edit_user.mako	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/templates/administration/edit_user.mako	2008-08-13 13:12:08 UTC (rev 44)
@@ -77,8 +77,8 @@
               <td class="label">Rolle</td>
               <td class="table_row_v_2">${c.uo.getRole()| h}</td>
             </tr>
-            <tr>
           </table>
+        </fieldset>
 	<div class="waska_form_element w100">
         % if c.uo.isActivated():
           <input type="checkbox" checked  name="activated" id="activated">

Modified: trunk/waskaweb/templates/administration/overview_user.mako
===================================================================
--- trunk/waskaweb/templates/administration/overview_user.mako	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/templates/administration/overview_user.mako	2008-08-13 13:12:08 UTC (rev 44)
@@ -14,9 +14,9 @@
   </div>
   <div id="modusfield">
     <div class="actions">
-	<ul>
-		<li><a href="/administration/newUser"> ${_('adm_actions_link_newuser')}</a></li>
-	</ul>
+      <ul>
+        <li><a href="/administration/newUser"> ${_('adm_actions_link_newuser')}</a></li>
+      </ul>
     </div>
   </div>
 </div>
@@ -35,9 +35,9 @@
          <td>${user.last_name| F.NA, h}</td>
          <td>${user.first_name| F.NA, h}</td>
          % if user.getRole() == 'Admin-KA':
-           <td><img src="/images/icons/admin_grey_tag.gif"></td>
+           <td><img src="/images/icons/admin_grey_tag.gif" alt="Administratorin, Administrator" title="Administrator/in"></td>
          % else:
-           <td><img src="/images/icons/cm_grey_tag_width.gif"></td>
+           <td><img src="/images/icons/cm_grey_tag_width.gif" alt="Case-Managerin, Case-Manager" title="Case-Manager/in"></td>
          % endif
          <td>
            <a href="/administration/showUser/${user.id}"><img src="/images/icons/view_red.gif" border="0" alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
@@ -54,7 +54,7 @@
          % if user.getRole() == 'Admin-KA':
            <td class="table_row_h"><img src="/images/icons/admin_grey_tag.gif" alt="Administratorin, Administrator" title="Administrator/in"></td>
          % else:
-           <td class="table_row_h"><img src="/images/icons/cm_grey_tag_width.gif" alt="Case-Managerin, Case-Manager" titel="Case-Manager/in"></td>
+           <td class="table_row_h"><img src="/images/icons/cm_grey_tag_width.gif" alt="Case-Managerin, Case-Manager" title="Case-Manager/in"></td>
          % endif
          <td class="table_row_h">
            <a href="/administration/showUser/${user.id}"><img src="/images/icons/view_red.gif" border="0" alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>

Modified: trunk/waskaweb/templates/casemanagement/main.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/main.mako	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/templates/casemanagement/main.mako	2008-08-13 13:12:08 UTC (rev 44)
@@ -30,10 +30,10 @@
        <div class="actions">
           <div id="marked">
           <ul>
-          % if h.hasRole(['cm_ka']) and session.get('case').hasPrivacyStatement() is None:
+          % if session.get('case').hasPrivacyStatement() is None:
             <li><a href="/statement/printPrivacyStatement/${session.get('case').id}" target="_blank" onclick="return checkModification();"> ${_('cm_main_print_statement')}</a></li>
             <li><a href="/statement/setPrivacyStatement/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_main_set_statement')}</a></li>
-          % else:
+          % elif session.get('case').hasPrivacyStatement():
             <li><a href="/statement/setPrivacyStatement/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_main_revoke_statement')}</a></li>
           % endif
           % if session.get('case').getState().getState() != 5:

Modified: trunk/waskaweb/templates/main.mako
===================================================================
--- trunk/waskaweb/templates/main.mako	2008-08-13 13:11:34 UTC (rev 43)
+++ trunk/waskaweb/templates/main.mako	2008-08-13 13:12:08 UTC (rev 44)
@@ -50,7 +50,9 @@
     <div id="main">
       <div class="left">
         <div class="navigation" id="navigation">
-          ${self.buildPrivacyfield()}
+          % if h.hasRole(['cm_ka']):
+            ${self.buildPrivacyfield()}
+          % endif
           ${next.buildNavigation()}
         </div>
       </div>



More information about the Mpuls-commits mailing list