Update of
/var/cvs/contributions/didactor2/src/education/templates/education/pages
In directory james.mmbase.org:/tmp/cvs-serv12342
Modified Files:
content.jsp
Log Message:
removed, cleaned, converted to jspx
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/education/templates/education/pages
Index: content.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/templates/education/pages/content.jsp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- content.jsp 9 Aug 2007 13:22:55 -0000 1.32
+++ content.jsp 18 Jan 2008 17:35:01 -0000 1.33
@@ -1,7 +1,11 @@
-<[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"
-%><mm:content postprocessor="reducespace">
-<mm:cloud rank="didactor user" >
+<jsp:root version="2.0"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
+ xmlns:di="http://www.didactor.nl/ditaglib_1.0"
+ >
+ <mm:content postprocessor="none">
+ <mm:cloud rank="didactor user" >
<mm:import externid="learnobject" required="true"/>
@@ -13,17 +17,17 @@
<mm:present referid="fb_madetest">
<mm:node number="$fb_madetest" notfound="skip">
<mm:relatednodes type="tests">
- <mm:import id="page">/education/tests/feedback.jsp</mm:import>
- <a href="<mm:treefile page="$page" objectlist="$includePath"
referids="$referids">
- <mm:param name="tests"><mm:field name="number"/></mm:param>
- <mm:param name="madetest"><mm:write
referid="fb_madetest"/></mm:param>
- </mm:treefile>"><di:translate key="education.backtotestresults"
/></a><br/>
- <mm:remove referid="page"/>
+ <mm:treefile page="/education/tests/feedback.jsp"
objectlist="$includePath" referids="$referids,[EMAIL PROTECTED],[EMAIL
PROTECTED]" write="false">
+ <a href="${_}"><di:translate key="education.backtotestresults"
/></a>
+ </mm:treefile>
+ <br /><!-- brs are evil -->
</mm:relatednodes>
</mm:node>
</mm:present>
<mm:node number="$learnobject">
+
+ <!-- a bit silly: -->
<mm:hasfield name="layout">
<mm:field id="layout" name="layout" write="false" />
</mm:hasfield>
@@ -42,26 +46,33 @@
<mm:notpresent referid="suppresstitle">
<mm:field name="showtitle">
<mm:compare value="1">
- <h1> <mm:field name="name"/></h1>
+ <h1><mm:field name="name"/></h1>
</mm:compare>
</mm:field>
</mm:notpresent>
- <mm:import jspvar="text" reset="true"><mm:hasfield name="text"><mm:field
name="text" escape="none"/></mm:hasfield> <mm:hasfield name="intro"><mm:field
name="intro" escape="none"/></mm:hasfield></mm:import>
+ <mm:import id="text">
+ <mm:hasfield name="text">
+ <mm:field name="text" escape="none"/> <!-- are we sure these
fields are html fields always? -->
+ </mm:hasfield>
+ <mm:hasfield name="intro">
+ <mm:field name="intro" escape="none"/>
+ </mm:hasfield>
+ </mm:import>
- <table width="100%" border="0" class="Font layout${layout}">
+ <table width="100%" border="0" class="Font layout${layout}"> <!--
tables for layout are evil too -->
<mm:compare referid="layout" value="0">
<tr>
<td width="50%">
<mm:write referid="text" escape="toxml" />
</td>
</tr>
- <tr><td><[EMAIL PROTECTED] file="images.jsp"%></td></tr>
+ <tr><td><jsp:directive.include file="images.jsp" /></td></tr>
</mm:compare>
<mm:compare referid="layout" value="1">
- <tr><td width="50%"><[EMAIL PROTECTED] file="images.jsp"%></td></tr>
+ <tr><td width="50%"><jsp:directive.include file="images.jsp"
/></td></tr>
<tr><td>
<mm:write referid="text" escape="toxml" />
</td></tr>
@@ -72,12 +83,21 @@
<td>
<mm:write referid="text" escape="toxml" />
</td>
- <td><[EMAIL PROTECTED] file="images.jsp"%></td></tr>
+ <td><jsp:directive.include file="images.jsp" /></td>
+ </tr>
</mm:compare>
<mm:compare referid="layout" value="3">
- <tr><td><[EMAIL PROTECTED] file="images.jsp"%></td>
- <td><[EMAIL PROTECTED] file="/shared/cleanText.jsp"%></td></tr>
+ <tr>
+ <td><jsp:directive.include file="images.jsp" /></td>
+ <td>
+ <!--
+ This was horrible
+ <jsp:directive.include file="/shared/cleanText.jsp" />
+ -->
+ <mm:write referid="text" escape="XSS" />
+ </td>
+ </tr>
</mm:compare>
</table>
@@ -87,8 +107,21 @@
<mm:relatednodes type="attachments" role="posrel" orderby="posrel.pos">
<h3><mm:field name="title"/></h3>
<p>
- <i><mm:field name="description" escape="inline"/></i><br>
- <a href="<mm:attachment/>"><img src="<mm:treefile
page="/education/gfx/attachment.gif" objectlist="$includePath" />" border="0"
title="Download <mm:field name="title"/>" alt="Download <mm:field
name="title"/>"></a>
+ <i><mm:field name="description" escape="inline"/></i>
+ <br /> <!-- as mentioned, br's are evil -->
+
+ <!--
+ TODO
+ Why not use icons dependent on the type? This is impossible
with this.
+ 'Download' lack i18n.
+ -->
+ <mm:attachment>
+ <a href="${_}">
+ <img src="${mm:treelink('/education/gfx/attachment.gif',
includePath)}" border="0"
+ title="Download ${_node.title}"
+ alt="Download ${_node.title}" />
+ </a>
+ </mm:attachment>
</p>
</mm:relatednodes>
@@ -100,8 +133,18 @@
</p>
<i><mm:field name="intro" escape="p"/></i>
<p>
- <mm:field name="body" escape="inline"/><br>
- <a href="<mm:field name="url" />"><img src="<mm:treefile
page="/education/gfx/audio.gif" objectlist="$includePath" />" border="0"
title="Beluister <mm:field name="title" />" alt="Beluister <mm:field
name="title" />"></a></b>
+ <mm:field name="body" escape="inline"/>
+ <br /> <!-- silly! -->
+
+ <!-- TODO
+ 'Beluister' is dutch. It means: 'Listen to'
+ -->
+ <a href="${_node.url}">
+ <img src="${mm:treelink('/education/gfx/audio.gif',
includePath)}"
+ border="0"
+ title="Beluister ${_node.title}"
+ alt="Beluister ${_node.title}" />
+ </a>
</p>
</mm:relatednodes>
</div>
@@ -114,9 +157,19 @@
</p>
<i><mm:field name="intro" escape="p"/></i>
<p>
- <mm:field name="body" escape="inline"/><br>
- <a href="<mm:field name="url" />"><img src="<mm:treefile
page="/education/gfx/video.gif" objectlist="$includePath" />" border="0"
title="Bekijk <mm:field name="title" />" alt="Bekijk <mm:field name="title"
/>"></a>
+ <mm:field name="body" escape="inline"/>
+ <br /> <!-- CSS, why would we use it, if we can litter the html
with a few zillion of br's. -->
+
+ <!-- TODO
+ 'Bekijk' is dutch. It means: 'Watch'
+ -->
+ <a href="${_node.url}">
+ <img src="${mm:treelink('/education/gfx/video.gif',
includePath)}"
+ border="0"
+ title="Bekijk ${_node.title}"
+ alt="Bekijk ${_node.title}" />
+ </a>
</p>
</mm:relatednodes>
</div>
@@ -129,16 +182,18 @@
</mm:compare>
</mm:field>
<p>
- <i><mm:field name="description" escape="inline"/></i><br/>
- <a href="<mm:field name="url"/>" target="_blank"><mm:field
name="url"/></a>
+ <i><mm:field name="description" escape="inline"/></i>
+ <br /> <!-- it never stops -->
+
+ <a href="${_node.url}"
+ target="_blank"><mm:field name="url"/></a>
</p>
</mm:relatednodes>
</div>
</mm:node>
</mm:cloud>
-
-</mm:content>
-
+ </mm:content>
+</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs