[Mpuls-commits] r798 - in wasko/branches/2.0: . waskaweb/templates

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jan 20 17:49:55 CET 2010


Author: bh
Date: 2010-01-20 17:49:54 +0100 (Wed, 20 Jan 2010)
New Revision: 798

Modified:
   wasko/branches/2.0/ChangeLog.txt
   wasko/branches/2.0/waskaweb/templates/main.mako
Log:
* waskaweb/templates/main.mako: Show navigation for appointments,
documents, import and evaluation only if they're activated.


Modified: wasko/branches/2.0/ChangeLog.txt
===================================================================
--- wasko/branches/2.0/ChangeLog.txt	2010-01-20 16:48:09 UTC (rev 797)
+++ wasko/branches/2.0/ChangeLog.txt	2010-01-20 16:49:54 UTC (rev 798)
@@ -1,5 +1,10 @@
 2010-01-20  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/templates/main.mako: Show navigation for appointments,
+	documents, import and evaluation only if they're activated.
+
+2010-01-20  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/lib/config.py (MpulsConfig.build_defaults): Add more
 	settings to enable/disable modules and case modules.
 

Modified: wasko/branches/2.0/waskaweb/templates/main.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/main.mako	2010-01-20 16:48:09 UTC (rev 797)
+++ wasko/branches/2.0/waskaweb/templates/main.mako	2010-01-20 16:49:54 UTC (rev 798)
@@ -75,18 +75,24 @@
                 ${_('sm_menu_link_home')}
               </a>
             </li>
-            <li>
-              <a href="${h.url_for(controller='/appointment',
-                                   action='overview')}">
-                ${_('menu_app_link_overview')}
-              </a>
-            </li>
-            <li>
-              <a href="${h.url_for(controller='/document', 
-                                   action='globalOverview')}">
-                ${_('menu_doc_link_overview')}
-              </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>
@@ -107,21 +113,25 @@
                 ${_('menu_cm_link_new')}
               </a> 
             </li>
-            <li>
-              <a href="${h.url_for(controller='/case', action='importCase')}">
-                ${_('menu_cm_link_import')}
-              </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>
-    <div class="menu">
-      <div class="actions">
-        <h1>${_('Evaluations')}</h1>
-        ${self.buildEvaluations()}
+    % if g.mpuls_config.is_enabled('module', 'evaluation'):
+      <div class="menu">
+        <div class="actions">
+          <h1>${_('Evaluations')}</h1>
+          ${self.buildEvaluations()}
+        </div>
       </div>
-    </div>
+    % endif
     <div class="menu_spacer">
       <div class="actions">
       </div>



More information about the Mpuls-commits mailing list