[Mpuls-commits] r3657 - in base/trunk/mpulsweb: model templates/casemanagement templates/documents templates/logbook

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 15 19:47:57 CEST 2010


Author: torsten
Date: 2010-09-15 19:47:55 +0200 (Wed, 15 Sep 2010)
New Revision: 3657

Modified:
   base/trunk/mpulsweb/model/appointment.py
   base/trunk/mpulsweb/templates/casemanagement/appointmentlist.mako
   base/trunk/mpulsweb/templates/casemanagement/appointments.mako
   base/trunk/mpulsweb/templates/casemanagement/main.mako
   base/trunk/mpulsweb/templates/casemanagement/organisation.mako
   base/trunk/mpulsweb/templates/casemanagement/reminderlist.mako
   base/trunk/mpulsweb/templates/casemanagement/showAppointment.mako
   base/trunk/mpulsweb/templates/documents/case_overview.mako
   base/trunk/mpulsweb/templates/logbook/overview.mako
   base/trunk/mpulsweb/templates/logbook/show.mako
Log:
Issue1123


Modified: base/trunk/mpulsweb/model/appointment.py
===================================================================
--- base/trunk/mpulsweb/model/appointment.py	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/model/appointment.py	2010-09-15 17:47:55 UTC (rev 3657)
@@ -86,16 +86,20 @@
 
 GET_ALLCASES_APPOINTMENTLIST_SQL = """\
 SELECT a.id, a.master_id, a.sdatum, a.edatum, a.name, a.beschreibung, a.art
-FROM ka_fall_termine_tbl_view a JOIN master_tbl_view m ON m.id = a.master_id
+FROM ka_fall_termine_tbl_view a 
+JOIN master_tbl_view m ON m.id = a.master_id 
+JOIN ka_status_tbl_view s ON m.id = s.master_id
 WHERE coalesce(edatum, sdatum)::date+1 >= %(date)s::date
-      AND art = 0 AND m.bearbeiter_id = %(editor)s
+      AND art = 0 AND m.bearbeiter_id = %(editor)s AND s.status = 1
 ORDER BY sdatum
 """
 
 GET_ALLCASES_REMINDERLIST_SQL = """\
 SELECT a.id, a.master_id, a.sdatum, a.edatum, a.name, a.beschreibung, a.art
-FROM ka_fall_termine_tbl_view a JOIN master_tbl_view m ON m.id = a.master_id
-WHERE art = 1 AND m.bearbeiter_id = %(editor)s
+FROM ka_fall_termine_tbl_view a 
+JOIN master_tbl_view m ON m.id = a.master_id
+JOIN ka_status_tbl_view s ON m.id = s.master_id
+WHERE art = 1 AND m.bearbeiter_id = %(editor)s AND s.status = 1
 ORDER BY sdatum
 """
 

Modified: base/trunk/mpulsweb/templates/casemanagement/appointmentlist.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/appointmentlist.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/casemanagement/appointmentlist.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -6,7 +6,7 @@
     <img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" 
          alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}">
   </a>
-  % if h.hasRole(['cm_ka']):
+  % if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
     <a href="${h.url_for(controller='/caseappointment', action='delete', 
                         id=appointment.id, confirmed=0)}">
       <img src="${h.url_for('/images/icons/delete_active_22.png')}"

Modified: base/trunk/mpulsweb/templates/casemanagement/appointments.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/appointments.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/casemanagement/appointments.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -9,7 +9,7 @@
   <div id="content_ueberschrift">
  ${_('app_header_overview')}
   </div>
-% if h.hasRole(['cm_ka']):
+% if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
   <div id="modusfield">
     <div class="actions">
       <ul>

Modified: base/trunk/mpulsweb/templates/casemanagement/main.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/main.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/casemanagement/main.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -147,7 +147,7 @@
                         </a>
                     </li>
                 % endif
-                % if g.mpuls_config.is_enabled('case-module', 'appointments'):
+                % if g.mpuls_config.is_enabled('case-module', 'appointments') and session.get('case').getState().getState() == 1:
                 <li>
                     <a href="${h.url_for(controller='caseappointment',
                                          action='newReminder',

Modified: base/trunk/mpulsweb/templates/casemanagement/organisation.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/organisation.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/casemanagement/organisation.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -27,7 +27,7 @@
     </td>
   </tr>
 </table>
-% if h.hasRole(['admin_ka']):
+% if h.hasRole(['admin_ka']) and session.get('case').getState().getState() == 1:
 <form action="${h.url_for(controller="case", action="setEditorAction")}" method="POST">
 <input type="hidden" name="case_id" value="${session.get('case').id}">
 <select name="editor">
