comparison MoinMoin/themes/__init__.py @ 2292:7b7e07bb6f8a

Removed linking of all view to home.
author Ashutosh Singla <ashu1461@gmail.com>
date Sun, 22 Sep 2013 16:24:15 +0530
parents 5c424120a253
children b942154b2d74
comparison
equal deleted inserted replaced
2291:b02bac100074 2292:7b7e07bb6f8a
21 logging = log.getLogger(__name__) 21 logging = log.getLogger(__name__)
22 22
23 from MoinMoin.i18n import _, L_, N_ 23 from MoinMoin.i18n import _, L_, N_
24 from MoinMoin import wikiutil, user 24 from MoinMoin import wikiutil, user
25 from MoinMoin.constants.keys import USERID, ADDRESS, HOSTNAME, REVID, ITEMID, NAME_EXACT 25 from MoinMoin.constants.keys import USERID, ADDRESS, HOSTNAME, REVID, ITEMID, NAME_EXACT
26 from MoinMoin.constants.namespaces import NAMESPACE_DEFAULT, NAMESPACE_USERPROFILES 26 from MoinMoin.constants.namespaces import NAMESPACE_DEFAULT, NAMESPACE_USERPROFILES, NAMESPACE_ALL
27 from MoinMoin.search import SearchForm 27 from MoinMoin.search import SearchForm
28 from MoinMoin.util.interwiki import split_interwiki, getInterwikiHome, is_local_wiki, is_known_wiki, url_for_item, CompositeName, split_fqname 28 from MoinMoin.util.interwiki import split_interwiki, getInterwikiHome, is_local_wiki, is_known_wiki, url_for_item, CompositeName, split_fqname
29 from MoinMoin.util.crypto import cache_key 29 from MoinMoin.util.crypto import cache_key
30 from MoinMoin.util.forms import make_generator 30 from MoinMoin.util.forms import make_generator
31 from MoinMoin.util.clock import timed 31 from MoinMoin.util.clock import timed
233 items = [] 233 items = []
234 for cls, endpoint, args, link_text, title in self.cfg.navi_bar: 234 for cls, endpoint, args, link_text, title in self.cfg.navi_bar:
235 if endpoint == "frontend.show_root": 235 if endpoint == "frontend.show_root":
236 endpoint = "frontend.show_item" 236 endpoint = "frontend.show_item"
237 root_fqname = fqname.get_root_fqname() 237 root_fqname = fqname.get_root_fqname()
238 args['item_name'] = root_fqname.fullname 238 default_root = app.cfg.root_mapping.get(NAMESPACE_DEFAULT, app.cfg.default_root)
239 args['item_name'] = root_fqname.fullname if fqname.namespace != NAMESPACE_ALL else default_root
239 elif endpoint in ["frontend.global_history", "frontend.global_tags"]: 240 elif endpoint in ["frontend.global_history", "frontend.global_tags"]:
240 args['namespace'] = fqname.namespace 241 args['namespace'] = fqname.namespace
241 elif endpoint == "frontend.index": 242 elif endpoint == "frontend.index":
242 args['item_name'] = fqname.namespace 243 args['item_name'] = fqname.namespace
243 items.append((cls, url_for(endpoint, **args), link_text, title)) 244 items.append((cls, url_for(endpoint, **args), link_text, title))