[interchange-cvs] interchange - jon modified 2 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Apr 29 16:10:00 2002


User:      jon
Date:      2002-04-29 20:09:06 GMT
Modified:  dist/foundation/pages Tag: STABLE_4_8-branch
Modified:           advancedsearch.html results.html
Log:
Fix coordinated search, merging from development trunk.

Revision  Changes    Path
No                   revision



No                   revision



2.0.2.2   +102 -110  interchange/dist/foundation/pages/advancedsearch.html


rev 2.0.2.2, prev_rev 2.0.2.1
Index: advancedsearch.html
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/pages/advancedsearch.html,v
retrieving revision 2.0.2.1
retrieving revision 2.0.2.2
diff -u -u -r2.0.2.1 -r2.0.2.2
--- advancedsearch.html	1 Mar 2002 06:45:35 -0000	2.0.2.1
+++ advancedsearch.html	29 Apr 2002 20:09:05 -0000	2.0.2.2
@@ -9,125 +9,117 @@
 
 [control reset=1]
 
-			[control-set]
-			[component]search_box_small[/component]
-			[/control-set]
-
-			[tmp use_tiny_cart]1[/tmp]
-			[if scratch use_tiny_cart]
-			  [control-set]
-			  [component]cart_tiny[/component]
-			  [/control-set]
-			[else]
-			  [control-set]
-			  [component][/component]
-			  [/control-set]
-			[/else]
-			[/if]
-
-			[control-set]
-			[component]category_vertical[/component]
-			[/control-set]
-
-			[control-set]
-			[component][/component]
-			[/control-set]
-
-			[control-set]
-			[component]cross_horizontal[/component]
-			[size]2[/size]
-			[cols]2[/cols]
-			[banner]Specials[/banner]
-			[/control-set]
-
-			[control-set]
-			[component]random[/component]
-			[size]3[/size]
-			[cols]1[/cols]
-			[banner]See also...[/banner]
-			[/control-set]			
-					
+[control-set]
+[component]search_box_small[/component]
+[/control-set]
+
+[control-set]
+[component]cart_tiny[/component]
+[/control-set]
+
+[control-set]
+[component]category_vertical[/component]
+[/control-set]
+
+[control-set]
+[component][/component]
+[/control-set]
+
+[control-set]
+[component]cross_horizontal[/component]
+[size]2[/size]
+[cols]2[/cols]
+[banner]Specials[/banner]
+[/control-set]
+
+[control-set]
+[component]random[/component]
+[size]3[/size]
+[cols]1[/cols]
+[banner]See also...[/banner]
+[/control-set]
+
 [control reset=1]
 
 @_LEFTRIGHT_TOP_@
 
 <!-- BEGIN CONTENT -->
 
+[tmp matchlimit]10[/tmp]
+
 <table width="95%" border="0">
-<tr> 
-  <td>
-    <br>
-
-	<big><b>Advanced Search</b></big>
-	<br><br> 
-
-	<form action="[area search]" method=post>
-    <input type=hidden name=mv_session_id value="[data session id]">
-	[set asearch]su=yes/fi=products[/set]
-        <input type=hidden name=mv_profile value=asearch>
-	<table>
-	<tr>
-	  <td>
-	    <b>Search by Field:</b><br>
-	    Search for  
-		<input type="text" name=mv_searchspec>
-          in the 
-              <select name=mv_search_field>
-		<option value="description">Description
-              	<option value="sku">SKU
-		<option value="price">Price
-		<option value="weight">Weight
-		<option value="color">Color
-		<option value="size__MVC_FIELDMUNGE__">Size		 
-	      </select>
-
-          field. 
-		  <input type="image" alt="Search" src="__THEME_IMG_DIR__go.gif" border=0>
-      </td>
-    </tr>
-	</table>
-	</form>
-
-  <form action="[area search]" method=post>
-  <input type=hidden name=mv_session_id value="[data session id]">
-  <input type=hidden name=mv_substring_match value="Yes">
-  <input type=hidden name=mv_search_map value="
-    mv_searchspec=search1
-    mv_searchspec=search2
-    ">
-  <input type=hidden name=mv_search_field value="category">
-  <input type=hidden name=mv_search_field value="*">
-
-  <table>
-  <tr>
-    <td>
-      <b>Search by Category:</b><br>
-      Search for  
-      <input type="text" name=search2 value=""> 
-      in the 
-      <select name=search1>
-                  [loop option=category search="
-                        ra=yes
-                        fi=cat
-						st=db
-                        rf=name
-                        ml=1000
-                        tf=name
-						un=1
-                  "]
-                  <option>[loop-code]</option>
-                  [/loop]
-  </select>
-   category.  
-      <input type="image" alt="Search" src="__THEME_IMG_DIR__go.gif" border=0>
-
-    </td>
-  </tr>
-  </table>
+<tr>
+<td>
+<br>
+
+<big><b>Advanced Search</b></big>
+<br><br>
+
+<p>
+<form action="[area search]" method=post>
+<input type=hidden name=mv_session_id value="[data session id]">
+[seti asearch]
+fi=products
+st=db
+su=yes
+ml=[scratch matchlimit]
+[/seti]
+<input type=hidden name=mv_profile value=asearch>
+<b>Search by Field:</b><br>
+Search for
+<input type=text name=mv_searchspec size=20 maxlength=30>
+in
+<select name=mv_search_field>
+[loop
+	lr=1
+	list="*	all fields
+description	Description
+sku	SKU
+price	Price
+weight	Weight
+color	Color
+size__MVC_FIELDMUNGE__	Size
+"]
+<option value="[loop-code]"[selected mv_search_field [loop-code]]>[loop-pos 1]
+[/loop]
+</select>
+&nbsp;
+<input type="image" alt="Search" src="__THEME_IMG_DIR__go.gif" border=0>
+</form>
+</p>
+
+<p>
+<form action="[area search]" method=post>
+<input type=hidden name=mv_session_id value="[data session id]">
+<input type=hidden name=mv_matchlimit value=[scratch matchlimit]>
+<input type=hidden name=mv_substring_match value="Yes">
+
+<b>Search by Category:</b><br>
+Search for
+<input type=text name=mv_searchspec size=20 maxlength=30>
+in the category
+<select name=mv_searchspec>
+[loop
+	search="
+		fi=cat
+		st=db
+		ra=yes
+		rf=name
+		ml=1000
+		tf=name
+		un=1
+	"
+]
+<option>[loop-code]
+[/loop]
+</select>
+&nbsp;
+<input type="image" alt="Search" src="__THEME_IMG_DIR__go.gif" border=0>
+</p>
 
-  </form>
+</form>
 
-  </td>
+</td>
 </tr>
 </table>
 



2.1.2.1   +15 -16    interchange/dist/foundation/pages/results.html


rev 2.1.2.1, prev_rev 2.1
Index: results.html
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/pages/results.html,v
retrieving revision 2.1
retrieving revision 2.1.2.1
diff -u -u -r2.1 -r2.1.2.1
--- results.html	23 Jul 2001 18:59:40 -0000	2.1
+++ results.html	29 Apr 2002 20:09:05 -0000	2.1.2.1
@@ -47,6 +47,7 @@
 
 [if scratch did_order]
 [include file="templates/components/cart_display"]
+<br>
 [/if]
 [set did_order][/set]
 [search-region]
@@ -86,14 +87,15 @@
 [/calc]
 	[bounce href="[history-scan exclude=nothing]"]
 [/set]
-[tmp cross_sale][value-extended name=mv_searchspec index=0][/tmp]
+
+<br>
 
 [on-match]
 <FORM ACTION="[area nothing]" METHOD=POST>
-<input type=hidden name=mv_session_id value="[data session id]">
-<INPUT TYPE=hidden  NAME="mv_action" VALUE="refresh">
-<INPUT TYPE=hidden  NAME="mv_separate_items"  VALUE="0">
-<INPUT TYPE=hidden  NAME="mv_click" VALUE="munge_quantity">
+<INPUT TYPE=hidden NAME=mv_session_id value="[data session id]">
+<INPUT TYPE=hidden NAME=mv_action VALUE=refresh>
+<INPUT TYPE=hidden NAME=mv_separate_items VALUE=0>
+<INPUT TYPE=hidden NAME=mv_click VALUE=munge_quantity>
 [/on-match]
 
 <table width="90%" border="0" cellspacing="0" cellpadding="3">
@@ -105,9 +107,6 @@
   <td align="center"><b>Qty</b></td>
   <td align="center"><b>Buy</b></td>
 </tr>
-<tr>
-  <td colspan="6">&nbsp;</td>
-</tr>
 
 [search-list]
 
@@ -164,14 +163,14 @@
 [no-match]
 <BR><BR>
 <BLOCKQUOTE>
-Sorry, no matches for <B>[calc]
-			my $joiner = ' AND ';
-			$joiner = ' OR ' if
-					defined $Search->{''}->{mv_orsearch}[0]
-					and $Search->{''}->{mv_orsearch}[0];
-			my @str = grep /\D/, @{$Values->{mv_searchspec}};
-			return join $joiner, @str;
-			[/calc]
+[comment]
+	Don't show the search string if it was empty, since it looks weird
+	and the user will see the error below anyway.
+[/comment]
+[tmp matchstring][value-extended name=mv_searchspec joiner=" | "][/tmp]
+[if scratch matchstring]
+Sorry, no matches for <B>[scratch matchstring]</B>.
+[/if]
 [if value mv_search_error]
 <P>
 <B>