Provides a method for choosing the initially selected indexes for three rows in advan... user/sylvar/advanced-search-index-selection
authorBen Ostrowsky <ben@shellz.esilibrary.com>
Wed, 22 Jun 2011 19:02:34 +0000 (19:02 +0000)
committerBen Ostrowsky <ben@shellz.esilibrary.com>
Wed, 22 Jun 2011 23:17:38 +0000 (23:17 +0000)
and sets these to title, author, and keyword respectively.

My initial attempt is replaced here by a more elegant and tidy version from Thomas Berezansky.

Signed-off-by: Ben Ostrowsky <ben@shellz.esilibrary.com>
Open-ILS/web/opac/skin/default/xml/advanced/adv_global_row.xml
Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml

index f5c5ca7..19d003b 100644 (file)
@@ -6,11 +6,11 @@
 
                <!-- select the search class -->
                <select name='type' style='margin-right: 7px;'>
-                       <option value='keyword' selected='selected'>&common.keyword;</option>
-                       <option value='title'>&common.title;</option>
-                       <option value='author'>&common.author;</option>
-                       <option value='subject'>&common.subject;</option>
-                       <option value='series'>&common.series;</option>
+                       <option value='keyword'<!--#if expr="$QUERY_STRING=keyword" --> selected='selected' <!--#endif -->>&common.keyword;</option>
+                       <option value='title'<!--#if expr="$QUERY_STRING=title" --> selected='selected' <!--#endif -->>&common.title;</option>
+                       <option value='author'<!--#if expr="$QUERY_STRING=author" --> selected='selected' <!--#endif -->>&common.author;</option>
+                       <option value='subject'<!--#if expr="$QUERY_STRING=subject" --> selected='selected' <!--#endif -->>&common.subject;</option>
+                       <option value='series'<!--#if expr="$QUERY_STRING=series" --> selected='selected' <!--#endif -->>&common.series;</option>
                </select>
        
                <!-- select how to treat the text -->
index 865aa59..c5a58c9 100644 (file)
                                        </script>
 
                                        <!--#set var="adv_global_row_id" value="adv_global_trow"-->
-                                       <!--#include virtual="adv_global_row.xml"-->
+                                       <!--#include virtual="adv_global_row.xml?title"-->
 
                                        <!--#set var="adv_global_row_id" value=""-->
-                                       <!--#include virtual="adv_global_row.xml"-->
-                                       <!--#include virtual="adv_global_row.xml"-->
+                                       <!--#include virtual="adv_global_row.xml?author"-->
+                                       <!--#include virtual="adv_global_row.xml?keyword"-->
 
                                        <!-- add a new row -->
                                        <tr id='adv_global_addrow'>