[Mpuls-commits] r5334 - in base/trunk/mpulsweb/templates: . meta

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 14 19:51:57 CEST 2011


Author: bh
Date: 2011-09-14 19:51:57 +0200 (Wed, 14 Sep 2011)
New Revision: 5334

Added:
   base/trunk/mpulsweb/templates/meta/
   base/trunk/mpulsweb/templates/meta/case.mako
   base/trunk/mpulsweb/templates/meta/disallow.mako
   base/trunk/mpulsweb/templates/meta/index.mako
   base/trunk/mpulsweb/templates/meta/search.mako
   base/trunk/mpulsweb/templates/meta/statement1.mako
   base/trunk/mpulsweb/templates/meta/statement2.mako
   base/trunk/mpulsweb/templates/meta/unlink.mako
Log:
Port templates for the meta-controller from WASKU to mpulsweb. 
The templates were copied from WASKU web rev. 415:9215fe60dbe6.  The
meta-controller itself will be ported later.


Added: base/trunk/mpulsweb/templates/meta/case.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/case.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/case.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,29 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../casemanagement/main.mako" />
+<%!  import mpulsweb.lib.helper.filters as F %>
+<div id="metacase">
+  ${h.literal(c.metacase)}
+</div>
+
+<%def name="buildContentHeader()">
+  <div id="content_ueberschrift">
+   Meta-Akte Ansicht
+  </div>
+  <div id="content_header">
+    ${self.buildModusfield()}
+  </div><br>
+  <br>
+</%def>
+
+<%def name="buildModusfield()">
+  <div id="modusfield">
+    <div class="actions">
+      <ul>
+          <li><a href="${h.url_for(controller='/meta', action='index',
+                                     id=session['case'].id)}" 
+                   onclick="return checkModification();"> ${_('Back to overview')}</a></li>
+      </ul>
+    </div>
+  </div>
+</%def>
+

Added: base/trunk/mpulsweb/templates/meta/disallow.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/disallow.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/disallow.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,18 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../casemanagement/main.mako" />
+<%!  import mpulsweb.lib.helper.filters as F %>
+<h1>${_('Withdraw agreement for synchronisation')}</h1>
+<p>${_('Withdrawing the agreement for synchronisation can be done in different ways:')}</p>
+<div class="widget container">
+<h2>1. ${_('Withdraw locally and delete already uploaded data')}</h2>
+<p>${_('The agreement will be withdrawn and the link to the meta case will be deleted. No further synchronisation is possible, without a new agreement for synchronisation und relinking the case.')}</p>
+<p>${h.literal(_('Already <strong>transfered data from this case will be deleted in the meta case</strong>, and will not be available for other people anymore.'))}</p>
+<p><a href="${h.url_for(controller='/meta', action='withdraw_delete_projectdata', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Withdraw locally and delete')}</a></p>
+</div>
+<br>
+<div class="widget container">
+<h2>2. ${_('Withdraw globally and delete meta case')}</h2>
+<p>${_('The agreement will be withdrawn globally.')}</p>
+<p>${h.literal(_('<strong>This leads to deletion of the whole meta case which means that the meta case is not available in other project cases anymore!</strong>'))}</p>
+<p><a href="${h.url_for(controller='/meta', action='withdraw_delete_metacase', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Withdraw globally and delete meta case')}</a></p>
+</div>