@@ -38,8 +38,9 @@
 <input type="submit" value="${_('cm_form_editor_submit')}">
 </form>
 % endif
+
 <h2>${_('cm_header_standin')}</h2>
-% if (h.hasRole(['admin_ka']) or (c.current_user.id == c.editor.id)):
+% if ((h.hasRole(['admin_ka']) or (c.current_user.id == c.editor.id))) and session.get('case').getState().getState() == 1:
 <form action="${h.url_for(controller="case", action="setStandinAction")}" method="POST">
 <input type="hidden" name="case_id" value="${session.get('case').id}">
 <table>

Modified: base/trunk/mpulsweb/templates/casemanagement/reminderlist.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/reminderlist.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/casemanagement/reminderlist.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -5,7 +5,7 @@
   <img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" 
        alt="${_('cm_overview_a_show')}" 
        title="${_('cm_overview_a_show')}"></a>
-% if h.hasRole(['cm_ka']):
+% if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
   <a href="${h.url_for(controller='/caseappointment', action='delete',
                        id=appointment.id, confirmed=0)}">
     <img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0"

Modified: base/trunk/mpulsweb/templates/casemanagement/showAppointment.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/showAppointment.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/casemanagement/showAppointment.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -12,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
       <ul>
-        % if h.hasRole(['cm_ka']):
+        % if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
         <li>
           <a href="${h.url_for(controller='/caseappointment', action='edit', id=c.appointment.id)}">
             ${_('sm_menu_link_edit_appointment')}

Modified: base/trunk/mpulsweb/templates/documents/case_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/case_overview.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/documents/case_overview.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -18,7 +18,7 @@
   <div id="content_ueberschrift">
     ${_('cm_header_doc_overview')}
   </div>
-  % if h.hasRole(['cm_ka']):
+  % if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
     <div id="modusfield">
       <div class="actions">
 	<ul>
@@ -55,7 +55,7 @@
           target="_blank">
             <img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" 
             alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
-          % if h.hasRole(['cm_ka']):
+          % if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
             <a href="${h.url_for(controller='/casedocument', action='delete', id=f.id, confirmed=0)}">
               <img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" 
               alt="${_('cm_overview_a_delete')}" 

Modified: base/trunk/mpulsweb/templates/logbook/overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/logbook/overview.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/logbook/overview.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -15,7 +15,9 @@
   <div id="modusfield">
     <div class="actions">
       <ul>
-        <li><a href="${h.url_for(controller='/logbook', action='new', id=session.get('case').id)}">Eintrag vornehmen</a></li>
+        % if session.get('case').getState().getState() == 1:
+          <li><a href="${h.url_for(controller='/logbook', action='new', id=session.get('case').id)}">Eintrag vornehmen</a></li>
+        % endif
         <li><a href="${h.url_for(controller='/logbook', action='printout', id=session.get('case').id)}" target="_blank">Druckansicht</a></li>
       </ul>
     </div>
@@ -84,7 +86,7 @@
     <td class="action">
         <a href="${h.url_for(controller='/logbook', action='show', id=entry.id)}">
             <img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="Eintrag ansehen" title="Eintrag ansehen"></a>
-        % if h.hasRole(['cm_ka']) and entry.getKindAsInt() != 0:
+        % if h.hasRole(['cm_ka']) and entry.getKindAsInt() != 0 and session.get('case').getState().getState() == 1:
         <a href="${h.url_for(controller='/logbook', action='delete', id=entry.id, confirmed=0)}">
             <img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" alt="Eintrag löschen" title="Eintrag löschen"></a>
         % endif

Modified: base/trunk/mpulsweb/templates/logbook/show.mako
===================================================================
--- base/trunk/mpulsweb/templates/logbook/show.mako	2010-09-15 17:47:00 UTC (rev 3656)
+++ base/trunk/mpulsweb/templates/logbook/show.mako	2010-09-15 17:47:55 UTC (rev 3657)
@@ -13,7 +13,7 @@
   <div id="modusfield">
     <div class="actions">
       <ul>
-        % if h.hasRole(['cm_ka']) and c.entry.getKindAsInt() != 0:
+        % if h.hasRole(['cm_ka']) and c.entry.getKindAsInt() != 0 and session.get('case').getState().getState() == 1:
         <li>
           <a href="${h.url_for(controller='/logbook', action='edit', id=c.entry.id)}">
             In Bearbeitung nehmen



More information about the Mpuls-commits mailing list