perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mose...@apache.org
Subject cvs commit: modperl-docs/tmpl/custom/html search_field
Date Fri, 19 Apr 2002 19:47:36 GMT
moseley     02/04/19 12:47:36

  Added:       src/search search_options
               tmpl/custom/html search_field
  Log:
  new file: template for the drop down box, and for the
  search field (if it every makes it back to the top)
  
  Revision  Changes    Path
  1.1                  modperl-docs/src/search/search_options
  
  Index: search_options
  ===================================================================
  [%
      search_areas = [
          ""
          "outstanding"
          "download"
          "docs"
              "docs/1.0"
                  "docs/1.0/guide"
                  "docs/1.0/faqs"
                  "docs/1.0/win32"
                  "docs/1.0/api"
              "docs/2.0"
                  "docs/2.0/user"
                  "docs/2.0/devel"
                  "docs/2.0/api"
                  "docs/2.0/world"
          "help"
          "maillist"
          "products"
          "contribute"
      ]
  
      search_labels = {
          ""          => 'Whole Site'
          "outstanding" => 'Stories'
          "download"  => 'Download'
          "docs"      => 'All Docs'
              "docs/1.0"  => '..1.0 Docs'
                  "docs/1.0/guide"    => '....Guide'
                  "docs/1.0/faqs"     => '....FAQs'
                  "docs/1.0/win32"    => '....Win32'
                  "docs/1.0/api"      => '....API'
              "docs/2.0"  => '..2.0 Docs'
                  "docs/2.0/user"     => '....User'
                  "docs/2.0/devel"    => '....Developer'
                  "docs/2.0/api"      => '....API'
                  "docs/2.0/world"    => '....Related'
          "help"      => 'Getting Help'
          "mailist"   => 'Email Lists'
          "products"  => 'Products'
          "contribute" => 'Contribute'
      }
  %]
  
  
  
  
  1.1                  modperl-docs/tmpl/custom/html/search_field
  
  Index: search_field
  ===================================================================
  [%- # search widget
      # this template expects these vars to be set:
      # doc.dir.abs_doc_root - doc root
      # doc.dir.path_from_base
  -%]
  
  [% PROCESS search_options %]
  
  [% USE CGI %]
  
      <form method="post" action="[% doc.dir.abs_doc_root %]/search/swish.cgi" enctype="application/x-www-form-urlencoded"
name="site_search_form">
          [%
              IF doc.meta.link == 'search/searchresults.html';
                  PROCESS results_search_widget;
              ELSE;
                  PROCESS std_search_widget;
              END;
          %]
      </form>
  
  
  [% BLOCK results_search_widget %]
  
      [%
          stag = "[\%"
          etag = "%\]"
      %]
  
      <table border="0" cellspacing="0" cellpadding="2">
          <tr>
              <td valign="top" nowrap class="searchtitle">Search</td>
         
              <td valign="top" nowrap>
                  [% stag %] CGI.textfield( {
                          name    => 'query',
                          size    => 12,
                          maxlength => 200,
                      } ) [% etag %]
              </td>
  
              <td valign="top" nowrap>
                  [% stag %] CGI.popup_menu( {
                          Name    => 'sbm',
                          Values  => search_areas,
                          Labels  => search_labels,
                          })
                  [% etag %]
              </td>
              
              <td nowrap="nowrap"><input type="image" src="[% doc.dir.abs_doc_root
%]/images/go.gif" border="0" hspace="0" alt="search" /></td>
          </tr>
      </table>
  [% END %]
  
  
  [% BLOCK std_search_widget %]
      <table border="0" cellspacing="0" cellpadding="2">
          <tr>
              <td valign="top" nowrap  class="searchtitle">Search</td>
  
              <td valign="top" nowrap>
                  <input type="text" name="query" size="12" maxlength="200" value="">
              </td>
  
              <td valign="top" nowrap>
                  [% CGI.popup_menu( {
                          Name    => 'sbm',
                          Values  => search_areas,
                          Labels  => search_labels,
                          Default => doc.dir.path_from_base,
                          })
                  %]
              </td>
              <td nowrap="nowrap"><input type="image" src="[% doc.dir.abs_doc_root
%]/images/go.gif" width="29" height="20" border="0" hspace="0" alt="search" /></td>
          </tr>
  
      </table>
  [% END %]
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message