Update of
/var/cvs/contributions/didactor2/src/education/templates/education/wizards/modes
In directory james.mmbase.org:/tmp/cvs-serv22784/modes
Modified Files:
content_metadata.jsp educations.jsp roles.jsp tests.jsp
Removed Files:
metadata.jsp proactiveemail.jsp virtualclassroom.jsp
Log Message:
tidied up a bit using di:leaf
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/education/templates/education/wizards/modes
Index: content_metadata.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/templates/education/wizards/modes/content_metadata.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- content_metadata.jsp 1 Feb 2008 14:06:25 -0000 1.3
+++ content_metadata.jsp 29 Feb 2008 09:24:12 -0000 1.4
@@ -5,15 +5,18 @@
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:di="http://www.didactor.nl/ditaglib_1.0">
<jsp:output omit-xml-declaration="yes" />
+ <div
+ xmlns="http://www.w3.org/1999/xhtml"
+ class="content_metadata">
<mm:cloud method="delegate" authenticate="asis">
<jsp:directive.include file="../mode.include.jsp" />
<di:has editcontext="contentelementen">
<a href="javascript:clickNode('content_metadata_0')">
- <img src='gfx/tree_pluslast.gif' width="16" border='0' align='center'
valign='middle' id='img_content_metadata_0' />
+ <img src='gfx/tree_minlast.gif' width="16" border='0' align='center'
valign='middle' id='img_content_metadata_0' />
</a>
- <jsp:text>&nbsp;</jsp:text>
+ <jsp:text> </jsp:text>
<img src='gfx/menu_root.gif' border='0' align='center' valign='middle'/>
- <jsp:text>&nbsp;</jsp:text>
+ <jsp:text> </jsp:text>
<nobr>
<a href="javascript:clickNode('content_metadata_0')"
title="${di:translate('education.educationmenucontentmetadata')}">
@@ -22,15 +25,11 @@
</nobr>
<br /> <!-- brs are stupid -->
<mm:import jspvar="langLocale"><mm:write referid="language"
/></mm:import>
- <div id='content_metadata_0' style='display: none'>
- <mm:import id="types"
vartype="list">images,attachments,audiotapes,videotapes,urls</mm:import>
+ <div id='content_metadata_0'>
+ <di:getsetting setting="metacontentobjects" component="core"
vartype="list" id="types" write="false" />
<c:forEach items="${types}" var="type">
<mm:hasnodemanager name="${type}">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
- <td><img src="gfx/learnblock.gif" border="0" align="middle"
/></td>
+ <di:leaf icon="learnblock" depth="1" branchPath=". ">
<mm:link referid="listjsp">
<mm:param name="wizard"><mm:property name="wizard"
nodemanager="${type}" /></mm:param>
<mm:param name="nodepath">${type}</mm:param>
@@ -39,25 +38,15 @@
<mm:param name="metadata">yes</mm:param>
<mm:param name="path"></mm:param>
<!--<mm:write referid="forbidtemplate" escape="text/plain"
/> -->
- <td>
- <nobr>
- &nbsp;
<a href="${_}" title="${di:translate('education.edit')}"
target="text"><mm:nodeinfo type="guinodemanager"
nodetype="${type}" />
</a>
- </nobr>
- </td>
</mm:link>
- </tr>
- </table>
+ </di:leaf>
</mm:hasnodemanager>
</c:forEach>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
- <td><img src="gfx/learnblock.gif" border="0" align="middle" /></td>
+ <di:leaf icon="learnblock" depth="1" branchPath=". ">
<mm:link referid="listjsp">
<mm:param name="wizard">config/provider/providers</mm:param>
<mm:param name="nodepath">providers</mm:param>
@@ -65,21 +54,16 @@
<mm:param name="fields">name</mm:param>
<mm:param name="orderyby">name</mm:param>
<mm:param name="path"></mm:param>
- <td>
- <nobr>
- &nbsp;
<a href="${_}" target="text">
Content paginas (CMS)</a>
- </nobr>
- </td>
</mm:link>
- </tr>
- </table>
+ </di:leaf>
<mm:hasnode number="component.portalpages">
- <mm:treeinclude debug="html"
page="/portalpages/backoffice/add_portalpages.jsp" objectlist=""
referids="listjsp,wizardjsp" />
+ <di:include page="/portalpages/backoffice/add_portalpages.jsp" />
</mm:hasnode>
+ <!--
<mm:hasnode number="component.cmshelp">
<mm:treeinclude debug="html" page="/cmshelp/backoffice/add_help.jsp"
objectlist="" referids="listjsp,wizardjsp" />
</mm:hasnode>
@@ -91,8 +75,9 @@
<mm:hasnode number="component.news">
<mm:treeinclude debug="html" page="/news/backoffice/add_news.jsp"
objectlist="" referids="listjsp,wizardjsp" />
</mm:hasnode>
-
+ -->
</div>
</di:has>
</mm:cloud>
+ </div>
</jsp:root>
Index: educations.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/templates/education/wizards/modes/educations.jsp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- educations.jsp 8 Feb 2008 14:49:12 -0000 1.19
+++ educations.jsp 29 Feb 2008 09:24:12 -0000 1.20
@@ -2,6 +2,7 @@
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
+ xmlns:di-t="urn:jsptagdir:/WEB-INF/tags/di/core"
xmlns:di="http://www.didactor.nl/ditaglib_1.0">
<jsp:output omit-xml-declaration="yes" />
<!--
@@ -10,21 +11,24 @@
- Too much component specific code
- Too much javascript (should perhaps use event handlers)
-->
- <div class="educations">
+ <div
+ xmlns="http://www.w3.org/1999/xhtml"
+ class="educations">
<mm:import id="imageName"></mm:import> <!-- horrible idea -->
<mm:import id="sAltText"></mm:import>
- <mm:content type="application/xml" expires="${param.expires}">
+ <mm:content type="application/xml"
+ expires="${param.expires}">
<mm:cloud rank="basic user">
<jsp:directive.include file="../mode.include.jsp" />
<!--
Educations come from here
-->
- <di:has editcontext="opleidingen">
+ <di:has editcontext="opleidingen"><!-- TODO DUTCH. 'opleidingen' means
'educations' -->
<a href="javascript:clickNode('node_0')">
- <img src='gfx/tree_pluslast.gif' width="16" border='0'
align='center' valign='middle' id='img_node_0'/>
+ <img src='gfx/tree_minlast.gif' width="16" border='0'
align='center' valign='middle' id='img_node_0'/>
</a>
- <img src='gfx/menu_root.gif' border='0' align='center'
valign='middle'/>
+ <img src='gfx/menu_root.gif' border='0' align='center'
valign='middle' /> <!-- Why are we including style in the HTML? -->
<span style='width:100px; white-space: nowrap'>
<mm:link referid="listjsp${forbidtemplate}">
<mm:param name="wizard">config/education/educations</mm:param>
@@ -38,7 +42,7 @@
</mm:link>
</span>
<br /><!-- br's are silly -->
- <div id='node_0' style='display: none'>
+ <div id='node_0'>
<mm:node number="$user">
<mm:hasrank value="administrator">
<mm:listnodes id="educations" type="educations" />
@@ -49,56 +53,25 @@
</mm:node>
<mm:import id="number_of_educations"
reset="true">${fn:length(educations)}</mm:import>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <!-- We have to detect the last element -->
- <mm:isgreaterthan referid="number_of_educations" value="0">
- <td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
- </mm:isgreaterthan>
-
- <mm:islessthan referid="number_of_educations" value="1">
- <td><img src="gfx/tree_leaflast.gif" border="0"
align="middle"/></td>
- </mm:islessthan>
-
- <td><img src="gfx/new_education.gif" width="16" border="0"
align="middle" /></td>
- <mm:link referid="wizardjsp" referids="[EMAIL PROTECTED]">
+ <di:has editcontext="create_education">
+ <di-t:leaf branchPath=". ">
+ <mm:link referid="wizardjsp" referids="[EMAIL
PROTECTED],provider">
<mm:param
name="wizard">config/education/educations-origin</mm:param>
<mm:param name="objectnumber">new</mm:param>
<mm:param name="path"></mm:param>
- <td>
- <nobr>
<a href="${_}"
title="${di:translate('education.createneweducationdescription')}"
target="text"><di:translate
key="education.createneweducation" /></a>
- </nobr></td>
</mm:link>
- </tr>
- </table>
+ </di-t:leaf>
+ </di:has>
<mm:import id="educationId" externid="e">${education}</mm:import>
<mm:isgreaterthan referid="number_of_educations" value="0">
<!-- The Education starts from here -->
<mm:node number="${educationId}">
- <jsp:directive.include file="../whichimage.jsp" />
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <!-- spacer.gifs are _evil_, silly and cause noise. JSP
is code _too_. -->
- <img src="gfx/tree_spacer.gif" width="16px"
height="16px" border="0" align="center" valign="middle"/>
- </td>
- <td>
- <a href="javascript:clickNode('education_0')">
- <img src="gfx/tree_pluslast.gif" border="0"
- align="center" valign="middle"
id="img_education_0"/>
- </a>
- </td>
- <td>
- <img src="gfx/folder_closed.gif" border="0"
align="middle" id="img2_education_0"/>
- </td>
- <td>
- <nobr>
+ <di-t:leaf click="education_0" open="true" branchPath="..">
<mm:link referid="wizardjsp" referids="[EMAIL
PROTECTED]">
<mm:param
name="wizard">config/education/educations</mm:param>
<mm:param name="title"><di:translate
key="education.editeducation" /></mm:param>
@@ -107,10 +80,7 @@
<mm:field id="eduname" write="false" name="name" />
<mm:write session="eduname" referid="eduname" />
- <!--
- follows horrible code specific for some components
- probably broken, btw.
- -->
+ <!-- WTF -->
<mm:present referid="pdfurl">
<mm:link page="${pdfurl}" referids="[EMAIL
PROTECTED]">
<a href="${_}" target="text"><img
src='gfx/icpdf.gif' border='0' title='(PDF)' alt='(PDF)'/></a>
@@ -124,7 +94,6 @@
<mm:hasnode number="component.drm">
<mm:link referid="wizardjsp" referids="[EMAIL
PROTECTED]">
<mm:param name="wizard">educationlicense</mm:param>
- <!-- Todo: DUTCH -->
<a target="text" href="${_}"
title="Bewerk licentie" style="font-size: 1em;
text-decoration: none">??</a>
</mm:link>
@@ -132,101 +101,55 @@
<mm:hasnode number="component.versioning">
<a href="versioning.jsp?nodeid=${educationId}"
target="text"><img src="gfx/versions.gif" border="0" /></a>
</mm:hasnode>
- </nobr>
- </td>
- </tr>
- </table>
+ </di-t:leaf>
- <!-- We have to count all learnblocks.
- MM: I can see that. But why?
- -->
- <mm:relatednodescontainer role="posrel" type="learnobjects"
searchdirs="destination">
- <mm:size id="number_of_learnblocks" write="false"/>
- </mm:relatednodescontainer>
-
-
- <div id="education_0" style='display: none'>
+ <div id="education_0">
<!-- Registration -->
<mm:hasnode number="component.register">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="32px"
height="16px" border="0" align="center" valign="middle"/></td>
- <td><img src='gfx/tree_vertline-leaf.gif' border='0'
align='center' valign='middle' id='img_node_0_1_2'/></td>
- <td><img src='gfx/new_education.gif' width="16"
border='0' align='middle' /></td>
+ <di-t:leaf branchPath=".. ">
<mm:treefile write="false"
page="/register/wizards/register.jsp"
referids="$referids,educationId"
objectlist="$includePath">
- <td>
- <nobr>
<a href="${_}"
title="${di:translate('register.registrations')}"
target="text"><di:translate
key="register.registrations" /></a>
- </nobr>
- </td>
</mm:treefile>
- </tr>
- </table>
+ </di-t:leaf>
</mm:hasnode>
<!-- I think it is hackery -->
<mm:hasnode number="component.portal">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="32px"
height="16px" border="0" align="center" valign="middle"/></td>
- <td><img src='gfx/tree_vertline-leaf.gif' border='0'
align='center' valign='middle' id='img_node_0_1_2'/></td>
- <td><img src='gfx/new_education.gif' width="16"
border='0' align='middle' /></td>
+ <di-t:leaf branchPath=".. ">
<mm:treefile write="false"
page="/portal/wizards/index.jspx"
referids="language,educationId,$referids"
objectlist="$includePath">
-
- <td>
- <nobr>
<a href="${_}"
title="${di:translate('portal.portal')}"
- target="text"><di:translate
key="portal.portal" /></a>
- </nobr>
- </td>
+ target="text"><di:translate key="portal.portal" />
+ </a>
</mm:treefile>
- </tr>
- </table>
+ </di-t:leaf>
</mm:hasnode>
- <mm:relatednodes path="posrel,learnblocks" element="posrel"
orderby="posrel.pos" directions="down" max="1">
- <mm:field name="pos" id="maxpos" write="false" />
- </mm:relatednodes>
-
<!-- create new learnblock item -->
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="32px"
height="16px" border="0" align="center" valign="middle"/></td>
- <mm:isgreaterthan referid="number_of_learnblocks"
value="0">
- <td><img src='gfx/tree_vertline-leaf.gif' border='0'
align='center' valign='middle' id='img_node_0_1_2'/></td>
- </mm:isgreaterthan>
- <mm:islessthan referid="number_of_learnblocks"
value="1">
- <td><img src='gfx/tree_leaflast.gif' border='0'
align='center' valign='middle' id='img_node_0_1_2'/></td>
- </mm:islessthan>
- <td><img src='gfx/new_education.gif' width="16"
border='0' align='middle' /></td>
+ <di-t:leaf branchPath=".. ">
<mm:link referid="wizardjsp" referids="[EMAIL
PROTECTED]">
<mm:param
name="wizard">config/learnblocks/learnblocks-origin</mm:param>
<mm:param name="objectnumber">new</mm:param>
<mm:param name="newpos">${maxpos + 1}</mm:param>
- <td>
- <nobr>
<a href="${_}"
title="${di:translate('education.createnewlearnblockdescription')}"
target="text">
<di:translate
key="education.createnewlearnblock" /></a>
- </nobr>
- </td>
</mm:link>
- </tr>
- </table>
+ </di-t:leaf>
<!-- All learnblocks for current education -->
<mm:relatednodes role="posrel" orderby="posrel.pos"
directions="up"
+ varStatus="status"
searchdir="destination"
type="learnobjects">
<mm:index id="learnblockcounter" write="false" />
<jsp:directive.include file="../whichimage.jsp" />
- <mm:nodeinfo type="type" id="this_node_type">
+ <mm:nodeinfo type="type" id="this_node_type" write="false"
/>
<mm:import id="mark_error" reset="true"></mm:import>
<mm:compare referid="this_node_type" value="tests">
<mm:field name="questionamount" id="questionamount">
@@ -256,25 +179,7 @@
</mm:field>
</mm:compare>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="32px"
height="16px" border="0" align="center" valign="middle"/></td>
- <td>
- <!-- horrible code duplication, just for, as i
can see it correctly _one_ word -->
- <mm:last inverse="true">
- <a
href="javascript:clickNode('node_0_0_${learnblockcounter}')">
- <img src="gfx/tree_plus.gif" border="0"
align="center" valign="middle" id="img_node_0_0_${learnblockcounter}"/></a>
- </mm:last>
- <mm:last>
- <a
href="javascript:clickNode('node_0_0_${learnblockcounter}')">
- <img src="gfx/tree_pluslast.gif" border="0"
align="center" valign="middle" id="img_node_0_0_${learnblockcounter}"/></a>
- </mm:last>
- </td>
- <td>
- <img src="gfx/folder_closed.gif" border="0"
align="middle" id='img2_node_0_0_${learnblockcounter}'/>
- </td>
- <td>
- <nobr>
+ <di-t:leaf click="node_0_0_${learnblockcounter}"
branchPath="..${status.last ? '.' : ' '}">
<mm:import id="guitype" ><mm:nodeinfo
type="guitype" escape="lowercase" /></mm:import>
<mm:link referid="wizardjsp" referids="[EMAIL
PROTECTED]">
<mm:param name="wizard">config/<mm:nodeinfo
type="type"/>/<mm:nodeinfo type="type" /></mm:param>
@@ -303,23 +208,15 @@
<a href="${_}" target="text"><img
src="gfx/versions.gif" border="0" /></a>
</mm:link>
</mm:hasnode>
- </nobr>
- </td>
- </tr>
- </table>
- </mm:nodeinfo>
+ </di-t:leaf>
<div id="node_0_0_${learnblockcounter}"
style="display:none">
- <mm:treeinclude write="true"
page="/education/wizards/learnobject.jsp" objectlist="$includePath"
- referids="wizardjsp">
+ <mm:treeinclude
+ page="/education/wizards/learnobject.jsp"
+ objectlist="$includePath"
+ referids="wizardjsp,[EMAIL PROTECTED]">
+ <mm:param name="branchPath">..${status.last ? '.' : '
'}</mm:param>
<mm:param name="startnode"><mm:field name="number"
/></mm:param>
- <mm:param name="depth">10</mm:param>
- <mm:last>
- <mm:param name="the_last_parent">true</mm:param>
- </mm:last>
- <mm:last inverse="true">
- <mm:param name="the_last_parent">false</mm:param>
- </mm:last>
</mm:treeinclude>
</div>
</mm:relatednodes>
Index: roles.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/templates/education/wizards/modes/roles.jsp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- roles.jsp 1 Feb 2008 15:38:37 -0000 1.13
+++ roles.jsp 29 Feb 2008 09:24:12 -0000 1.14
@@ -13,14 +13,14 @@
</di:has>
<di:has editcontext="rollen">
<a href="javascript:clickNode('persons_0')">
- <img src='gfx/tree_pluslast.gif' width="16" border='0' align='center'
valign='middle' id='img_persons_0' />
+ <img src='gfx/tree_minlast.gif' width="16" border='0' align='center'
valign='middle' id='img_persons_0' />
</a>
<img src='gfx/menu_root.gif' border='0' align='center' valign='middle'/>
<nobr>
<a href="javascript:clickNode('persons_0')"><di:translate
key="education.personstab" /></a></nobr>
<br />
- <div id='persons_0' style='display: none'>
+ <div id='persons_0'>
<!--
edit people,rolerel, education
doesn't work properly, so commented it out for the moment
@@ -32,13 +32,7 @@
-->
<!--create new role-->
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
- <td><img src="gfx/learnblock.gif" border="0" align="middle"
/></td>
- <td>
- <nobr>
+ <di:leaf icon="learnblock" depth="1" branchPath=". ">
<jsp:text> </jsp:text>
<mm:link referid="listjsp">
<mm:param name="wizard">config/people/people</mm:param>
@@ -51,17 +45,9 @@
<di:translate key="education.persons" />
</a>
</mm:link>
- </nobr>
- </td>
- </tr>
- <mm:listnodes type="roles">
- <tr>
- <!-- I hate spacers -->
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_vertline.gif" border="0"
align="middle"/></td>
- <td />
- <td>
- <nobr>
+ </di:leaf>
+ <mm:listnodes type="roles" varStatus="status">
+ <di:leaf depth="2" branchPath=". ${status.last ? '.' : ' '}">
<jsp:text> </jsp:text>
<mm:link referid="listjsp" referids="[EMAIL
PROTECTED],education">
<mm:param
name="wizard">config/people/people_unlink</mm:param>
@@ -77,42 +63,24 @@
<mm:field name="name" />
</a>
</mm:link>
- </nobr>
- </td>
- </tr>
+ </di:leaf>
</mm:listnodes>
- </table>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
-
- <td><img src="gfx/learnblock.gif" border="0" align="middle"
/></td>
- <td>
+ <di:leaf icon="learnblock" depth="1" branchPath=". ">
<mm:link referid="listjsp" referids="[EMAIL PROTECTED]">
<mm:param
name="wizard">config/class/classes-standalone</mm:param>
<mm:param name="nodepath">classes</mm:param>
<mm:param name="search">yes</mm:param>
<mm:param name="orderby">number</mm:param>
<mm:param name="directions">down</mm:param>
- <nobr>
<jsp:text> </jsp:text>
<a href="${_}${forbidtemplate}"
title="${di:translate('education.classes')}"
target="text">
<di:translate key="education.classes" />
</a>
- </nobr>
</mm:link>
- </td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
- <td><img src="gfx/learnblock.gif" border="0" align="middle"
/></td>
- <td>
+ </di:leaf>
+ <di:leaf icon="learnblock" depth="1" branchPath=". ">
<mm:link referid="listjsp">
<mm:param name="wizard">config/workgroup/workgroups</mm:param>
<mm:param name="nodepath">workgroups</mm:param>
@@ -127,31 +95,13 @@
</a>
</nobr>
</mm:link>
- </td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_leaflast.gif" border="0"
align="middle"/></td>
-
- <td><img src="gfx/learnblock.gif" border="0" align="middle"
/></td>
- <td>
- <nobr>
+ </di:leaf>
+ <di:leaf icon="learnblock" depth="1" branchPath=". ">
<jsp:text> </jsp:text>
<a href="roles.jsp" title="${di:translate('education.roles')}"
target="text"><di:translate key="education.roles" /></a>
- </nobr>
- </td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <td><img src="gfx/tree_leaflast.gif" border="0"
align="middle"/></td>
-
- <td><img src="gfx/learnblock.gif" border="0" align="middle"
/></td>
- <td>
+ </di:leaf>
+ <di:leaf icon="learnblock" depth="1" branchPath="..">
<mm:link referid="listjsp">
<mm:param
name="wizard">config/disallowedusernames/disallowedusernames</mm:param>
<mm:param name="nodepath">disallowedusernames</mm:param>
@@ -166,9 +116,7 @@
</a>
</nobr>
</mm:link>
- </td>
- </tr>
- </table>
+ </di:leaf>
<!-- sigh -->
<mm:hasnode number="component.report">
<!-- <di:hasrole role="teacher"> -->
Index: tests.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/templates/education/wizards/modes/tests.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- tests.jsp 1 Nov 2006 10:10:38 -0000 1.1
+++ tests.jsp 29 Feb 2008 09:24:12 -0000 1.2
@@ -1,31 +1,40 @@
-<[EMAIL PROTECTED] uri="http://www.mmbase.org/mmbase-taglib-2.0" prefix="mm"%>
-<[EMAIL PROTECTED] uri="http://www.didactor.nl/ditaglib_1.0" prefix="di" %>
-<jsp:directive.page
import="java.util.*,nl.didactor.component.education.utils.*" />
-<jsp:scriptlet>
- String imageName = "";
- String sAltText = "";
-</jsp:scriptlet>
-<mm:cloud method="delegate" authenticate="asis" jspvar="cloud">
- <jsp:directive.include file="/shared/setImports.jsp" />
+<jsp:root version="2.0"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
+ xmlns:di="http://www.didactor.nl/ditaglib_1.0">
+ <jsp:output omit-xml-declaration="yes" />
+ <mm:import id="imageName" />
+ <mm:import id="sAltText" />
+ <mm:cloud rank="basic user">
<jsp:directive.include file="../mode.include.jsp" />
- <jsp:directive.include file="/education/wizards/roles_defs.jsp" />
- <% //----------------------- Tests come from here ----------------------- %>
- <mm:import id="editcontextname" reset="true">toetsen</mm:import>
- <[EMAIL PROTECTED] file="/education/wizards/roles_chk.jsp" %>
- <mm:islessthan inverse="true" referid="rights" referid2="RIGHTS_RW">
- <a href='javascript:clickNode("tests_0")'><img
src='gfx/tree_pluslast.gif' width="16" border='0' align='center'
valign='middle' id='img_tests_0'/></a> <img src='gfx/menu_root.gif'
border='0' align='center' valign='middle'/> <span style='width:100px;
white-space: nowrap'><a href='<mm:write
referid="listjsp"/>&wizard=config/tests/tests&nodepath=tests&fields=name&searchfields=name&orderby=name<mm:write
referid="forbidtemplate" escape="text/plain" />' target="text"><di:translate
key="education.tests" /></a></span>
- <br>
- <div id='tests_0' style='display: none'>
+ <di:has role="toetsen"> <!-- WTF, this is dutch, toetsen means 'tests' -->
+
+ <a href='javascript:clickNode("tests_0")'>
+ <img src='gfx/tree_minlast.gif' width="16" border='0' align='center'
valign='middle' id='img_tests_0'/>
+ </a>
+ <img src='gfx/menu_root.gif' border='0' align='center' valign='middle'/>
<span style='width:100px; white-space: nowrap' />
+ <mm:link referid="listjsp">
+ <mm:param name="wizard">config/tests/tests</mm:param>
+ <mm:param name="nodepath">tests</mm:param>
+ <mm:param name="fields">name</mm:param>
+ <mm:param name="orderby">name</mm:param>
+ <mm:param name="searchfields">name</mm:param>
+ ${forbidtemplate} ??
+ <a href="${_}" target="text"><di:translate key="education.tests" /></a>
+ </mm:link>
+ <br />
+ <div id='tests_0' >
<mm:import id="number_of_tests" reset="true">0</mm:import>
- <mm:listnodes type="tests">
- <mm:import id="number_of_tests" reset="true"><mm:size
/></mm:import>
- </mm:listnodes>
+ <mm:listnodescontainer type="tests">
+ <mm:size id="number_of_tests" write="false" />
+ </mm:listnodescontainer>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="gfx/tree_spacer.gif" width="16px" height="16px"
border="0" align="center" valign="middle"/></td>
- <%// We have to detect the last element %>
+ <!-- We have to detect the last element -->
<mm:isgreaterthan referid="number_of_tests" value="0">
<td><img src="gfx/tree_vertline-leaf.gif" border="0"
align="middle"/></td>
</mm:isgreaterthan>
@@ -35,18 +44,18 @@
</mm:islessthan>
<td><img src="gfx/new_education.gif" width="16" border="0"
align="middle" /></td>
- <td><nobr> <a href='<mm:write
referid="wizardjsp"/>&wizard=config/tests/tests&objectnumber=new&path= '
title='<di:translate key="education.createnewtestdescription" />'
target="text"><di:translate key="education.createnewtest" /></a></nobr></td>
+ <td><nobr> <a href='<mm:write
referid="wizardjsp"/>&wizard=config/tests/tests&objectnumber=new&path= '
title='<di:translate key="education.createnewtestdescription" />'
target="text"><di:translate key="education.createnewtest" /></a></nobr></td>
</tr>
</table>
<mm:listnodes type="tests" orderby="tests.name">
<mm:import id="testname" jspvar="testname" reset="true"><mm:field
name="name"/></mm:import>
- <[EMAIL PROTECTED] file="whichimage.jsp"%>
+ <[EMAIL PROTECTED] file="../whichimage.jsp"%>
<mm:field name="number" id="tnumber" write="false" />
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="gfx/tree_spacer.gif" width="16px"
height="16px" border="0" align="center" valign="middle"/></td>
- <%// We have to detect the last element %>
+ <!-- We have to detect the last element-->
<mm:last inverse="true">
<td><a href='javascript:clickNode("<mm:field
name="number"/>")'><img src="gfx/tree_plus.gif" border="0" align="middle"
id='img_<mm:field name="number"/>'/></a></td>
</mm:last>
@@ -80,8 +89,8 @@
<jsp:include page="newfromtree_tests.jsp">
<jsp:param name="node" value="<%= sID %>" />
<jsp:param name="wizardjsp" value="<%= sWizardjsp
%>" />
- <jsp:param name="the_last_parent" value="<%=
sTheLastParent %>" />
- <jsp:param name="testname" value="<%=testname%>" />
+ <jsp:param name="the_last_parent"
value="${sTheLastParent}" />
+ <jsp:param name="testname" value="${testname}" />
</jsp:include>
</mm:write>
</mm:write>
@@ -143,10 +152,10 @@
<mm:import id="mark_error"
reset="true"></mm:import>
</mm:relatednodes>
- <td> <nobr><a href='<mm:write
referid="wizardjsp"/>&wizard=config/question/mcquestions&objectnumber=<mm:field
name="number"/>&path=' title='<di:translate key="education.edit" /> <%=
dummyName.toLowerCase() %>' target="text"><mm:field name="title"
/><mm:isnotempty referid="mark_error"></a> <a style='color: red; font-weight:
bold' href='javascript:alert("<mm:write
referid="mark_error"/>");'>!</mm:isnotempty></a></nobr></td>
+ <td> <nobr><a href='<mm:write
referid="wizardjsp"/>&wizard=config/question/mcquestions&objectnumber=<mm:field
name="number"/>&path=' title='<di:translate key="education.edit" /> <%=
dummyName.toLowerCase() %>' target="text"><mm:field name="title"
/><mm:isnotempty referid="mark_error"></a> <a style='color: red; font-weight:
bold' href='javascript:alert("<mm:write
referid="mark_error"/>");'>!</mm:isnotempty></a></nobr></td>
</mm:compare>
<mm:compare referid="type_of_node"
valueset="couplingquestions,dropquestions,hotspotquestions,openquestions,rankingquestions,valuequestions,fillquestions,fillselectquestions,essayquestions">
- <td> <nobr><a href='<mm:write
referid="wizardjsp"/>&wizard=config/question/<mm:write
referid="type_of_node"/>&objectnumber=<mm:field name="number"/>&path=<mm:write
referid="testname"/>' title='<di:translate key="education.edit" /> <%=
dummyName.toLowerCase() %>' target="text"><mm:field name="title"
/></a></nobr></td>
+ <td> <nobr><a href='<mm:write
referid="wizardjsp"/>&wizard=config/question/<mm:write
referid="type_of_node"/>&objectnumber=<mm:field name="number"/>&path=<mm:write
referid="testname"/>' title='<di:translate key="education.edit" /> <%=
dummyName.toLowerCase() %>' target="text"><mm:field name="title"
/></a></nobr></td>
</mm:compare>
</mm:nodeinfo>
</tr>
@@ -156,6 +165,6 @@
</div>
</mm:listnodes>
</div>
- </mm:islessthan>
+ </di:has>
</mm:cloud>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs