Ticket #34: docbox.patch
| File docbox.patch, 3.7 kB (added by Kaan, 2 years ago) |
|---|
-
setup.py
old new 86 86 designer = turbogears.toolbox.designer:Designer 87 87 info = turbogears.toolbox.base:Info 88 88 catwalk = turbogears.toolbox.catwalk:CatWalk 89 docbox = turbogears.toolbox.docbox:DocBox 89 90 90 91 """, 91 92 extras_require = { -
turbogears/toolbox/docbox/docnav.kid
old new 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 3 4 <head> 5 <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> 6 <title>Welcome to TurboGears</title> 7 <LINK HREF="/tg_static/css/toolbox.css" TYPE="text/css" REL="stylesheet" /> 8 <style> 9 #top { 10 background-position:top left; 11 } 12 </style> 13 <script> 14 function clearnav () { 15 window.parent.location.pathname=window.parent.frames[1].location.pathname 16 } 17 </script> 18 </head> 19 <body> 20 <div id='top'> 21 <h1><a href='../' target='_top'>Toolbox</a> » Documentation : <a href="/docs/" onclick="clearnav()">Remove</a></h1> 22 </div> 23 </body> 24 </html> -
turbogears/toolbox/docbox/docmain.kid
old new 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 3 4 <head> 5 <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> 6 <title>DocBox</title> 7 </head> 8 9 <frameset rows="48px,*"> 10 11 <frame src="docnav" name="navframe" frameborder='0'/> 12 <frame src="/docs/" name="docsframe" frameborder='0'/> 13 14 </frameset> 15 16 </html> -
turbogears/toolbox/docbox/__init__.py
old new 1 import turbogears as tg 2 import pkg_resources 3 import os 4 5 directory = pkg_resources.resource_filename('turbogears','docs') 6 7 tg.config.update({'/docs': 8 { 9 'static_filter.on' : True, 10 'static_filter.dir' : directory, 11 'static_filter.index' : 'index.html' 12 } 13 } 14 ) 15 16 class DocBox(tg.controllers.RootController): 17 """Browse downloaded TurboGears Documentation. 18 """ 19 __label__ = "Documentation" 20 __version__ = "0.1" 21 __author__ = "Kaan Divringi" 22 __email__ = "KublaChaos@gmail.com" 23 __copyright__ = "" 24 __license__ = "MIT" 25 26 icon = "/tg_static/images/docbox.png" 27 28 @tg.expose(template="turbogears.toolbox.docbox.docmain") 29 def index(self): 30 return dict() 31 32 @tg.expose(template="turbogears.toolbox.docbox.docnav") 33 def docnav(self): 34 return dict()