Author: andre
Date: 2009-09-14 20:51:11 +0200 (Mon, 14 Sep 2009)
New Revision: 38614

Modified:
   openimages/trunk/src/main/webapp/mediafragment.jspx
Log:
translations now correct



Modified: openimages/trunk/src/main/webapp/mediafragment.jspx
===================================================================
--- openimages/trunk/src/main/webapp/mediafragment.jspx 2009-09-14 18:03:05 UTC 
(rev 38613)
+++ openimages/trunk/src/main/webapp/mediafragment.jspx 2009-09-14 18:51:11 UTC 
(rev 38614)
@@ -242,14 +242,24 @@
       </div>
 
       <div class="right-column">
+        
         <div class="related">
           <oip:h3><fmt:message key="media.related_items" /></oip:h3>
           <mm:functioncontainer>
             <mm:param name="type">mediafragments</mm:param>
             <mm:param name="max">6</mm:param>
-            <mm:function set="relatedcontent" name="hits" 
referids="_n...@node" id="hits">
+            <mm:voidfunction set="relatedcontent" name="hits" 
referids="_n...@node" id="hits" />
+          </mm:functioncontainer>
+          <c:choose>
+            <c:when test="${empty hits}">
+              <p>This item has no tags and therefore no related items yet.</p>
+            </c:when>
+            <c:otherwise>
               <c:forEach var="hit" items="${hits}" varStatus="status">
                 <mm:node number="${hit.value}">
+                  <mm:import id="mf_title" reset="true">
+                    <mm:nodefunction name="translation"><mm:field name="title" 
/></mm:nodefunction>
+                  </mm:import>
                   <mm:link page="mediafragment">
                     <mm:frameworkparam name="component">oip</mm:frameworkparam>
                     <mm:frameworkparam 
name="media">${_node}</mm:frameworkparam>
@@ -259,19 +269,16 @@
                     </c:choose>
                     <dl class="${gridclass}">
                       <dt>
-                        <a href="${_}"><oip:thumb /></a>
+                        <a title="${mf_title}" href="${_}"><oip:thumb /></a>
                       </dt>
-                      <dd> <mm:field name="title" escape="wrapper" /> </dd>
+                      <dd> <mm:write referid="mf_title" escape="wrapper" /> 
</dd>
                     </dl>
                   </mm:link>
                   <jsp:text> </jsp:text>
                 </mm:node>
               </c:forEach>
-              <c:if test="${empty hits}">
-                <p>This item has no tags and therefore no related items 
yet.</p>
-              </c:if>
-            </mm:function>
-          </mm:functioncontainer>
+            </c:otherwise>
+          </c:choose>
         </div>
 
         <div class="related-grey-border">
@@ -296,6 +303,9 @@
             <mm:sortorder field="number" direction="DOWN" />
             <mm:maxnumber value="6" />
             <mm:listnodes varStatus="status">
+              <mm:import id="mf_title" reset="true">
+                <mm:nodefunction name="translation"><mm:field name="title" 
/></mm:nodefunction>
+              </mm:import>
               <mm:link>
                 <mm:frameworkparam name="component">oip</mm:frameworkparam>
                 <mm:frameworkparam 
name="block">mediafragment</mm:frameworkparam>
@@ -306,14 +316,15 @@
                 </c:choose>
                 <dl class="${gridclass}">
                   <dt>
-                    <a href="${_}" title="${_node.title}"><oip:thumb /></a>
+                    <a href="${_}" title="${mf_title}"><oip:thumb /></a>
                   </dt>
-                  <dd> <mm:field name="title" escape="wrapper" /> </dd>
+                  <dd> <mm:write referid="mf_title" escape="wrapper" /> </dd>
                 </dl>
               </mm:link>
             </mm:listnodes>
           </mm:listnodescontainer>
         </div>
+        
       </div>
     </jsp:attribute>
   </oip:html>

_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to