Fixed template inconsistencies.

This commit is contained in:
JT Smith 2002-12-01 18:42:27 +00:00
parent fdf7c82dd2
commit f2b46efa00
2 changed files with 36 additions and 54 deletions

View file

@ -984,8 +984,13 @@ INSERT INTO template VALUES (1,'Default USS','<tmpl_if displayTitle>\r\n <h1>
INSERT INTO template VALUES (2,'Traditional with Thumbnails','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n\r\n<tmpl_if session.scratch.search>\r\n <tmpl_var search.form>\r\n</tmpl_if>\r\n\r\n\r\n<table width=\"100%\" cellpadding=2 cellspacing=1 border=0><tr>\r\n<td align=\"right\" class=\"tableMenu\">\r\n\r\n<tmpl_if canPost>\r\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a> &middot;\r\n</tmpl_if>\r\n\r\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a>\r\n\r\n</td></tr></table>\r\n\r\n<table width=\"100%\" cellspacing=1 cellpadding=2 border=0>\r\n<tr>\r\n<td class=\"tableHeader\"><tmpl_var title.label></td>\r\n<td class=\"tableHeader\"><tmpl_var thumbnail.label></td>\r\n<td class=\"tableHeader\"><tmpl_var date.label></td>\r\n<td class=\"tableHeader\"><tmpl_var by.label></td>\r\n</tr>\r\n\r\n<tmpl_loop submissions_loop>\r\n\r\n<tr>\r\n<td class=\"tableData\">\r\n <a href=\"<tmpl_var submission.URL>\"> <tmpl_var submission.title>\r\n <tmpl_if submission.currentUser>\r\n (<tmpl_var submission.status>)\r\n </tmpl_if>\r\n</td>\r\n <td class=\"tableData\">\r\n <tmpl_if submission.thumbnail>\r\n <a href=\"<tmpl_var submission.url>\"><img src=\"<tmpl_var submission.thumbnail>\" border=\"0\"></a>\r\n </tmpl_if>\r\n </td>\r\n\r\n<td class=\"tableData\"><tmpl_var submission.date></td>\r\n<td class=\"tableData\"><a href=\"<tmpl_var submission.userProfile>\"><tmpl_var submission.username></a></td>\r\n</tr>\r\n\r\n</tmpl_loop>\r\n\r\n</table>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> &middot; <tmpl_var pageList> &middot; <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n\r\n','USS');
INSERT INTO template VALUES (3,'Weblog','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n\r\n<tmpl_if session.scratch.search>\r\n <tmpl_var search.form>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<tmpl_if canPost>\r\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a> &middot;\r\n</tmpl_if>\r\n\r\n\r\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a>\r\n<p/>\r\n<table width=\"100%\" cellpadding=2 cellspacing=1 border=0>\r\n\r\n<tmpl_loop submissions_loop>\r\n\r\n<tr><td class=\"tableHeader\"><tmpl_var submission.title>\r\n <tmpl_if submission.currentUser>\r\n (<tmpl_var submission.status>)\r\n </tmpl_if>\r\n</td></tr><tr><td class=\"tableData\"><b>\r\n <tmpl_if submission.thumbnail>\r\n <a href=\"<tmpl_var submission.url>\"><img src=\"<tmpl_var submission.thumbnail>\" border=\"0\" align=\"right\"/></a>\r\n </tmpl_if>\r\n <tmpl_var by.label> <a href=\"<tmpl_var submission.userProfile>\"><tmpl_var submission.username></a> - <tmpl_var submission.date></b><br/>\r\n<tmpl_var submission.content>\r\n<p/> ( <a href=\"<tmpl_var submission.url>\"><tmpl_var readmore.label></a>\r\n <tmpl_if submission.responses>\r\n | <tmpl_var submission.responses> <tmpl_var responses.label>\r\n </tmpl_if>\r\n )<p/>\r\n</td></tr>\r\n\r\n</tmpl_loop>\r\n\r\n</table>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> &middot; <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n','USS');
INSERT INTO template VALUES (4,'Photo Gallery','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<tmpl_if session.scratch.search>\r\n <tmpl_var search.form>\r\n</tmpl_if>\r\n\r\n<tmpl_if canPost>\r\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a> &middot;\r\n</tmpl_if>\r\n\r\n\r\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a><p/>\r\n\r\n<table width=\"100%\" cellpadding=2 cellspacing=1 border=0>\r\n<tr>\r\n<tmpl_loop submissions_loop>\r\n\r\n<td align=\"center\" class=\"tableData\">\r\n \r\n <tmpl_if submission.thumbnail>\r\n <a href=\"<tmpl_var submission.url>\"><img src=\"<tmpl_var submission.thumbnail>\" border=\"0\"/></a><br/>\r\n </tmpl_if>\r\n <a href=\"<tmpl_var submission.url>\"><tmpl_var submission.title></a>\r\n <tmpl_if submission.currentUser>\r\n (<tmpl_var submission.status>)\r\n </tmpl_if>\r\n</td>\r\n\r\n<tmpl_if submission.thirdColumn>\r\n </tr><tr>\r\n</tmpl_if>\r\n\r\n</tmpl_loop>\r\n</tr>\r\n</table>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> &middot; <tmpl_var pageList> &middot; <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n','USS');
INSERT INTO template VALUES (5,'Classifieds','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<tmpl_if session.scratch.search>\r\n <tmpl_var search.form>\r\n</tmpl_if>\r\n\r\n<tmpl_if canPost>\r\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a> &middot;\r\n</tmpl_if>\r\n\r\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a><p/>\r\n\r\n<table width=\"100%\" cellpadding=3 cellspacing=0 border=0>\r\n<tr>\r\n<tmpl_loop submissions_loop>\r\n\r\n<td valign=\"top\" class=\"tableData\" width=\"33%\" style=\"border: 1px dotted black; padding: 10px;\">\r\n <h2><a href=\"<tmpl_var submission.url>\"><tmpl_var submission.title></a></h2>\r\n <tmpl_if submission.currentUser>\r\n (<tmpl_var submission.status>)\r\n </tmpl_if>\r\n<br/>\r\n <tmpl_if submission.thumbnail>\r\n <a href=\"<tmpl_var submission.url>\"><img src=\"<tmpl_var submission.thumbnail>\" border=\"0\"/ align=\"right\"></a><br/>\r\n </tmpl_if>\r\n<tmpl_var submission.content>\r\n</td>\r\n\r\n<tmpl_if submission.thirdColumn>\r\n </tr><tr>\r\n</tmpl_if>\r\n\r\n</tmpl_loop>\r\n</tr>\r\n</table>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> · <tmpl_var pageList> · <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n','USS');
INSERT INTO template VALUES (5,'Classifieds','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<tmpl_if session.scratch.search>\r\n <tmpl_var search.form>\r\n</tmpl_if>\r\n\r\n<tmpl_if canPost>\r\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a> &middot;\r\n</tmpl_if>\r\n\r\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a><p/>\r\n\r\n<table width=\"100%\" cellpadding=3 cellspacing=0 border=0>\r\n<tr>\r\n<tmpl_loop submissions_loop>\r\n\r\n<td valign=\"top\" class=\"tableData\" width=\"33%\" style=\"border: 1px dotted #aaaaaa; padding: 10px;\">\r\n <h2><a href=\"<tmpl_var submission.url>\"><tmpl_var submission.title></a></h2>\r\n <tmpl_if submission.currentUser>\r\n (<tmpl_var submission.status>)\r\n </tmpl_if>\r\n<br/>\r\n <tmpl_if submission.thumbnail>\r\n <a href=\"<tmpl_var submission.url>\"><img src=\"<tmpl_var submission.thumbnail>\" border=\"0\"/ align=\"right\"></a><br/>\r\n </tmpl_if>\r\n<tmpl_var submission.content>\r\n</td>\r\n\r\n<tmpl_if submission.thirdColumn>\r\n </tr><tr>\r\n</tmpl_if>\r\n\r\n</tmpl_loop>\r\n</tr>\r\n</table>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> · <tmpl_var pageList> · <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n','USS');
INSERT INTO template VALUES (6,'Guest Book','<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<tmpl_if canPost>\r\n <a href=\"<tmpl_var post.url>\"><tmpl_var post.label></a> <p/>\r\n</tmpl_if>\r\n\r\n\r\n<tmpl_loop submissions_loop>\r\n\r\n<tmpl_if __odd__>\r\n<div class=\"highlight\">\r\n</tmpl_if>\r\n\r\n<b>On <tmpl_var submission.date> <a href=\"<tmpl_var submission.userProfile>\"><tmpl_var submission.username></a> from <a href=\"<tmpl_var submission.url>\">the <tmpl_var submission.title> department</a> wrote</b>, <i><tmpl_var submission.content></i>\r\n\r\n<tmpl_if __odd__>\r\n</div >\r\n</tmpl_if>\r\n\r\n<p/>\r\n\r\n</tmpl_loop>\r\n\r\n<tmpl_if multiplePages>\r\n <div class=\"pagination\">\r\n <tmpl_var previousPage> · <tmpl_var nextPage>\r\n </div>\r\n</tmpl_if>\r\n','USS');
delete from template where namespace='Product' and templateId<1000;
INSERT INTO template VALUES (1,'Default Product','<style>\r\n.productFeatureHeader,.productSpecificationHeader,.productRelatedHeader,.productAccessoryHeader, .productBenefitHeader {\r\n font-weight: bold;\r\n font-size: 15px;\r\n}\r\n.productFeature,.productSpecification,.productRelated,.productAccessory, .productBenefit {\r\n font-size: 12px;\r\n}\r\n.productAttributeSeperator {\r\n background-color: black;\r\n}\r\n</style>\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n <td class=\"content\" valign=\"top\">\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<tmpl_if price>\r\n <b>Price:</b> <tmpl_var price><br/>\r\n</tmpl_if>\r\n\r\n<tmpl_if productnumber>\r\n <b>Product Number:</b> <tmpl_var productNumber><br/>\r\n</tmpl_if>\r\n\r\n<br>\r\n\r\n<tmpl_if brochure.url>\r\n <a href=\"<tmpl_var brochure.url>\"><img src=\"<tmpl_var brochure.icon>\" border=0 align=\"absmiddle\"><tmpl_var brochure.label></a><br/>\r\n</tmpl_if>\r\n\r\n<tmpl_if manual.url>\r\n <a href=\"<tmpl_var manual.url>\"><img src=\"<tmpl_var manual.icon>\" border=0 align=\"absmiddle\"><tmpl_var manual.label></a><br/>\r\n</tmpl_if>\r\n\r\n<tmpl_if warranty.url>\r\n <a href=\"<tmpl_var warranty.url>\"><img src=\"<tmpl_var warranty.icon>\" border=0 align=\"absmiddle\"><tmpl_var warranty.label></a><br/>\r\n</tmpl_if>\r\n\r\n </td>\r\n\r\n<td valign=\"top\">\r\n<tmpl_if thumbnail1>\r\n <a href=\"<tmpl_var image1>\"><img src=\"<tmpl_var thumbnail1>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n<tmpl_if thumbnail2>\r\n <a href=\"<tmpl_var image2>\"><img src=\"<tmpl_var thumbnail2>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n<tmpl_if thumbnail3>\r\n <a href=\"<tmpl_var image3>\"><img src=\"<tmpl_var thumbnail3>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n </td>\r\n</tr>\r\n</table>\r\n\r\n\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\">\r\n<tr>\r\n<td valign=\"top\" class=\"productFeature\"><div class=\"productFeatureHeader\">Features</div>\r\n\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addfeature.url>\"><tmpl_var addfeature.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop feature_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var feature.controls></tmpl_if><tmpl_var feature.feature><br/>\r\n</tmpl_loop>\r\n<p/>\r\n</td>\r\n\r\n <td class=\"productAttributeSeperator\"><img src=\"^Extras;spacer.gif\" width=\"1\" height=\"1\"></td>\r\n\r\n <td valign=\"top\" class=\"productBenefit\"><div class=\"productBenefitHeader\">Benefits</div>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addBenefit.url>\"><tmpl_var addBenefit.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop benefit_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var benefit.controls></tmpl_if><tmpl_var benefit.benefit><br/>\r\n</tmpl_loop>\r\n<p/></td>\r\n\r\n <td class=\"productAttributeSeperator\"><img src=\"^Extras;spacer.gif\" width=\"1\" height=\"1\"></td>\r\n\r\n <td valign=\"top\" class=\"productSpecification\"><div class=\"productSpecificationHeader\">Specifications</div>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addSpecification.url>\"><tmpl_var addSpecification.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop specification_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var specification.controls></tmpl_if><b><tmpl_var specification.label>:</b> <tmpl_var specification.specification> <tmpl_var specification.units><br/>\r\n</tmpl_loop>\r\n<p/></td>\r\n\r\n <td class=\"productAttributeSeperator\"><img src=\"^Extras;spacer.gif\" width=\"1\" height=\"1\"></td>\r\n\r\n <td valign=\"top\" class=\"productAccessory\"><div class=\"productAccessoryHeader\">Accessories</div>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addaccessory.url>\"><tmpl_var addaccessory.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop accessory_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var accessory.controls></tmpl_if><a href=\"<tmpl_var accessory.url>\"><tmpl_var accessory.title></a><br/>\r\n</tmpl_loop>\r\n<p/></td>\r\n\r\n <td class=\"productAttributeSeperator\"><img src=\"^Extras;spacer.gif\" width=\"1\" height=\"1\"></td>\r\n\r\n <td valign=\"top\" class=\"productRelated\"><div class=\"productRelatedHeader\">Related Products</div>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addRelatedProduct.url>\"><tmpl_var addRelatedProduct.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop relatedproduct_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var RelatedProduct.controls></tmpl_if><a href=\"<tmpl_var relatedproduct.url>\"><tmpl_var relatedproduct.title></a><br/>\r\n</tmpl_loop>\r\n</td>\r\n\r\n</tr>\r\n</table>\r\n\r\n','Product');
INSERT INTO template VALUES (2,'Benefits Showcase','<style>\r\n.productOptions {\r\n font-family: Helvetica, Arial, sans-serif;\r\n font-size: 11px;\r\n}\r\n</style>\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n\r\n<tmpl_if image1>\r\n <img src=\"<tmpl_var image1>\" border=\"0\" /><p/>\r\n</tmpl_if>\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n <td class=\"content\" valign=\"top\" width=\"66%\"><tmpl_if description>\r\n<tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n <b>Benefits</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addBenefit.url>\"><tmpl_var addBenefit.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop benefit_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var benefit.controls></tmpl_if><tmpl_var benefit.benefit><br/>\r\n</tmpl_loop>\r\n\r\n </td>\r\n <td valign=\"top\" width=\"34%\" class=\"productOptions\">\r\n\r\n<tmpl_if thumbnail2>\r\n <a href=\"<tmpl_var image2>\"><img src=\"<tmpl_var thumbnail2>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n\r\n<b>Specifications</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addSpecification.url>\"><tmpl_var addSpecification.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop specification_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var specification.controls></tmpl_if><b><tmpl_var specification.label>:</b> <tmpl_var specification.specification> <tmpl_var specification.units><br/>\r\n</tmpl_loop>\r\n\r\n<b>Options</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addaccessory.url>\"><tmpl_var addaccessory.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop accessory_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var accessory.controls></tmpl_if><a href=\"<tmpl_var accessory.url>\"><tmpl_var accessory.title></a><br/>\r\n</tmpl_loop>\r\n\r\n<b>Other Products</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addRelatedProduct.url>\"><tmpl_var addRelatedProduct.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop relatedproduct_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var RelatedProduct.controls></tmpl_if><a href=\"<tmpl_var relatedproduct.url>\"><tmpl_var relatedproduct.title></a><br/>\r\n</tmpl_loop>\r\n\r\n </td>\r\n</tr>\r\n</table>\r\n\r\n','Product');
INSERT INTO template VALUES (3,'Three Columns','<style>\r\n.productFeatureHeader,.productSpecificationHeader,.productRelatedHeader,.productAccessoryHeader, .productBenefitHeader {\r\n font-weight: bold;\r\n font-size: 15px;\r\n}\r\n.productFeature,.productSpecification,.productRelated,.productAccessory, .productBenefit {\r\n font-size: 12px;\r\n}\r\n\r\n</style>\r\n\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p />\r\n</tmpl_if>\r\n\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n <td align=\"center\">\r\n<tmpl_if thumbnail1>\r\n <a href=\"<tmpl_var image1>\"><img src=\"<tmpl_var thumbnail1>\" border=\"0\" /></a>\r\n</tmpl_if>\r\n</td>\r\n <td align=\"center\">\r\n<tmpl_if thumbnail2>\r\n <a href=\"<tmpl_var image2>\"><img src=\"<tmpl_var thumbnail2>\" border=\"0\" /></a>\r\n</tmpl_if>\r\n</td>\r\n <td align=\"center\">\r\n<tmpl_if thumbnail3>\r\n <a href=\"<tmpl_var image3>\"><img src=\"<tmpl_var thumbnail3>\" border=\"0\" /></a>\r\n</tmpl_if>\r\n</td>\r\n</tr>\r\n</table>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\" width=\"100%\">\r\n<tr>\r\n <td valign=\"top\" class=\"tableData\" width=\"35%\">\r\n\r\n<b>Features</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addfeature.url>\"><tmpl_var addfeature.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop feature_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var feature.controls></tmpl_if><tmpl_var feature.feature><br/>\r\n</tmpl_loop>\r\n<p/>\r\n\r\n<b>Benefits</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addBenefit.url>\"><tmpl_var addBenefit.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop benefit_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var benefit.controls></tmpl_if><tmpl_var benefit.benefit><br/>\r\n</tmpl_loop>\r\n<p/>\r\n\r\n</td>\r\n <td valign=\"top\" class=\"tableData\" width=\"35%\">\r\n\r\n<b>Specifications</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addSpecification.url>\"><tmpl_var addSpecification.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop specification_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var specification.controls></tmpl_if><b><tmpl_var specification.label>:</b> <tmpl_var specification.specification> <tmpl_var specification.units><br/>\r\n</tmpl_loop>\r\n<p/>\r\n\r\n<b>Accessories</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addaccessory.url>\"><tmpl_var addaccessory.label></a><p />\r\n</tmpl_if>\r\n\r\n<tmpl_loop accessory_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var accessory.controls></tmpl_if><a href=\"<tmpl_var accessory.url>\"><tmpl_var accessory.title></a><br/>\r\n</tmpl_loop>\r\n<p/>\r\n\r\n<b>Related Products</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addRelatedProduct.url>\"><tmpl_var addRelatedProduct.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop relatedproduct_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var RelatedProduct.controls></tmpl_if><a href=\"<tmpl_var relatedproduct.url>\"><tmpl_var relatedproduct.title></a><br/>\r\n</tmpl_loop>\r\n<p/>\r\n</td>\r\n <td class=\"tableData\" valign=\"top\" width=\"30%\">\r\n <tmpl_if price> \r\n <b>Price:</b> <tmpl_var price><br/>\r\n</tmpl_if>\r\n\r\n<tmpl_if productnumber>\r\n <b>Product Number:</b> <tmpl_var productNumber><br/>\r\n</tmpl_if>\r\n<br>\r\n<tmpl_if brochure.url>\r\n <a href=\"<tmpl_var brochure.url>\"><img src=\"<tmpl_var brochure.icon>\" border=0 align=\"absmiddle\"><tmpl_var brochure.label></a><br/>\r\n</tmpl_if>\r\n<tmpl_if manual.url>\r\n <a href=\"<tmpl_var manual.url>\"><img src=\"<tmpl_var manual.icon>\" border=0 align=\"absmiddle\"><tmpl_var manual.label></a><br/>\r\n</tmpl_if>\r\n<tmpl_if warranty.url>\r\n <a href=\"<tmpl_var warranty.url>\"><img src=\"<tmpl_var warranty.icon>\" border=0 align=\"absmiddle\"><tmpl_var warranty.label></a><br/>\r\n</tmpl_if>\r\n </td>\r\n</tr>\r\n</table>\r\n\r\n\r\n','Product');
INSERT INTO template VALUES (4,'Left Column Collateral','<style>\r\n.productCollateral {\r\n font-size: 11px;\r\n}\r\n</style>\r\n\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n\r\n<table width=\"100%\">\r\n<tr><td valign=\"top\" class=\"productCollateral\" width=\"100\">\r\n<img src=\"^Extras;spacer.gif\" width=\"100\" height=\"1\"><br/>\r\n<tmpl_if brochure.url>\r\n <a href=\"<tmpl_var brochure.url>\"><img src=\"<tmpl_var brochure.icon>\" border=0 align=\"absmiddle\"><tmpl_var brochure.label></a><br/>\r\n</tmpl_if>\r\n<tmpl_if manual.url>\r\n <a href=\"<tmpl_var manual.url>\"><img src=\"<tmpl_var manual.icon>\" border=0 align=\"absmiddle\"><tmpl_var manual.label></a><br/>\r\n</tmpl_if>\r\n<tmpl_if warranty.url>\r\n <a href=\"<tmpl_var warranty.url>\"><img src=\"<tmpl_var warranty.icon>\" border=0 align=\"absmiddle\"><tmpl_var warranty.label></a><br//>\r\n</tmpl_if>\r\n<br/>\r\n<div align=\"center\">\r\n<tmpl_if thumbnail1>\r\n <a href=\"<tmpl_var image1>\"><img src=\"<tmpl_var thumbnail1>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n<tmpl_if thumbnail2>\r\n <a href=\"<tmpl_var image2>\"><img src=\"<tmpl_var thumbnail2>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n<tmpl_if thumbnail3>\r\n <a href=\"<tmpl_var image3>\"><img src=\"<tmpl_var thumbnail3>\" border=\"0\" /></a><p/>\r\n</tmpl_if>\r\n</div>\r\n</td><td valign=\"top\" class=\"content\" width=\"100%\">\r\n<tmpl_if description>\r\n<tmpl_var description><p/>\r\n</tmpl_if>\r\n\r\n<b>Specs:</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addSpecification.url>\"><tmpl_var addSpecification.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop specification_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var specification.controls></tmpl_if><b><tmpl_var specification.label>:</b> <tmpl_var specification.specification> <tmpl_var specification.units><br/>\r\n</tmpl_loop>\r\n<p>\r\n\r\n<b>Features:</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addfeature.url>\"><tmpl_var addfeature.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop feature_loop>\r\n ·<tmpl_if session.var.adminOn><tmpl_var feature.controls></tmpl_if><tmpl_var feature.feature><br/>\r\n</tmpl_loop>\r\n<p>\r\n\r\n<b>Options:</b><br/>\r\n<tmpl_if session.var.adminOn>\r\n <a href=\"<tmpl_var addaccessory.url>\"><tmpl_var addaccessory.label></a><p />\r\n</tmpl_if>\r\n<tmpl_loop accessory_loop>\r\n &middot;<tmpl_if session.var.adminOn><tmpl_var accessory.controls></tmpl_if><a href=\"<tmpl_var accessory.url>\"><tmpl_var accessory.title></a><br/>\r\n</tmpl_loop>\r\n\r\n</td></tr>\r\n</table>\r\n','Product');

View file

@ -503,10 +503,8 @@ sub www_moveSpecificationUp {
#-------------------------------------------------------------------
sub www_view {
my ($output, %data, $sth, $file, $segment, $template, %var, @featureloop, @benefitloop, @specificationloop,
@accessoryloop, @relatedloop);
my (%data, $sth, $file, $segment, %var, @featureloop, @benefitloop, @specificationloop, @accessoryloop, @relatedloop);
tie %data, 'Tie::CPHash';
$output = $_[0]->displayTitle;
#---brochure
if ($_[0]->get("brochure")) {
$file = WebGUI::Attachment->new($_[0]->get("brochure"),$_[0]->get("wobjectId"));
@ -548,19 +546,15 @@ sub www_view {
}
#---features
if ($session{var}{adminOn}) {
$var{addFeature} = '<a href="'.WebGUI::URL::page('func=editFeature&fid=new&wid='
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(34,$namespace).'</a>';
}
$var{"addFeature.url"} = WebGUI::URL::page('func=editFeature&fid=new&wid='.$_[0]->get("wobjectId"));
$var{"addFeature.label"} = WebGUI::International::get(34,$namespace);
$sth = WebGUI::SQL->read("select feature,Product_featureId from Product_feature where wobjectId="
.$_[0]->get("wobjectId")." order by sequenceNumber");
while (%data = $sth->hash) {
if ($session{var}{adminOn}) {
$segment = deleteIcon('func=deleteFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId})
.editIcon('func=editFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId})
.moveUpIcon('func=moveFeatureUp&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId})
.moveDownIcon('func=moveFeatureDown&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId});
}
$segment = deleteIcon('func=deleteFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId})
.editIcon('func=editFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId})
.moveUpIcon('func=moveFeatureUp&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId})
.moveDownIcon('func=moveFeatureDown&wid='.$_[0]->get("wobjectId").'&fid='.$data{Product_featureId});
push(@featureloop,{
"feature.feature"=>$data{feature},
"feature.controls"=>$segment
@ -570,19 +564,15 @@ sub www_view {
$var{feature_loop} = \@featureloop;
#---benefits
if ($session{var}{adminOn}) {
$var{addBenefit} = '<a href="'.WebGUI::URL::page('func=editBenefit&fid=new&wid='
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(55,$namespace).'</a><p/>';
}
$var{"addBenefit.url"} = WebGUI::URL::page('func=editBenefit&fid=new&wid='.$_[0]->get("wobjectId"));
$var{"addBenefit.label"} = WebGUI::International::get(55,$namespace);
$sth = WebGUI::SQL->read("select benefit,Product_benefitId from Product_benefit where wobjectId="
.$_[0]->get("wobjectId")." order by sequenceNumber");
while (%data = $sth->hash) {
if ($session{var}{adminOn}) {
$segment = deleteIcon('func=deleteBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId})
.editIcon('func=editBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId})
.moveUpIcon('func=moveBenefitUp&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId})
.moveDownIcon('func=moveBenefitDown&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId});
}
$segment = deleteIcon('func=deleteBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId})
.editIcon('func=editBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId})
.moveUpIcon('func=moveBenefitUp&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId})
.moveDownIcon('func=moveBenefitDown&wid='.$_[0]->get("wobjectId").'&bid='.$data{Product_benefitId});
push(@benefitloop,{
"benefit.benefit"=>$data{benefit},
"benefit.controls"=>$segment
@ -592,19 +582,15 @@ sub www_view {
$var{benefit_loop} = \@benefitloop;
#---specifications
if ($session{var}{adminOn}) {
$var{addSpecification} = '<a href="'.WebGUI::URL::page('func=editSpecification&sid=new&wid='
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(35,$namespace).'</a><p/>';
}
$var{"addSpecification.url"} = WebGUI::URL::page('func=editSpecification&sid=new&wid='.$_[0]->get("wobjectId"));
$var{"addSpecification.label"} = WebGUI::International::get(35,$namespace);
$sth = WebGUI::SQL->read("select name,value,units,Product_specificationId from Product_specification
where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber");
while (%data = $sth->hash) {
if ($session{var}{adminOn}) {
$segment = deleteIcon('func=deleteSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId})
.editIcon('func=editSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId})
.moveUpIcon('func=moveSpecificationUp&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId})
.moveDownIcon('func=moveSpecificationDown&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId});
}
$segment = deleteIcon('func=deleteSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId})
.editIcon('func=editSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId})
.moveUpIcon('func=moveSpecificationUp&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId})
.moveDownIcon('func=moveSpecificationDown&wid='.$_[0]->get("wobjectId").'&sid='.$data{Product_specificationId});
push(@specificationloop,{
"specification.controls"=>$segment,
"specification.specification"=>$data{value},
@ -616,21 +602,17 @@ sub www_view {
$var{specification_loop} = \@specificationloop;
#---accessories
if ($session{var}{adminOn}) {
$var{addaccessory} = '<a href="'.WebGUI::URL::page('func=addAccessory&wid='
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(36,$namespace).'</a><p/>';
}
$var{"addaccessory.url"} = WebGUI::URL::page('func=addAccessory&wid='.$_[0]->get("wobjectId"));
$var{"addaccessory.label"} = WebGUI::International::get(36,$namespace);
$sth = WebGUI::SQL->read("select wobject.title,page.urlizedTitle,Product_accessory.accessoryWobjectId
from Product_accessory,wobject,page
where Product_accessory.wobjectId=".$_[0]->get("wobjectId")."
and Product_accessory.accessoryWobjectId=wobject.wobjectId
and wobject.pageId=page.pageId order by Product_accessory.sequenceNumber");
while (%data = $sth->hash) {
if ($session{var}{adminOn}) {
$segment = deleteIcon('func=deleteAccessory&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId})
.moveUpIcon('func=moveAccessoryUp&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId})
.moveDownIcon('func=moveAccessoryDown&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId});
}
$segment = deleteIcon('func=deleteAccessory&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId})
.moveUpIcon('func=moveAccessoryUp&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId})
.moveDownIcon('func=moveAccessoryDown&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId});
push(@accessoryloop,{
"accessory.URL"=>WebGUI::URL::gateway($data{urlizedTitle}),
"accessory.title"=>$data{title},
@ -641,22 +623,17 @@ sub www_view {
$var{accessory_loop} = \@accessoryloop;
#---related
if ($session{var}{adminOn}) {
$var{addrelatedproduct} = '<a href="'.WebGUI::URL::page('func=addRelated&wid='
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(37,$namespace).'</a><p/>';
}
$var{"addrelatedproduct.url"} = WebGUI::URL::page('func=addRelated&wid='.$_[0]->get("wobjectId"));
$var{"addrelatedproduct.label"} = WebGUI::International::get(37,$namespace);
$sth = WebGUI::SQL->read("select wobject.title,page.urlizedTitle,Product_related.relatedWobjectId
from Product_related,wobject,page
where Product_related.wobjectId=".$_[0]->get("wobjectId")."
and Product_related.relatedWobjectId=wobject.wobjectId
and wobject.pageId=page.pageId order by Product_related.sequenceNumber");
while (%data = $sth->hash) {
if ($session{var}{adminOn}) {
$segment = deleteIcon('func=deleteRelated&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId})
.moveUpIcon('func=moveRelatedUp&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId})
.moveDownIcon('func=moveRelatedDown&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId});
}
$segment .= '&middot;<a href="'.WebGUI::URL::gateway($data{urlizedTitle}).'">'.$data{title}.'</a><br>';
$segment = deleteIcon('func=deleteRelated&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId})
.moveUpIcon('func=moveRelatedUp&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId})
.moveDownIcon('func=moveRelatedDown&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId});
push(@relatedloop,{
"relatedproduct.URL"=>WebGUI::URL::gateway($data{urlizedTitle}),
"relatedproduct.title"=>$data{title},
@ -665,7 +642,7 @@ sub www_view {
}
$sth->finish;
$var{relatedproduct_loop} = \@relatedloop;
return $_[0]->processMacros($output.$_[0]->processTemplate($_[0]->get("templateId"),\%var));
return $_[0]->processMacros($_[0]->processTemplate($_[0]->get("templateId"),\%var));
}