Author: andre
Date: 2010-06-22 14:10:09 +0200 (Tue, 22 Jun 2010)
New Revision: 42649
Modified:
openimages/trunk/src/main/webapp/WEB-INF/tags/oip/medialist.tagx
Log:
check if not empty, remove html
Modified: openimages/trunk/src/main/webapp/WEB-INF/tags/oip/medialist.tagx
===================================================================
--- openimages/trunk/src/main/webapp/WEB-INF/tags/oip/medialist.tagx
2010-06-22 09:40:14 UTC (rev 42648)
+++ openimages/trunk/src/main/webapp/WEB-INF/tags/oip/medialist.tagx
2010-06-22 12:10:09 UTC (rev 42649)
@@ -18,15 +18,22 @@
<mm:param name="to" value="30" />
<mm:param name="ellipsis" value="..." />
</mm:escaper>
- <mm:escaper id="wrap_subtitle" type="substring">
+
+ <mm:escaper type="substring" id="wrap_subtitle">
<mm:param name="from" value="0" />
<mm:param name="to" value="38" />
<mm:param name="ellipsis" value="..." />
</mm:escaper>
- <mm:escaper id="wrap_intro" type="substring">
- <mm:param name="from" value="0" />
- <mm:param name="to" value="56" />
- <mm:param name="ellipsis" value="..." />
+
+ <mm:escaper id="wrap_intro">
+ <mm:escaper type="tagstripper">
+ <mm:param name="escapeamps" value="false" />
+ </mm:escaper>
+ <mm:escaper type="substring">
+ <mm:param name="from" value="0" />
+ <mm:param name="to" value="56" />
+ <mm:param name="ellipsis" value="..." />
+ </mm:escaper>
</mm:escaper>
<mm:listnodes referid="list" varStatus="status" id="mediafragment">
@@ -82,10 +89,12 @@
</dd>
<dd>
<mm:nodefunction name="translation">
- <strong><mm:field name="subtitle" escape="wrap_subtitle"
/></strong>
- <em>
- <mm:field name="intro" escape="wrap_intro" />
- </em>
+ <mm:field name="subtitle">
+ <mm:isnotempty><strong><mm:write escape="wrap_subtitle"
/></strong></mm:isnotempty>
+ </mm:field>
+ <mm:field name="intro">
+ <mm:isnotempty><em><mm:write escape="wrap_intro"
/></em></mm:isnotempty>
+ </mm:field>
<mm:nodeinfo type="type" id="nodetype" write="false" />
<c:if test="${nodetype ne 'imagefragments' and nodetype ne
'images'}">
<mm:field name="length">
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs