Changeset 3132
- Timestamp:
- 01/23/08 04:21:31 (9 months ago)
- Files:
-
- doxygenplugin/0.11/doxygentrac/doxygentrac.py (modified) (4 diffs)
- doxygenplugin/0.11/doxygentrac/templates/doxygen.html (moved) (moved from doxygenplugin/0.11/doxygentrac/templates/doxygen.cs) (1 diff)
- doxygenplugin/0.11/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doxygenplugin/0.11/doxygentrac/doxygentrac.py
r2651 r3132 13 13 14 14 from genshi.builder import tag 15 from genshi.core import Markup 15 16 16 17 from trac.config import Option … … 19 20 from trac.perm import IPermissionRequestor 20 21 from trac.web.chrome import INavigationContributor, ITemplateProvider, \ 21 add_stylesheet22 add_stylesheet, add_ctxtnav 22 23 from trac.search.api import ISearchSource 23 24 from trac.wiki.api import WikiSystem, IWikiSyntaxProvider … … 146 147 text = 'Doxygen index page [wiki:%s] does not exist.' % \ 147 148 wiki 148 text = wiki_to_html(text, self.env, req) 149 req.hdf['doxygen.text'] = text 150 req.hdf['doxygen.wiki_href'] = req.href.wiki(wiki) 151 req.hdf['doxygen.wiki_page'] = wiki 152 return 'doxygen.cs', 'text/html' 149 data = {'doxygen_text': wiki_to_html(text, self.env, req)} 150 add_ctxtnav(req, "View %s page" % wiki, req.href.wiki(wiki)) 151 return 'doxygen.html', data, 'text/html' 153 152 # use configured Doxygen index 154 153 path = os.path.join(self.base_path, self.default_doc, … … 166 165 if mimetype == 'text/html': 167 166 add_stylesheet(req, 'doxygen/css/doxygen.css') 168 req.hdf['doxygen.path'] = path 169 return 'doxygen.cs', 'text/html' 167 # Genshi can't include an unparsed file 168 # data = {'doxygen_path': path} 169 try: 170 content = Markup(file(path).read()) 171 data = {'doxygen_content': content} 172 return 'doxygen.html', data, 'text/html' 173 except OSError, e: 174 raise TracError("Can't read doxygen content: %s" % e) 170 175 else: 171 176 req.send_file(path, mimetype) doxygenplugin/0.11/doxygentrac/templates/doxygen.html
r1251 r3132 1 1 <?cs include "header.cs"?> 2 <?cs include "macros.cs"?> 2 <!DOCTYPE html 3 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 5 <html xmlns="http://www.w3.org/1999/xhtml" 6 xmlns:py="http://genshi.edgewall.org/" 7 xmlns:xi="http://www.w3.org/2001/XInclude"> 8 <xi:include href="layout.html" /> 9 <head> 10 <title>Doxygen Trac</title> 11 </head> 3 12 4 <?cs if:doxygen.text ?> 5 <?cs if:doxygen.wiki_page ?> 6 <div id="ctxtnav" class="nav"> 7 <h2>Doxygen Navigation</h2> 8 <ul><li class="first last"><a href="<?cs var:doxygen.wiki_href ?>"> 9 View <?cs var:doxygen.wiki_page ?></a></li> 10 </ul> 11 </div> 12 <?cs /if ?> 13 <div id="content" class="wiki"> 14 <div class="wikipage"> 15 <div id="searchable"> 16 <?cs var:doxygen.text ?> 13 <body> 14 <div id="content" class="doxygen"> 15 <div py:if="doxygen_text" id="content" class="wiki"> 16 <div class="wikipage"> 17 <div id="searchable" py:content="doxygen_text" /> 18 </div> 17 19 </div> 18 </div>19 <?cs else ?>20 <?cs include doxygen.path ?>21 <?cs /if ?>22 20 23 <?cs include "footer.cs"?> 21 <div py:if="doxygen_content"> 22 <!--! 23 ! Ideally it would be nice to be able to use Genshi xi:include 24 ! but there's currently no way to specify /no/ parsing on the 25 ! included file, as in: 26 ! 27 ! <xi:include href="$doxygen_path" parse="" /> 28 ! 29 ! (using parse="text" won't work either, as the output will be 30 ! HTML escaped) 31 !--> 32 ${doxygen_content} 33 </div> 34 35 </div> 36 </body> 37 </html> doxygenplugin/0.11/setup.py
r2069 r3132 8 8 description='Doxygen plugin for Trac', 9 9 keywords='trac doxygen', 10 version='0.11. 1',10 version='0.11.0.1', 11 11 url='http://trac-hacks.org/wiki/DoxygenPlugin', 12 12 license = """Copyright (C) 2005 Jason Parks <jparks@jparks.net>