Added: base/trunk/mpulsweb/templates/meta/index.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/index.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/index.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,123 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../casemanagement/main.mako" />
+<%!  import mpulsweb.lib.helper.filters as F %>
+<h1>${_('Meta case')}</h1>
+<p>${_('The meta case is a comprehensive case wich provides information about the client and his supervision in different projects over a longer period of time.')}</p>
+<br>
+<div class="widget container">
+<h2>${_('Agreement for synchronisation')}</h2>
+<p>${h.literal(_('The agreement of the client to transfer data from and to the meta case is the elementary precondition! It requires a documented <strong>acceptance statement and discretion statement</strong> from the client in a printable form. Please remember to hand out the digest of saved data in the meta-case to the client after linking the case with the meta case.'))}</p>
+% if c.meta.is_sync_allowed():
+  <p>
+    <strong>${_('State')}:</strong>
+    <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+    ${_('Sychronisation is allowed')}
+  </p>
+  <br>
+  <p>
+    <a href="${h.url_for(controller='/meta', action='disallow_sync', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Disallow transfer')}</a>
+    % if c.agency.is_metauser_configured() and c.meta.is_sync_allowed() and c.meta.is_linked():
+      <a href="${h.url_for(controller='/meta', action='digest', id=session.get('case').id)}" class="button">${_('Show digest of meta')}</a>
+    % endif
+  </p>
+% elif not session.get('meta_acceptance_statement') or  not session.get('meta_discretion_statement'):
+  <p>
+    <strong>${_('State')}:</strong>
+    <img width="22" height="22" alt="Error" src="${h.url_for('/images/icons/info/failure_22.png')}">
+    ${_('Not all required statements to allow sync has be set')}
+  </p>
+% endif
+##% else:
+##  <p>
+##    <strong>${_('State')}:</strong>
+##    <img width="22" height="22" alt="Error" src="${h.url_for('/images/icons/info/failure_22.png')}">
+##    ${_('Sychronisation is not allowed')}
+##  </p>
+##  <br>
+##  <p>
+##    <a href="${h.url_for(controller='/meta', action='allow_sync', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Allow transfer')}</a>
+##  </p>
+##% endif
+  <table>
+    <tr>
+      <td>
+        <h3>${_('Acceptance statement')}</h3>
+        <p>
+          ${h.literal(_('This must be translated with the deatailed description for the acceptance statement.'))}
+        </p>
+        <p>
+          % if not session.get('meta_acceptance_statement') and not c.meta.is_sync_allowed():
+            <a href="${h.url_for(controller='/meta', action='print_statement1', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button" target="_blank">${_('Print accpetance statement')}</a>
+            <br>
+            <br>
+            <a href="${h.url_for(controller='/meta', action='set_statement1', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Set acceptance statement')}</a>
+          % else:
+            <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+            ${_('Discretion statement is set')}
+          %endif
+        </p>
+      </td>
+      <td>
+        <h3>${_('Discretion statement')}</h3>
+        <p>
+          ${h.literal(_('This must be translated with the deatailed description for the discretion statement.'))}
+        </p>
+        <p>
+          % if not session.get('meta_discretion_statement') and not c.meta.is_sync_allowed():
+            <a href="${h.url_for(controller='/meta', action='print_statement2', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button" target="_blank">${_('Print discretion statement')}</a>
+            <br>
+            <br>
+            <a href="${h.url_for(controller='/meta', action='set_statement2', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Set discretion statement')}</a>
+          % else:
+            <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+            ${_('Discretion statement is set')}
+          %endif
+        </p>
+      </td>
+    </tr>
+  </table>
+</div>
+<br>
+<div class="widget container">
+<h2>${_('Transfer')}</h2>
+<p>${h.literal(_('Transfer of data can be done in two directions.<ol><li>You can download data from the meta case to display it. Downloading data will not effect any data stored in the local case.</li><li>To update the meta case with data from the local case you can upload.</li></ol>The updated data will be stored permanently in the meta case and will be available for other agencys who also have access to the meta case.'))}</p>
+% if c.agency.is_metauser_configured():
+  % if c.meta.is_sync_allowed():
+    % if c.meta.is_linked():
+      <p>
+        <strong>${_('State')}:</strong>
+        <img width="22" height="22" alt="Ok" src="${h.url_for('/images/icons/info/ok_22.png')}">
+        ${_('Case is linked')}
+      </p>
+      <br>
+      <p>
+        <a href="${h.url_for(controller='/meta', action='download', id=session.get('case').id)}" class="button">${_('Download meta')}</a>
+        <a href="${h.url_for(controller='/meta', action='upload', id=session.get('case').id)}" class="button">${_('Upload case')}</a>
+        <a href="${h.url_for(controller='/meta', action='unlink', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink case')}</a>
+      </p>
+    % else:
+      <p>
+        <strong>${_('State')}:</strong>
+        <img width="22" height="22" alt="${_('Error')}" src="${h.url_for('/images/icons/info/failure_22.png')}">
+        ${_('Case is not linked')}
+      </p>
+      <br>
+      <p>
+          <a href="${h.url_for(controller='/meta', action='search', id=session.get('case').id)}" onclick="return checkModification();" class="button">${_('Link case')}</a>
+      </p>
+    % endif
+  %else:
+    <p>
+      <strong>${_('State')}:</strong>
+      <img width="22" height="22" alt="${_('Error')}" src="${h.url_for('/images/icons/info/failure_22.png')}">
+      ${_('Sychronisation is not allowed. Please set permission for synchronisation before linking')}
+    </p>
+  %endif
+%else:
+  <p>
+    <strong>${_('State')}:</strong>
+    <img width="22" height="22" alt="${_('Error')}" src="${h.url_for('/images/icons/info/failure_22.png')}">
+    ${_('Meta user is not configured properly. Please consult the administration to do so.')}
+  </p>
+%endif
+</div>

