Modify ↓
#1757 closed enhancement (invalid)
make tracnav friendly to wikinegotiator
Reported by: | phpxcache | Owned by: | Alec Thomas |
---|---|---|---|
Priority: | normal | Component: | TracHacks |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
see #1756
-
tracnav/tracnav.py
121 121 #needed several times 122 122 self.preview = req.args.get('preview', '') 123 123 self.curpage = req.args.get('page', 'WikiStart') 124 self.curpagename = req.args.get('page_name') 125 self.curpagelang = req.args.get('page_langsuffix') 124 126 self.modify = req.perm.has_permission('WIKI_MODIFY') 125 127 126 128 # parse arguments … … 138 140 Fetch the wiki page containing the toc, if available. 139 141 """ 140 142 if self.preview and name == self.curpage: 141 return self.req.args.get('text', '') 143 return self.req.args.get('text', ''), name 144 elif self.curpagelang and WikiSystem(self.env).has_page(name + '.' + self.curpagelang): 145 name = name + '.' + self.curpagelang 146 return WikiPage(self.env, name).text, name 142 147 elif WikiSystem(self.env).has_page(name): 143 return WikiPage(self.env, name).text 148 return WikiPage(self.env, name).text, name 144 149 else: 145 return '' 150 return '', name 146 151 147 152 def get_toc_entry(self, toc_text): 148 153 """ … … 223 228 224 229 # add TOCs 225 230 for name in (self.names or ["TOC"]): 226 toc = self.parse_toc(self.get_toc(name)) 231 toc, name = self.get_toc(name) 232 toc = self.parse_toc(toc) 227 233 if not toc: 228 234 toc = self.parse_toc(' * TOC "%s" is empty!' % name) 229 235 found, filtered = self.filter_toc(toc) … … 243 249 result = [] 244 250 for name, title, sub in toc: 245 251 if sub == None: 246 if name == self.curpage :252 if name == self.curpage or self.curpagename and name == self.curpagename: 247 253 found = True 248 254 result.append((name, title, None)) 249 255 else: … … 273 279 for name, title, sub in toc: 274 280 li_style = ' style="padding-left: %dem;"' % (depth + 1) 275 281 if sub == None: 276 if name == self.curpage :282 if name == self.curpage or self.curpagename and name == self.curpagename: 277 283 cls = ' class="active"' 278 284 else: 279 285 cls = ''
(i cannot find tracnav component)
Attachments (0)
Change History (2)
comment:1 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 17 years ago by
as i saw it in http://trac-hacks.org/wiki/TracNav. but sorry for my careless
Note: See
TracTickets for help on using
tickets.
If you can't find it, what makes you think it's on TracHacks, and why would I be able to find it?