Changeset 3071 for trac/trunk
- Timestamp:
- 02/22/06 17:10:28 (7 years ago)
- Location:
- trac/trunk
- Files:
-
- 2 edited
-
htdocs/tracnav.css (modified) (2 diffs)
-
wiki-macros/TracNav.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trac/trunk/htdocs/tracnav.css
r3043 r3071 40 40 } 41 41 .wiki-toc.trac-nav h4 { 42 margin: 0; padding: 0; 42 margin: 0; 43 padding: 0; 43 44 } 44 45 .wiki-toc.trac-nav ul > li:first-child { … … 46 47 } 47 48 .wiki-toc.trac-nav .edit { 48 position: absolute; 49 top: 2px; 50 right: 3px; 51 margin-left: 3px; 52 border: 0; 49 /* FIXME: this causes Gecko-based browsers to 50 stretch trac-nav box over the whole page */ 51 float: right; 52 text-align: right; 53 53 } 54 54 .wiki-toc.trac-nav .edit a { 55 color:blue; border-color:blue; 55 color: blue; 56 border-color: blue; 56 57 } -
trac/trunk/wiki-macros/TracNav.py
r3063 r3071 45 45 == Author and license == 46 46 47 Copyright 2005 47 Copyright 2005, 2006 48 48 * Bernhard Haumacher (haui at haumacher.de) 49 49 * Thomas Moschny (moschny at ipd.uni-karlsruhe.de) … … 197 197 preview = hdf.getValue('args.preview', "") 198 198 curpage = hdf.getValue('wiki.page_name', "") 199 name = args or 'TOC' 200 201 toc = parse_toc(get_toc(hdf, env, preview, name), env) 202 if not toc: 203 toc = parse_toc(' * TOC "%s" is empty!' % name, env) 204 205 (found, filtered) = filter_toc(curpage, toc, 0) 206 if found: 207 return display_all(hdf, env, name, curpage, filtered, 0) 208 else: 209 return display_all(hdf, env, name, curpage, toc, 0) 199 200 # split the argument to get the wiki page names to include 201 names = (args or "TOC").split('|') 202 203 # Parsing the tocS 204 tocs = [] 205 for name in names: 206 toc = parse_toc(get_toc(hdf, env, preview, name), env) 207 if not toc: 208 toc = parse_toc(' * TOC "%s" is empty!' % name, env) 209 tocs.append((name, toc)) 210 211 col = 0 212 html = '%s<div class="wiki-toc trac-nav">\n' % indentation(col) 213 col += 1 214 html += '%s<h2><a href="%s">TracNav</a> menu</h2>' % \ 215 (indentation(col), TRACNAVHOME) 216 217 for name, toc in tocs: 218 (found, filtered) = filter_toc(curpage, toc, 0) 219 if found: 220 html += display_all(hdf, env, name, curpage, filtered, col) 221 else: 222 html += display_all(hdf, env, name, curpage, toc, col) 223 col -= 1 224 html += '%s</div>\n' % indentation(col) 225 return html 226 210 227 211 228 … … 238 255 def display_all(hdf, env, name, curpage, toc, col): 239 256 preview = hdf.getValue('args.preview', "") 240 html = '%s<div class="wiki-toc trac-nav">\n' % indentation(col) 241 col += 1 242 html += '%s<h2><a href="%s">TracNav</a> menu</h2>' % \ 243 (indentation(col), TRACNAVHOME) 257 html = '' 244 258 245 259 if (not preview) and hdf.getValue('trac.acl.WIKI_MODIFY', ''): … … 251 265 col -= 1 252 266 html += '%s</ul>\n' % indentation(col) 253 col -= 1254 html += '%s</div>\n' % indentation(col)255 267 return html 256 268
Note: See TracChangeset
for help on using the changeset viewer.