Added: base/trunk/mpulsweb/templates/meta/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/search.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/search.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,91 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../casemanagement/main.mako" />
+<%!  import mpulsweb.lib.helper.filters as F %>
+<h1>${_('Meta search')}</h1>
+<form name="metasearch" action="${h.url_for(controller='meta', action='searchAction')}" method="POST">
+  <div class="widget container">
+    <table>
+      <tr>
+        <td class="label">${_('Birthname')}</td>
+        <td><input type="text" size="30" name="birthname" maxlength="256"></td>
+        <td>
+          <form:error name="birthname">
+        </td>
+      </tr>
+      <tr>
+        <td class="label">${_('Firstname')}</td>
+        <td><input type="text" size="30" name="firstname" maxlength="256"></td>
+        <td>
+          <form:error name="firstname">
+        </td>
+      </tr>
+      <tr>
+        <td class="label">${_('Birthdate')}</td>
+        <td><input type="text" size="30" name="birthdate" maxlength="256"></td>
+        <td>
+          <form:error name="birthdate">
+        </td>
+      </tr>
+      <tr>
+        <td class="label">${_('Gender')}</td>
+        <td> 
+          <select name="gender">
+            <option value="-1">${_('Unspecified')}</option>
+            <option value="1">${_('male')}</option>
+            <option value="0">${_('female')}</option>
+          </select>
+        </td>
+        <td>
+          <form:error name="gender">
+        </td>
+      </tr>
+      <tr>
+        <td></td>
+        <td><input type="submit" value="${_('Search')}"/></td>
+        <td></td>
+      </tr>
+    </table>
+  </div>
+</form>
+
+<table id="table_caseoverview" class="hovertable">
+  <tr>
+    <th width="">${_('UUID')}</th>
+    <th class="actions">${_('Actions')}</th>
+  </tr>
+  % for num, m in enumerate(c.result):
+      <tr class="${num % 2 and 'table_row_h' or ''}">
+        <td>${m["uuid"]}</td>
+        <td class="actions">
+          <a href="${h.url_for(controller='meta', action='link', id=m['uuid'], confirmed=0)}">
+            <img src    = "${h.url_for('/images/icons/link_active_22.png')}"
+              border = "0"
+              alt    = "${_('Link')}"
+              title  = "${_('Link')}"
+              width  = "22"
+              height = "22">
+          </a>
+        </td>
+      </tr>
+  % endfor
+  % if len(c.result) <= 0:
+  <tr>
+    <td colspan="2">
+      ${_('No data found.')}
+    </td>
+  </tr>
+  % endif
+</table>
+<br>
+% if c.show_create:
+<div class="widget container">
+<h2>${_('Create new meta case')}</h2>
+<p>${_('If you can find not find a counterpart for this case on the metas erver you can create a new one on the meta server. Please make sure that you tried different spellings of the name of client to maximize the chance of finding a meta case.')}</p>
+% if not c.case.is_hashable():
+  <p><strong>${_('State')}:</strong>${_('Required fields to create a new meta case are not filled out')}</p>
+%else:
+  <br>
+  <p><a href="${h.url_for(controller='meta', action='create', id=c.case.id, confirmed=0)}" class="button">${_('Create meta case')}</a></p>
+%endif
+</div>
+% endif

