Update of /var/cvs/applications/richtext/META-INF/tags/mm/rich
In directory james.mmbase.org:/tmp/cvs-serv32520/tags/mm/rich
Modified Files:
body.tagx referred.tagx
Log Message:
generalized tags a bit
See also:
http://cvs.mmbase.org/viewcvs/applications/richtext/META-INF/tags/mm/rich
Index: body.tagx
===================================================================
RCS file: /var/cvs/applications/richtext/META-INF/tags/mm/rich/body.tagx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- body.tagx 13 Dec 2006 10:06:49 -0000 1.2
+++ body.tagx 13 Mar 2008 10:52:21 -0000 1.3
@@ -5,14 +5,16 @@
xmlns:os="http://www.opensymphony.com/oscache"
version="2.0">
<jsp:directive.attribute name="field" />
+ <jsp:directive.attribute name="name" />
+
<jsp:directive.attribute name="popupwidth" />
<jsp:directive.attribute name="cron" />
<jsp:directive.attribute name="time" />
<!--
MMBase rich-text evaluation. Using XSLT.
- $Id: body.tagx,v 1.2 2006/12/13 10:06:49 michiel Exp $
+ $Id: body.tagx,v 1.3 2008/03/13 10:52:21 michiel Exp $
-->
- <mm:node>
+
<os:cache
cron="${empty cron ? (empty time ? '0 4 * * *' : '') : cron}"
time="${time}"
@@ -27,15 +29,22 @@
<mm:listrelations>
<mm:relatednode>
<mm:listrelations role="idrel" searchdir="destination">
+ <mm:relatednode>
+ <mm:nodeinfo type="nodemanager">
+ <mm:compare value="blocks">
+ <mm:listrelations type="object" role="idrel"
searchdir="destination" >
<mm:relatednode />
</mm:listrelations>
+ </mm:compare>
+ </mm:nodeinfo>
+ </mm:relatednode>
+ </mm:listrelations>
</mm:relatednode>
</mm:listrelations>
</mm:listrelationscontainer>
- <mm:field name="${empty field ? 'body' : field}" />
+ <mm:field name="${empty field ? (empty name ? 'body' : name): field}" />
</mm:formatter>
</os:cache>
- </mm:node>
</jsp:root>
Index: referred.tagx
===================================================================
RCS file: /var/cvs/applications/richtext/META-INF/tags/mm/rich/referred.tagx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- referred.tagx 25 Oct 2006 22:06:17 -0000 1.1
+++ referred.tagx 13 Mar 2008 10:52:21 -0000 1.2
@@ -1,4 +1,5 @@
<jsp:root
+ xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
xmlns:jsp="http://java.sun.com/JSP/Page"
@@ -8,20 +9,32 @@
<jsp:directive.attribute name="type" />
<!--
Generates the 'see alo' back references, for the current node.
- $Id: referred.tagx,v 1.1 2006/10/25 22:06:17 michiel Exp $
+ $Id: referred.tagx,v 1.2 2008/03/13 10:52:21 michiel Exp $
-->
<mm:import id="t">${empty type ? 'texts' : type}</mm:import>
- <mm:node>
+ <fmt:bundle basename="org.mmbase.richtext.resources.messages">
<mm:listrelationscontainer
type="$t" role="idrel" searchdir="source">
+ <mm:hasfield nodetype="${t}" name="begin">
<mm:constraint field="${t}.begin" operator="LESS" value="now" />
- <mm:constraint field="${t}.end" operator="GREATER" value="now" />
<mm:sortorder field="${t}.begin" direction="down" />
+ </mm:hasfield>
+ <mm:hasfield nodetype="${t}" name="begin">
+ <mm:constraint field="${t}.end" operator="GREATER" value="now" />
+ </mm:hasfield>
<mm:sortorder field="${t}.number" direction="down" />
<mm:size>
<mm:isgreaterthan value="0">
<p class="seealso">
- <strong>${empty see ? 'See also' : see} </strong>
+ <strong>
+ <c:choose>
+ <c:when test="${empty see}">
+ <fmt:message key="seealso" />
+ </c:when>
+ <c:otherwise>${see}</c:otherwise>
+ </c:choose>
+ <jsp:text> </jsp:text>
+ </strong>
<mm:listrelations>
<mm:field name="id" id="anchor" write="false" />
@@ -36,12 +49,20 @@
<mm:nodeinfo type="type">
<mm:compare value="blocks"><!-- don't link to the blocks,
but to the texts containing them. blocks in blocks currently not supported. -->
<mm:relatednodes type="texts" role="idrel"
searchdir="source" id="r">
- <mm:function name="url"><a
href="${_}#${anchor}"><mm:field name="title" /></a></mm:function>
+ <mm:function name="url">
+ <a href="${_}${'#'}${anchor}">
+ <mm:nodeinfo type="gui" />
+ </a>
+ </mm:function>
</mm:relatednodes>
</mm:compare>
<mm:compare value="blocks" inverse="true">
<mm:node id="r" />
- <mm:function name="url"><a
href="${_}#${anchor}"><mm:field name="title" /></a></mm:function>
+ <mm:function name="url">
+ <a href="${_}${'#'}${anchor}">
+ <mm:nodeinfo type="gui" />
+ </a>
+ </mm:function>
</mm:compare>
</mm:nodeinfo>
</mm:node>
@@ -51,7 +72,7 @@
</mm:isgreaterthan>
</mm:size>
</mm:listrelationscontainer>
- </mm:node>
+ </fmt:bundle>
</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs