[Mpuls-commits] r1320 - in wasko/branches/2.0: . mpulsweb/templates mpulsweb/templates/auth

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 8 14:04:47 CET 2010


Author: torsten
Date: 2010-02-08 14:04:46 +0100 (Mon, 08 Feb 2010)
New Revision: 1320

Added:
   wasko/branches/2.0/mpulsweb/templates/base.mako
   wasko/branches/2.0/mpulsweb/templates/main.mako
Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/templates/auth/login.mako
   wasko/branches/2.0/mpulsweb/templates/auth/logout.mako
   wasko/branches/2.0/mpulsweb/templates/auth/main.mako
Log:
* mpulsweb/templates/base.mako: New. Common to all template files.
  Mainly the header definition.
* mpulsweb/templates/main.mako: Copied from waskaweb. 
* mpulsweb/templates/auth/logout.mako,
  mpulsweb/templates/auth/main.mako,
  mpulsweb/templates/auth/login.mako: Copied from waskaweb. Inherit
  from base.mako now.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-08 12:06:10 UTC (rev 1319)
+++ wasko/branches/2.0/ChangeLog	2010-02-08 13:04:46 UTC (rev 1320)
@@ -56,6 +56,14 @@
 	* waskaweb/templates/main.mako: Call get_app_title function to insert
 	  app title for the html page (header/title)
 
+	* mpulsweb/templates/base.mako: New. Common to all template files.
+	  Mainly the header definition.
+	* mpulsweb/templates/main.mako: Copied from waskaweb. 
+	* mpulsweb/templates/auth/logout.mako,
+	  mpulsweb/templates/auth/main.mako,
+	  mpulsweb/templates/auth/login.mako: Copied from waskaweb. Inherit
+	  from base.mako now.
+
 2010-02-05  Bernhard Herzog  <bh at intevation.de>
 
 	* waskaweb/model/case.py (CREATE_CASE_SQL): Removed.  No longer

Modified: wasko/branches/2.0/mpulsweb/templates/auth/login.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/auth/login.mako	2010-02-08 12:06:10 UTC (rev 1319)
+++ wasko/branches/2.0/mpulsweb/templates/auth/login.mako	2010-02-08 13:04:46 UTC (rev 1320)
@@ -1,7 +1,7 @@
 ## -*- coding: utf-8 -*-
 <%! import mpulsweb.lib.helper.filters as F %>
 <%inherit file="main.mako" />
-<h1>${_('login_header_waska_login')}</h1>
+<h1>${_('%s Anmeldung') % h.get_app_title()}</h1>
 <div id="waska_form_login">
 
   % if c.login_failed:

Modified: wasko/branches/2.0/mpulsweb/templates/auth/logout.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/auth/logout.mako	2010-02-08 12:06:10 UTC (rev 1319)
+++ wasko/branches/2.0/mpulsweb/templates/auth/logout.mako	2010-02-08 13:04:46 UTC (rev 1320)
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="main.mako" />
-<h1>${_('logout_header_waska_logout')}</h1>
+<h1>${_('%s Abmeldung') % h.get_app_title()}</h1>
 <div id="waska_form_login">
   <p>
     ${_('logout_p_logout successful')} <a href="/">${_('logout_a_login')}</a>

Modified: wasko/branches/2.0/mpulsweb/templates/auth/main.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/auth/main.mako	2010-02-08 12:06:10 UTC (rev 1319)
+++ wasko/branches/2.0/mpulsweb/templates/auth/main.mako	2010-02-08 13:04:46 UTC (rev 1320)
@@ -1,52 +1,27 @@
 ## -*- coding: utf-8 -*-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title>WASKO</title>
-    <meta name="generator" content="vim">
-    <meta name="author" content="Torsten Irlaender">
-    <meta name="date" content="2007-08-07">
-    <meta name="copyright" content="">
-    <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-style-type" content="text/css">
-    <meta http-equiv="expires" content="0">
-    <link rel="shortcut icon" type="image/x-icon" href="/images/kompetenz3.ico">
-    % if c.print_version:
-    <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">
-    <link href="${h.url_for('/styles/print.css')}" media="print" rel="stylesheet" type="text/css">
-    % else:
-    <link href="${h.url_for('/styles/all.css')}" media="all" rel="stylesheet" type="text/css">
-    <link href="${h.url_for('/styles/screen.css')}" media="screen" rel="stylesheet" type="text/css">
-    <link href="${h.url_for('/styles/print.css')}" media="print" rel="stylesheet" type="text/css">
-    <!--[if gt IE 5]><link href="${h.url_for('/styles/ie6.css')}" media="screen" rel="stylesheet" type="text/css"><![endif]-->
-    % endif
-  </head>
-  <body>
-    <div id="wrapper_login" >
-    <div id="header_login">
-      <div id="logo_login">
-        <img src="${h.url_for('/images/logo_ka_75.png')}" alt="Logo Einrichtung" border="0">
-      </div>
+<%inherit file="../base.mako" />
+<div id="wrapper_login" >
+  <div id="header_login">
+    <div id="logo_login">
+      <img src="${h.url_for('/images/logo_ka_75.png')}" alt="Logo Einrichtung" border="0">
     </div>
-      <div id="content_login">
-        ${self.body()}
-    </div>
-      <div id="footer_login">
-        <p>${_('main_login_bmf_phrase')}</p>
-         <a target="_blank" href="http://www.bmfsfj.de">
-          <img src="/images/BMFSFJ_C_M_web.jpg" alt="Logo Bundesministerium f&#252;r Familie, Senioren, Frauen und Jugend" border="0">
-        </a>
-         <a target="_blank" href="http://ec.europa.eu/employment_social/esf2000/index_de.html">
-          <img src="/images/eu_logo_4c_pos_web2.jpg" alt="Logo Europ&#228;ische Union - Europ&#228;ische Sozialfonds" border="0">
-        </a>
-      </div>
-    </div>	
-  </body>
-</html>
+  </div>
+  <div id="content_login">
+    ${next.body()}
+  </div>
+  <div id="footer_login">
+    <p>${_('main_login_bmf_phrase')}</p>
+     <a target="_blank" href="http://www.bmfsfj.de">
+      <img src="/images/BMFSFJ_C_M_web.jpg" 
+        alt="Logo Bundesministerium f&#252;r Familie, Senioren, Frauen und Jugend" border="0">
+    </a>
+     <a target="_blank" href="http://ec.europa.eu/employment_social/esf2000/index_de.html">
+      <img src="/images/eu_logo_4c_pos_web2.jpg" 
+        alt="Logo Europ&#228;ische Union - Europ&#228;ische Sozialfonds" border="0">
+    </a>
+  </div>
+</div>	
+
 <%def name="buildFormErrors()">
     <%
       # Please fill this dictionary in the templates if you want to substitute

Added: wasko/branches/2.0/mpulsweb/templates/base.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/base.mako	2010-02-08 12:06:10 UTC (rev 1319)
+++ wasko/branches/2.0/mpulsweb/templates/base.mako	2010-02-08 13:04:46 UTC (rev 1320)
@@ -0,0 +1,55 @@
+## -*- coding: utf-8 -*-
+<%def name="buildFormErrors(labels=None)">
+  <% formular_labels = labels or {} %>
+  % if len(c.form_errors) > 0:
+    <div class="form_errors">
+      <h1><a name="error_list">${_('main_formular_input_error')}</a></h1>
+      <ul>
+        % for key, value in c.form_errors.iteritems():
+          <li>${_(formular_labels.get(key, '%s' % key))}: ${value}</li>
+        % endfor
+      </ul>
+    </div>
+  % endif
+</%def>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>TEST: ${h.get_app_title()}</title>
+    <meta name="generator" content="vim">
+    <meta name="author" content="Torsten Irlaender">
+    <meta name="date" content="2007-08-07">
+    <meta name="copyright" content="">
+    <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-style-type" content="text/css">
+    <meta http-equiv="expires" content="0">
+    <link rel="shortcut icon" type="image/x-icon" href="/images/kompetenz3.ico">
+    % if c.print_version:
+      <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">
+      <link href="${h.url_for('/styles/print.css')}" media="print" 
+            rel="stylesheet" type="text/css">
+    % else:
+      <link href="${h.url_for('/styles/all.css')}" media="all" rel="stylesheet"
+            type="text/css">
+      <link href="${h.url_for('/styles/screen.css')}" media="screen" 
+            rel="stylesheet" type="text/css">
+      <link href="${h.url_for('/styles/print.css')}" media="print" 
+            rel="stylesheet" type="text/css">
+      <!--[if gt IE 5]>
+        <link href="${h.url_for('/styles/ie6.css')}" media="screen" 
+              rel="stylesheet" type="text/css">
+      <![endif]-->
+    % endif
+    <script src="/js/check.js" type="text/javascript"></script>
+  </head>
+  <body onload="clearModification();">
+    ${next.body()}
+  </body>
+</html>

