stas 2002/07/03 11:57:03 Modified: tmpl/custom/html search Log: added a <br class="smallbr"> after the text-field which is the more reliable way to indicate a linebreak. currently we rely on whitespace wrapping [i noticed this when running te html::clean] Submitted by: Allan Juul <[EMAIL PROTECTED]> Revision Changes Path 1.27 +139 -138 modperl-docs/tmpl/custom/html/search Index: search =================================================================== RCS file: /home/cvs/modperl-docs/tmpl/custom/html/search,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- search 30 Jun 2002 15:16:15 -0000 1.26 +++ search 3 Jul 2002 18:57:03 -0000 1.27 @@ -1,138 +1,139 @@ -[%- # search widget - # this template expects these vars to be set: - # doc.dir.abs_doc_root - doc root - # doc.dir.path_from_base - - # search_opitons is an array and hash for generating the drop-down box. --%] - - -[%- PROCESS search_options -%] -[%- USE CGI('-no_debug') -%] - -[% - IF doc.meta.link == 'search/searchresults.html'; - PROCESS build_results_search_widgets; - ELSE; - PROCESS build_std_search_widgets; - END; -%] - - <table border="0" cellspacing="0" cellpadding="0" width="150" align="center"> - <tr> - <td class="menu-border" width="1" height="1"><small class="nbr"><br class="smallbr"></small></td> - <td class="menu-border" width="148"><small class="nbr"><br class="smallbr"></small></td> - <td class="menu-border" width="1"><small class="nbr"><br class="smallbr"></small></td> - </tr> - - <tr> - <td class="menu-border"><br></td> - <td align="center" class="menu-title-bg"> - <div class="menu-title"><a href="[%- doc.dir.abs_doc_root -%]/search/swish.cgi">Search</a></div> - </td> - <td class="menu-border"><br></td> - </tr> - - <tr> - <td class="menu-border" colspan="3" height="1"><small class="nbr"><br class="smallbr"></small></td> - </tr> - - <tr> - <td class="menu-border"><br></td> - <td class="search-box-bg" align="center"> - <form class="search-wrap" method="GET" action="[% doc.dir.abs_doc_root %]/search/swish.cgi" enctype="application/x-www-form-urlencoded" name="site_search_form"> - [% PROCESS search_widget %] - </form> - </td> - <td class="menu-border"><br></td> - </tr> - - <tr> - <td class="menu-border" colspan="3" height="1"><small class="nbr"><br class="smallbr"></small></td> - </tr> - </table> - - -[% BLOCK search_widget %] - [% search_input %] - [% search_options %] - <br> - <input type="submit" name="submit" value="search" class="inp-submit"> -[% END %] - -[% BLOCK build_results_search_widgets %] - - [% - stag = "[\%" - etag = "%\]" - %] - - [% search_input = BLOCK %] - - [% stag %] CGI.textfield( { - name => 'query', - size => 12, - maxlength => 200, - class => 'inp-text', - } ) - [% etag %] - - [% END %] - - [% search_options = BLOCK %] - - [% stag %] CGI.popup_menu( { - Name => 'sbm', - Values => search_areas, - Labels => search_labels, - class => 'inp-select', - }) - [% etag %] - - [% IF 0 %] - [% stag %] IF search.results [% etag %] - <br> - <a href="#search_form"><span class="search-text">Advanced</span></a> - [% stag %] END [% etag %] - [% END %] - - [% END %] - -[% END %] - - -[% BLOCK build_std_search_widgets %] - - [% search_input = BLOCK %] - <input type="text" name="query" size="12" maxlength="200" value="" class="inp-text"> - [% END %] - - [%- section = PROCESS map_path_to_section path = doc.dir.path_from_base -%] - - [% search_options = BLOCK %] - - - [% CGI.popup_menu( { - Name => 'sbm', - Values => search_areas, - Labels => search_labels, - Default => section, - Class => 'inp-select', - }) - %] - [% END %] -[% END %] - -[%- BLOCK map_path_to_section -%] - [%- - FOR item = search_path_map; - IF path.search( item.path ); - item.section; - RETURN; - END; - END; - -%] -[%- END -%] - - - +[%- # search widget + # this template expects these vars to be set: + # doc.dir.abs_doc_root - doc root + # doc.dir.path_from_base + + # search_opitons is an array and hash for generating the drop-down box. +-%] + + +[%- PROCESS search_options -%] +[%- USE CGI('-no_debug') -%] + +[% + IF doc.meta.link == 'search/searchresults.html'; + PROCESS build_results_search_widgets; + ELSE; + PROCESS build_std_search_widgets; + END; +%] + + <table border="0" cellspacing="0" cellpadding="0" width="150" align="center"> + <tr> + <td class="menu-border" width="1" height="1"><small class="nbr"><br class="smallbr"></small></td> + <td class="menu-border" width="148"><small class="nbr"><br class="smallbr"></small></td> + <td class="menu-border" width="1"><small class="nbr"><br class="smallbr"></small></td> + </tr> + + <tr> + <td class="menu-border"><br></td> + <td align="center" class="menu-title-bg"> + <div class="menu-title"><a href="[%- doc.dir.abs_doc_root -%]/search/swish.cgi">Search</a></div> + </td> + <td class="menu-border"><br></td> + </tr> + + <tr> + <td class="menu-border" colspan="3" height="1"><small class="nbr"><br class="smallbr"></small></td> + </tr> + + <tr> + <td class="menu-border"><br></td> + <td class="search-box-bg" align="center"> + <form class="search-wrap" method="GET" action="[% doc.dir.abs_doc_root %]/search/swish.cgi" enctype="application/x-www-form-urlencoded" name="site_search_form"> + [% PROCESS search_widget %] + </form> + </td> + <td class="menu-border"><br></td> + </tr> + + <tr> + <td class="menu-border" colspan="3" height="1"><small class="nbr"><br class="smallbr"></small></td> + </tr> + </table> + + +[% BLOCK search_widget %] + [% search_input %] + <br class="smallbr"> + [% search_options %] + <br> + <input type="submit" name="submit" value="search" class="inp-submit"> +[% END %] + +[% BLOCK build_results_search_widgets %] + + [% + stag = "[\%" + etag = "%\]" + %] + + [% search_input = BLOCK %] + + [% stag %] CGI.textfield( { + name => 'query', + size => 12, + maxlength => 200, + class => 'inp-text', + } ) + [% etag %] + + [% END %] + + [% search_options = BLOCK %] + + [% stag %] CGI.popup_menu( { + Name => 'sbm', + Values => search_areas, + Labels => search_labels, + class => 'inp-select', + }) + [% etag %] + + [% IF 0 %] + [% stag %] IF search.results [% etag %] + <br> + <a href="#search_form"><span class="search-text">Advanced</span></a> + [% stag %] END [% etag %] + [% END %] + + [% END %] + +[% END %] + + +[% BLOCK build_std_search_widgets %] + + [% search_input = BLOCK %] + <input type="text" name="query" size="12" maxlength="200" value="" class="inp-text"> + [% END %] + + [%- section = PROCESS map_path_to_section path = doc.dir.path_from_base -%] + + [% search_options = BLOCK %] + + + [% CGI.popup_menu( { + Name => 'sbm', + Values => search_areas, + Labels => search_labels, + Default => section, + Class => 'inp-select', + }) + %] + [% END %] +[% END %] + +[%- BLOCK map_path_to_section -%] + [%- + FOR item = search_path_map; + IF path.search( item.path ); + item.section; + RETURN; + END; + END; + -%] +[%- END -%] + + +
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]