Index: openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl 25 Aug 2008 05:39:24 -0000 1.17
+++ openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl 11 Oct 2008 10:54:20 -0000 1.18
@@ -344,6 +344,8 @@
dirname
{border_p "t"}
{link_to_product_p "f"}
+ {image_title "item view"}
+ {image_align ""}
} {
This looks at dirname to see if the thumbnail is there and if
@@ -356,10 +358,13 @@
set linked_thumbnail ""
if { $border_p == "f" } {
- set border_part_of_img_tag " border=\"0\" "
+ set border_part_of_img_tag " border=\"0\" "
} else {
- set border_part_of_img_tag ""
+ set border_part_of_img_tag ""
}
+ if { [string length $image_align] > 0 } {
+ set image_align " align=\"${image_align}\""
+ }
# See if there's an image file (and thumbnail)
# Get the directory where dirname is stored
@@ -372,23 +377,20 @@
set full_dirname "$product_data_directory$file_path"
if { [file exists "$full_dirname/product-thumbnail.jpg"] } {
- set thumbnail_size [ns_jpegsize "$full_dirname/product-thumbnail.jpg"]
+ set thumbnail_size [ns_jpegsize "$full_dirname/product-thumbnail.jpg"]
- if { $link_to_product_p == "f" } {
+ if { $link_to_product_p == "f" } {
- # Try to link to a product.jpg or product.gif
+ # Try to link to a product.jpg or product.gif
- if { [file exists "$full_dirname/product.jpg"] } {
- set linked_thumbnail "
- "
- } elseif { [file exists "$full_dirname/product.gif"] } {
- set linked_thumbnail "
- "
- }
- } else {
- set linked_thumbnail "
- "
- }
+ if { [file exists "$full_dirname/product.jpg"] } {
+ set linked_thumbnail ""
+ } elseif { [file exists "$full_dirname/product.gif"] } {
+ set linked_thumbnail ""
+ }
+ } else {
+ set linked_thumbnail ""
+ }
}
return $linked_thumbnail
}
@@ -1118,7 +1120,12 @@
dirname
{border_p "t"}
{image_title "item view"}
+ {image_align ""}
} {
+@dirname@
+@border_p@
+@image_title@
+@image_align@
This looks at dirname to see if image is there and if
so returns an html IMG fragment that shows image
of the product.
@@ -1129,10 +1136,13 @@
set product_image_html ""
if { $border_p == "f" } {
- set border_part_of_img_tag "border=\"0\""
+ set border_part_of_img_tag "border=\"0\""
} else {
- set border_part_of_img_tag "border=\"1\""
+ set border_part_of_img_tag "border=\"1\""
}
+ if { [string length $image_align] > 0 } {
+ set image_align " align=\"${image_align}\""
+ }
# See if there's an image file
# Get the directory where dirname is stored
@@ -1148,10 +1158,10 @@
if { [file exists "$full_dirname/product.jpg"] } {
set product_image_size [ns_jpegsize "$full_dirname/product.jpg"]
- set product_image_html ""
+ set product_image_html ""
} elseif { [file exists "$full_dirname/product.gif"] } {
set product_image_size [ns_gifsize "$full_dirname/product.gif"]
- set product_image_html ""
+ set product_image_html ""
}
return $product_image_html
@@ -1162,6 +1172,7 @@
dirname
{border_p "t"}
{image_title "item view"}
+ {image_align ""}
} {
This looks at dirname to see if the thumbnail is there and if
@@ -1173,11 +1184,15 @@
set thumbnail ""
if { $border_p == "f" } {
- set border_part_of_img_tag " border=\"0\" "
+ set border_part_of_img_tag " border=\"0\" "
} else {
- set border_part_of_img_tag ""
+ set border_part_of_img_tag ""
}
+ if { [string length $image_align] > 0 } {
+ set image_align " align=\"${image_align}\""
+ }
+
# See if there's an image file (and thumbnail)
# Get the directory where dirname is stored
@@ -1191,7 +1206,7 @@
if { [file exists "$full_dirname/product-thumbnail.jpg"] } {
set thumbnail_size [ns_jpegsize "$full_dirname/product-thumbnail.jpg"]
- set thumbnail ""
+ set thumbnail ""
}
return $thumbnail