Copied: wasko/branches/2.0/mpulsweb/templates/main.mako (from rev 1316, wasko/branches/2.0/waskaweb/templates/main.mako)
===================================================================
--- wasko/branches/2.0/waskaweb/templates/main.mako	2010-02-08 11:47:13 UTC (rev 1316)
+++ wasko/branches/2.0/mpulsweb/templates/main.mako	2010-02-08 13:04:46 UTC (rev 1320)
@@ -0,0 +1,312 @@
+## -*- coding: utf-8 -*-
+<%def name="buildStatusBar()">
+  <div id="statusbar">
+    ${_('statusbar_logininfo')}:
+    % if h.getLogin() != 'adm':
+        <strong>${h.getUserFullname()}</strong> (${h.getRole()})
+    % else:
+        <strong>${h.getUserLastname()}</strong>
+    % endif
+  </div>
+</%def>
+
+<%def name="buildStartMenu()">
+  <div id="startmenu">
+    <ul>
+      <li>
+        <a href="${h.url_for(controller='/waska')}"
+           onclick="return checkModification();">
+          ${_('sm_menu_link_home')}
+        </a>
+      </li>
+      <li>
+        <a href="${h.url_for(controller='/waska', action='help')}"
+           onclick="return checkModification();">
+          ${_('sm_menu_link_help')}
+        </a>
+      </li>
+      <li>
+        <a href="${h.url_for(controller='/usersettings', action='showSettings',
+                             id=h.getUserId())}"
+           onclick="return checkModification();">
+          ${_('sm_menu_link_settings')}
+        </a>
+      </li>
+      <li>
+        <a href="${h.url_for(controller='/waska', action='info')}"
+           onclick="return checkModification();">
+          ${_('sm_menu_link_responsible')}
+        </a>
+      </li>
+      <li>
+        <a href="${h.url_for(controller='/auth', action='logout')}"
+           onclick="return checkModification();">
+          ${_('sm_menu_link_logout')}
+        </a>
+      </li>
+    </ul>
+  </div>
+</%def>
+
+<%def name="buildNavipath()">
+  <li><a href="${h.url_for(controller='/waska')}"
+         onclick="return checkModification();">${_('np_root')}</a></li>
+</%def>
+
+<%def name="buildInfofield()">
+</%def>
+
+<%def name="buildPrivacyfield()">
+</%def>
+
+<%def name="buildIco()">
+  <span class="menuico"> &gt;&gt;</span>
+</%def>
+
+<%def name="buildNavigation()">
+  % if (h.getLogin() != 'adm'):
+    % if h.hasRole(['cm_ka', 'admin_ka']):
+      <div class="menu">
+        <div class="actions">
+          <h1>${_('np_root')}</h1>
+          <ul>
+            <li>
+              <a href="${h.url_for(controller='/waska')}">
+                ${_('sm_menu_link_home')}
+              </a>
+            </li>
+            ## APPOINTMENTS 
+            % if g.mpuls_config.is_enabled('module', 'appointments'):
+              <li>
+                <a href="${h.url_for(controller='/appointment',
+                                     action='overview')}">
+                  ${_('menu_app_link_overview')}
+                </a>
+              </li>
+            % endif
+            ## DOCUMENTS
+            % if g.mpuls_config.is_enabled('module', 'documents'):
+              <li>
+                <a href="${h.url_for(controller='/document', 
+                                     action='globalOverview')}">
+                  ${_('menu_doc_link_overview')}
+                </a>
+              </li>
+            % endif
+          </ul>
+        </div>
+      </div>
+    % endif
+    <div class="menu">
+      <div class="actions">
+        <h1>${_('menu_header_cm')}</h1>
+        <ul>
+          <li>
+            <a href="${h.url_for(controller='/case_overview',
+                                 action='overview', reset=1)}">
+              ${_('menu_cm_link_overview')}
+            </a>
+          </li>
+          % if h.hasRole(['cm_ka']):
+            <li>
+              <a href="${h.url_for(controller='/case', action='new')}">
+                ${_('menu_cm_link_new')}
+              </a> 
+            </li>
+            % if g.mpuls_config.is_enabled('case-module', 'import'):
+              <li>
+                <a href="${h.url_for(controller='/case', action='importCase')}">
+                  ${_('menu_cm_link_import')}
+                </a>
+              </li>
+            % endif
+          % endif
+        </ul>
+      </div>
+    </div>
+    % if g.mpuls_config.is_enabled('module', 'evaluation'):
+      <div class="menu">
+        <div class="actions">
+          <h1>${_('Evaluations')}</h1>
+          ${self.buildEvaluations()}
+        </div>
+      </div>
+    % endif
+    <div class="menu_spacer">
+      <div class="actions">
+      </div>
+    </div>
+  % endif
+  % if h.hasRole(['admin_ka']):
+    <div class="menu">
+      <div class="actions">
+        <h1>${_('menu_header_adm')}</h1>
+        <ul>
+          <li>
+            <a href="${h.url_for(controller='/administration',
+                                 action='overviewUser')}"> 
+              ${_('menu_adm_link_useroverview')}
+            </a>
+          </li>
+          <li>
+            <a href="${h.url_for(controller='/administration',
+                                 action='overviewUserGroups')}">
+              ${_('menu_adm_link_usergroupoverview')}
+            </a>
+          </li>
+          <li>
+            <a href="${h.url_for(controller='/administration', 
+                                 action='showSettings')}">
+              ${_('menu_adm_link_showsettings')}
+            </a>
+          </li>
+        </ul>
+      </div>
+    </div>
+  % endif
+</%def>
+
+<%def name="buildEvaluations()">
+  <ul>
+    % for eval in g.mpuls_config.get('evaluations', 'enabled'): 
+      <li>
+        <a href="/evaluate/evaluate/${eval.get('id')}">${eval.get('name')}</a>
+      </li>
+    % endfor
+  </ul>
+</%def>
+
+<%def name="buildFormErrors(labels=None)">
+  <% formular_labels = labels or {} %>
+  % if len(c.form_errors) > 0:
+    <div class="form_errors">
+      <h1><a name="error_list">${_('main_formular_input_error')}</a></h1>
+      <ul>
+        % for key, value in c.form_errors.iteritems():
+          <li>${_(formular_labels.get(key, '%s' % key))}: ${value}</li>
+        % endfor
+      </ul>
+    </div>
+  % endif
+</%def>
+
+<%def name="buildFooter()">
+  <div id="footer">
+    <div id="version_str">
+      ${g.mpuls_config.get_app_name()}
+      | ${g.mpuls_config.get_releasedate()}
+      | ${g.mpuls_config.get_app_version()}
+    </div>
+  </div>
+</%def>
+
+<%def name="buildContentHeader()">
+  ${self.buildUeberschrift()}
+  ${self.buildModusfield()}
+</%def>
+
+<%def name="buildUeberschrift()">
+</%def>
+
+<%def name="buildModusfield()">
+</%def>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>TEST: ${h.get_app_title()}</title>
+    <meta name="generator" content="vim">
+    <meta name="author" content="Torsten Irlaender">
+    <meta name="date" content="2007-08-07">
+    <meta name="copyright" content="">
+    <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-style-type" content="text/css">
+    <meta http-equiv="expires" content="0">
+    <link rel="shortcut icon" type="image/x-icon" href="/images/kompetenz3.ico">
+    % if c.print_version:
+      <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">
+      <link href="${h.url_for('/styles/print.css')}" media="print" 
+            rel="stylesheet" type="text/css">
+    % else:
+      <link href="${h.url_for('/styles/all.css')}" media="all" rel="stylesheet"
+            type="text/css">
+      <link href="${h.url_for('/styles/screen.css')}" media="screen" 
+            rel="stylesheet" type="text/css">
+      <link href="${h.url_for('/styles/print.css')}" media="print" 
+            rel="stylesheet" type="text/css">
+      <!--[if gt IE 5]>
+        <link href="${h.url_for('/styles/ie6.css')}" media="screen" 
+              rel="stylesheet" type="text/css">
+      <![endif]-->
+    % endif
+    <script src="/js/check.js" type="text/javascript"></script>
+  </head>
+  <body onload="clearModification();">
+    <span class="skiplink">
+      <a href="#startmenu" title="Direkt zum Hauptmen&#252; springen" 
+         tabindex="1">
+        Zum Hauptmen&#252; springen
+      </a>
+    </span>
+    <span class="skiplink">
+      <a href="#navigation" title="Direkt zum Bereichsmen&#252; springen" 
+         tabindex="1">
+        Zum Bereichsmen&#252; springen
+      </a>
+    </span>
+    <span class="skiplink">
+      <a href="#content" title="Direkt zum Inhalt springen" tabindex="2">
+        Zum Inhalt springen
+      </a>
+    </span>
+    <div id="header">
+      <div class="left" id="logo">
+        <a href="${h.url_for(controller='/waska', action='start')}"
+           onclick="return checkModification();">
+          <img src="${h.url_for('/images/logo_ka_75.png')}" 
+               alt="Logo Einrichtung" border="0">
+        </a>
+      </div>
+      <div id="rightheader">
+        ${self.buildStartMenu()}
+        ${self.buildStatusBar()}
+        <div id="navipath">
+          <ul>
+            ${self.buildNavipath()}
+          </ul>
+        </div>
+      </div>
+    </div>
+    <div id="main">
+      <div class="left">
+        <div class="navigation" id="navigation">
+          % if h.hasRole(['cm_ka']):
+            ${self.buildPrivacyfield()}
+          % endif
+          ${next.buildNavigation()}
+        </div>
+      </div>
+      <div id="content" class="right">
+        <div id="status_str_nofloat">
+          % if c.status_msg:
+            <span class="redcolor">${c.status_msg}</span>
+          % else:
+            <strong>Hinweis:</strong> 
+            Gegen ${h.get_logouttime()} Uhr wird diese Sitzung automatisch 
+            beendet. Speichern sie bitte vorher Ihre Eingaben!
+          % endif
+        </div>
+        ${self.buildContentHeader()}
+        ${self.body()}
+      </div>
+    </div>
+    ${self.buildFooter()}
+  </body>
+</html>
+


Property changes on: wasko/branches/2.0/mpulsweb/templates/main.mako
___________________________________________________________________
Name: svn:mergeinfo
   + 



More information about the Mpuls-commits mailing list