Added: base/trunk/mpulsweb/templates/meta/statement1.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/statement1.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/statement1.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,91 @@
+## -*- coding: utf-8 -*-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<%!
+   import mpulsweb.lib.helper.filters as F
+%>
+<html>
+<head>
+<title>Einwilligungserklärung</title>
+<meta name="generator" content="Bluefish 1.0.7">
+<meta name="date" content="2010-10-09T14:00:00+0100">
+<meta name="copyright" content="Intevation GmbH">
+<meta name="keywords" content="">
+<meta name="description" content="">
+<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8">
+<meta http-equiv="content-style-type" content="text/css">
+<meta http-equiv="expires" content="0">
+<link rel="shortcut icon" type="image/x-icon" href="${h.url_for('/images/mpuls.ico')}">
+<link href="${h.url_for('/styles/all.css')}" media="all" rel="stylesheet" type="text/css">
+<link href="${h.url_for('/styles/print.css')}" media="screen" rel="stylesheet" type="text/css">
+
+<style type="text/css">
+.statement_content {
+        width: 90%;
+        font-size: 0.90em;
+	margin-bottom: 5em;
+}
+.statement_signs {
+        width: 90%;
+        font-size: 0.90em;
+	margin: 4em 0;
+}
+.statement_highlight {
+        background: #D9D9D9;
+        padding: 0.25em 0;
+        margin: 1em 0;
+}
+.table_a {
+        text-align: left;
+        border: 0;
+}
+.table_b {
+        text-align: left;
+        border: 0;
+        height: 1em;
+        vertical-align: bottom;
+}
+</style>
+<body>
+<h1>Einwilligungserklärung zur Übermittlung personenbezogener Daten an Meta-Fallakte</h1>
+<p>
+Hiermit willige ich darin ein, dass die Einrichtung "${c.agency.getName() | F.NA}" Daten über mich und meinen Betreuungsverlauf an die Meta-Fallakte übermittelt, soweit es nicht Daten Dritter sind.
+</p>
+<p>
+Die Angaben dienen dazu, die mich bereuuenden Einrichtungen bei meiner beruflichen und/oder sozialen
+Eingliederung zu unterstützen. Diese Unterstützungsleistungen werden von mir freiwillig in Anspruch genommen,
+ich kann diese jederzeit beenden. Die Koordinierungsstelle ist in diesem Fall verpflichtet, sämtliche Daten über
+mich - auch die auf Grundlage dieser Einwilligungserklärung - zu anonymisieren. Auch diese Einwilligung zur
+Übermittlung kann ich jederzeit mit Wirkung für die Zukunft widerrufen.
+</p>
+<div class="statement_signs">
+<table cellspacing=5 cellpadding=0 width="100%" border=0>
+  <tbody>
+
+  <tr>
+    <td width="33%"class="table_a">
+    ## Use alias as abstraction for concrete name of db fields.
+    ${c.case.first_name}, ${c.case.last_name}
+    </td>
+    <td widht="33%"style="text-align: center; border:0">
+    </td>
+    <td style="text-align: right; border:0">
+    </td>
+  </tr>
+
+  <tr>
+    <td class="table_a" style="border-top-color:#000; border-width:1px; border-top-style:solid">
+    Vorname, Nachname</td>
+    <td style="text-align: center; border:0; border-top-color:#000; border-width:1px; border-top-style:solid">
+    Datum</td>
+    <td style="text-align: right; border:0; border-top-color:#000; border-width:1px; border-top-style:solid">
+    Unterschrift</td>
+
+  </tr>
+  </tbody>
+</table>
+</div>
+</body>
+</html>
+

Added: base/trunk/mpulsweb/templates/meta/statement2.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/statement2.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/statement2.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,82 @@
+## -*- coding: utf-8 -*-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<%!
+   import mpulsweb.lib.helper.filters as F
+%>
+<html>
+<head>
+<title>Schweigepflichtsentbindung</title>
+<meta name="generator" content="Bluefish 1.0.7">
+<meta name="date" content="2010-10-09T14:00:00+0100">
+<meta name="copyright" content="Intevation GmbH">
+<meta name="keywords" content="">
+<meta name="description" content="">
+<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8">
+<meta http-equiv="content-style-type" content="text/css">
+<meta http-equiv="expires" content="0">
+<link rel="shortcut icon" type="image/x-icon" href="${h.url_for('/images/mpuls.ico')}">
+<link href="${h.url_for('/styles/all.css')}" media="all" rel="stylesheet" type="text/css">
+<link href="${h.url_for('/styles/print.css')}" media="screen" rel="stylesheet" type="text/css">
+
+<style type="text/css">
+.statement_content {
+        width: 90%;
+        font-size: 0.90em;
+	margin-bottom: 5em;
+}
+.statement_signs {
+        width: 90%;
+        font-size: 0.90em;
+	margin: 4em 0;
+}
+.statement_highlight {
+        background: #D9D9D9;
+        padding: 0.25em 0;
+        margin: 1em 0;
+}
+.table_a {
+        text-align: left;
+        border: 0;
+}
+.table_b {
+        text-align: left;
+        border: 0;
+        height: 1em;
+        vertical-align: bottom;
+}
+</style>
+<body>
+<h1>Schweigepflichtsendbindung</h1>
+<p>Folgt.</p>
+<div class="statement_signs">
+<table cellspacing=5 cellpadding=0 width="100%" border=0>
+  <tbody>
+
+  <tr>
+    <td width="33%"class="table_a">
+    ## Use alias as abstraction for concrete name of db fields.
+    ${c.case.first_name}, ${c.case.last_name}
+    </td>
+    <td widht="33%"style="text-align: center; border:0">
+    </td>
+    <td style="text-align: right; border:0">
+    </td>
+  </tr>
+
+  <tr>
+    <td class="table_a" style="border-top-color:#000; border-width:1px; border-top-style:solid">
+    Vorname, Nachname</td>
+    <td style="text-align: center; border:0; border-top-color:#000; border-width:1px; border-top-style:solid">
+    Datum</td>
+    <td style="text-align: right; border:0; border-top-color:#000; border-width:1px; border-top-style:solid">
+    Unterschrift</td>
+
+  </tr>
+  </tbody>
+</table>
+</div>
+</body>
+</html>
+

Added: base/trunk/mpulsweb/templates/meta/unlink.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/unlink.mako	2011-09-14 16:55:47 UTC (rev 5333)
+++ base/trunk/mpulsweb/templates/meta/unlink.mako	2011-09-14 17:51:57 UTC (rev 5334)
@@ -0,0 +1,11 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../casemanagement/main.mako" />
+<%!  import mpulsweb.lib.helper.filters as F %>
+<h1>${_('Unlink case')}</h1>
+<p>${_('Unlinking the case from its meta case can be done in different ways. Depending on the the reason to unlink you can choose from one of the different options:')}</p>
+<br>
+<div class="widget container">
+<h2>1. ${_('Unlink and delete already uploaded data')}</h2>
+<p>${h.literal(_('The link to the meta case will be deleted. No further syncronisation is possible without relinking the case. Already <strong>transfered data from this case will be deleted in the meta case</strong>, and will not be available for other people.'))}</p>
+<p><a href="${h.url_for(controller='/meta', action='unlink_delete_projectdata', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink and delete')}</a></p>
+</div>



More information about the Mpuls-commits mailing list