Update of /var/cvs/contributions/natmm/templates/nmintra/includes
In directory james.mmbase.org:/tmp/cvs-serv7818/templates/nmintra/includes

Modified Files:
        relatedimage.jsp imagesposition.jsp 
        relatedimage_no_description.jsp 
Log Message:
NMCMS-602 - Fixes for image displaying: show them each at its own position.


See also: 
http://cvs.mmbase.org/viewcvs/contributions/natmm/templates/nmintra/includes
See also: http://www.mmbase.org/jira/browse/NMCMS-602


Index: relatedimage.jsp
===================================================================
RCS file: 
/var/cvs/contributions/natmm/templates/nmintra/includes/relatedimage.jsp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- relatedimage.jsp    31 Oct 2008 12:39:31 -0000      1.7
+++ relatedimage.jsp    3 Nov 2008 17:10:02 -0000       1.8
@@ -1,5 +1,4 @@
 <% 
-
 // ************* inner table to prevent clustering of images  
**********************
 // see the types/images_position at the editwizards
 // <option id="1">rechts</option>
@@ -11,26 +10,24 @@
 // <option id="7">rechts groot</option>
 // <option id="8">links groot</option>
 
-%><mm:related path="posrel,images" orderby="images.title" 
constraints="posrel.pos!='9'" searchdir="destination"
-    ><mm:first
-       ><mm:field name="posrel.pos" jspvar="dummy" vartype="Integer" 
write="false"><%
+%><mm:related path="posrel,images" orderby="images.title" 
constraints="posrel.pos!='9'" searchdir="destination">
+   <mm:field name="posrel.pos" jspvar="dummy" vartype="Integer" write="false">
+    <%
           int posrel_pos = dummy.intValue();  
           if((2<posrel_pos)&&(posrel_pos<5)) { imageTemplate = "+s(80)"; }
-          if((4<posrel_pos)&&(posrel_pos<7)) { imageTemplate = "+s(180)"; }
-          if(6<posrel_pos) { imageTemplate = "+s(400)"; }
+       if((4<posrel_pos)&&(posrel_pos<7)) { imageTemplate = "+s(180)(>)"; }
+       if(6<posrel_pos) { imageTemplate = "+s(400)(>)"; }
         %></mm:field>
-        <table border="0" cellpadding="0" cellspacing="0" 
style="width:80;margin-bottom:5px;" <[EMAIL PROTECTED] 
file="imagesposition.jsp" %>>
-    </mm:first><%
-
+        <table border="0" cellpadding="0" cellspacing="0" <[EMAIL PROTECTED] 
file="imagesposition.jsp" %>>
+    <%
      // ************** inner table with image 
**********************************************
      // ** give table small width otherwise description can push the table to 
large width **
      %><tr><td><div align="center"><img src="<mm:node 
element="images"><mm:image template="<%= imageTemplate %>" /></mm:node
                    >" alt="<mm:field name="images.title" />" 
border="0"></div></td></tr>
-         <mm:field name="images.description" 
-         ><mm:isnotempty
-             ><tr><td><div align="center"><mm:write /><div></td></tr>
+         <mm:field name="images.description">
+         <mm:isnotempty><tr><td><div align="center"><mm:write 
/></div></td></tr>
              <tr><td class="black"><img src="media/spacer.gif" width="1" 
height="1"></td></tr>
              <tr><td><img src="media/spacer.gif" width="1" 
height="5"></td></tr></mm:isnotempty
          ></mm:field
-     ><mm:last></table></mm:last>
+     ></table>
 </mm:related>


Index: imagesposition.jsp
===================================================================
RCS file: 
/var/cvs/contributions/natmm/templates/nmintra/includes/imagesposition.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- imagesposition.jsp  5 Apr 2006 09:23:52 -0000       1.1
+++ imagesposition.jsp  3 Nov 2008 17:10:02 -0000       1.2
@@ -1,6 +1,6 @@
 <mm:field name="posrel.pos" jspvar="posrel_pos" vartype="String" write="false"
 ><% 
 >if(posrel_pos.equals("1")||posrel_pos.equals("3")||posrel_pos.equals("5")||posrel_pos.equals("7")){
 > 
-       %> align="right" <%
+       %> style="width:80;margin:0 0 5px 5px;" align="right" <%
 } else {
-       %> align="left" <%
+       %> style="width:80;margin:0 5px 5px 0;" align="left" <%
 } %></mm:field>
\ No newline at end of file


Index: relatedimage_no_description.jsp
===================================================================
RCS file: 
/var/cvs/contributions/natmm/templates/nmintra/includes/relatedimage_no_description.jsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- relatedimage_no_description.jsp     31 Oct 2008 12:39:31 -0000      1.6
+++ relatedimage_no_description.jsp     3 Nov 2008 17:10:02 -0000       1.7
@@ -1,5 +1,4 @@
 <% 
-
 // ************* inner table to prevent clustering of images  
**********************
 // see the types/images_position at the editwizards
 // <option id="1">rechts</option>
@@ -11,26 +10,24 @@
 // <option id="7">rechts groot</option>
 // <option id="8">links groot</option>
 
-%><mm:related path="posrel,images"
-   constraints="posrel.pos='9'" orderby="images.title" searchdir="destination"
-   ><br/><div align="center"><img src="<mm:node element="images"><mm:image 
template="s(535)" /></mm:node
-      >" alt="<mm:field name="images.title" />" border="0" ></div><br/>
+%><mm:related path="posrel,images" constraints="posrel.pos='9'" 
orderby="images.title" searchdir="destination">
+<br/><div align="center"><img src="<mm:node element="images"><mm:image 
template="s(535)" /></mm:node
+>" alt="<mm:field name="images.title" />" border="0" ></div><br/>
 </mm:related>
 
-<mm:related path="posrel,images" orderby="images.title" 
constraints="posrel.pos!='9'" 
-    ><mm:first
-       ><mm:field name="posrel.pos" jspvar="dummy" vartype="Integer" 
write="false"><%
+<mm:related path="posrel,images" orderby="images.title" 
constraints="posrel.pos!='9'"> 
+    <mm:field name="posrel.pos" jspvar="dummy" vartype="Integer" 
write="false"><%
           int posrel_pos = dummy.intValue();  
           if((2<posrel_pos)&&(posrel_pos<5)) { imageTemplate = "+s(80)"; }
-          if((4<posrel_pos)&&(posrel_pos<7)) { imageTemplate = "+s(180)"; }
-          if(6<posrel_pos) { imageTemplate = "+s(400)"; }
+       if((4<posrel_pos)&&(posrel_pos<7)) { imageTemplate = "+s(180)(>)"; }
+       if(6<posrel_pos) { imageTemplate = "+s(400)(>)"; }
         %></mm:field>
-        <table border="0" cellpadding="0" cellspacing="0" 
style="width:80;margin-bottom:5px;" <[EMAIL PROTECTED] 
file="imagesposition.jsp" %>>
-    </mm:first><%
+     <table border="0" cellpadding="0" cellspacing="0" <[EMAIL PROTECTED] 
file="imagesposition.jsp" %>>
+    <%
 
      // ************** inner table with image 
**********************************************
      // ** give table small width otherwise description can push the table to 
large width **
      %><tr><td><div align="center"><img src="<mm:node 
element="images"><mm:image template="<%= imageTemplate %>" /></mm:node
                    >" alt="<mm:field name="images.title" />" 
border="0"></div></td></tr>
-         <mm:last></table></mm:last>
+      </table>
 </mm:related>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to