From: A.M. K. <aku...@us...> - 2004-09-09 00:17:14
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19381 Modified Files: DocsPDOGenerator.py PDOGenerator.py Log Message: Move Google searchbox out of DocsPDOGenerator and into PDOGenerator. Currently the searchbox is disabled; to enable it on a specific page, just add 'Search-box: yes' to the .ht file. Index: DocsPDOGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/DocsPDOGenerator.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DocsPDOGenerator.py 9 Apr 2004 00:22:37 -0000 1.5 --- DocsPDOGenerator.py 9 Sep 2004 00:17:04 -0000 1.6 *************** *** 18,22 **** def get_banner(self): ! return SEARCHBOX def get_banner_bgcolor(self): --- 18,22 ---- def get_banner(self): ! return PDOGenerator.SEARCHBOX def get_banner_bgcolor(self): *************** *** 24,40 **** - SEARCHBOX = \ - '''<!-- start of search bar --> - <div id="search"> - <form method="get" action="http://www.google.com/search"> - Search: <input id="q" name="q" size="30" value=""> - <input type="hidden" id="domains" name="domains" - value="docs.python.org" /> - <input type="hidden" id="sitesearch" name="sitesearch" - value="docs.python.org" /> - <input type="hidden" id="sourceid" name="sourceid" - value="google-search" /> - <input type="submit" id="submit" name="submit" value="submit" /> - </form> - </div><!-- end of search bar --> - ''' --- 24,25 ---- Index: PDOGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/PDOGenerator.py,v retrieving revision 2.20 retrieving revision 2.21 diff -C2 -d -r2.20 -r2.21 *** PDOGenerator.py 22 Jul 2004 01:06:28 -0000 2.20 --- PDOGenerator.py 9 Sep 2004 00:17:04 -0000 2.21 *************** *** 22,25 **** --- 22,41 ---- rst_html = None + SEARCHBOX = \ + '''<!-- start of search bar --> + <div id="search"> + <form method="get" action="http://www.google.com/search"> + Search: <input id="q" name="q" size="30" value=""> + <input type="hidden" id="domains" name="domains" + value="docs.python.org" /> + <input type="hidden" id="sitesearch" name="sitesearch" + value="docs.python.org" /> + <input type="hidden" id="sourceid" name="sourceid" + value="google-search" /> + <input type="submit" id="submit" name="submit" value="submit" /> + </form> + </div><!-- end of search bar --> + ''' + class PDOGenerator(Skeleton, Sidebar, Banner): *************** *** 115,120 **** def get_banner(self): ! return Banner.get_banner(self) ! def get_banner_attributes(self): return 'cellspacing="0" cellpadding="0"' --- 131,139 ---- def get_banner(self): ! banner = Banner.get_banner(self) ! if self.__parser.get('search-box', 'no').lower() == 'yes': ! banner = SEARCHBOX + banner ! return banner ! def get_banner_attributes(self): return 'cellspacing="0" cellpadding="0"' |