Update of /var/cvs/contributions/didactor2/src/core/metainf/tags/di/core
In directory james.mmbase.org:/tmp/cvs-serv2221

Modified Files:
        blocks.tagx 
Log Message:
support for switching on/off mmbasecomponents per edcation (todo: per class, 
per provider)


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/metainf/tags/di/core


Index: blocks.tagx
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/blocks.tagx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- blocks.tagx 8 Aug 2008 08:54:08 -0000       1.4
+++ blocks.tagx 13 Aug 2008 12:52:12 -0000      1.5
@@ -1,7 +1,9 @@
 <jsp:root
     xmlns:c="http://java.sun.com/jsp/jstl/core";
     xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
+    xmlns:mm-t="urn:jsptagdir:/WEB-INF/tags/mm/u"
     xmlns:jsp="http://java.sun.com/JSP/Page";
+    xmlns:di="http://www.didactor.nl/ditaglib_1.0";
     version="2.0">
   <jsp:directive.tag
       description="" />
@@ -18,6 +20,11 @@
         <mm:param name="id">didactor.${classification}</mm:param>
         <mm:listfunction set="components" name="blockClassification">
           <mm:stringlist referid="_.blocks">
+            <di:component name="${_.component.name}">
+              <c:choose>
+                <c:when test="${! empty  _component.scopesMap.educations}">
+                  <mm:node number="${_component.number}">
+                    <mm:relation role="settingrel" to="${education}">
             <mm:first>
               <jsp:invoke fragment="beforefirst" />
             </mm:first>
@@ -29,6 +36,24 @@
             <mm:last>
               <jsp:invoke fragment="afterlast" />
             </mm:last>
+                    </mm:relation>
+                  </mm:node>
+                </c:when>
+                <c:otherwise>
+                  <mm:first>
+                    <jsp:invoke fragment="beforefirst" />
+                  </mm:first>
+                  <jsp:doBody />
+                  <mm:component name="${_.component.name}" block="${_.name}" />
+                  <mm:last inverse="true">
+                    <jsp:invoke fragment="separator" />
+                  </mm:last>
+                  <mm:last>
+                    <jsp:invoke fragment="afterlast" />
+                  </mm:last>
+                </c:otherwise>
+              </c:choose>
+            </di:component>
           </mm:stringlist>
         </mm:listfunction>
       </mm:functioncontainer>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to