Changeset 665
- Timestamp:
- 04/16/06 02:36:41 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
navmoverplugin/navmover/navmover.py
r660 r665 13 13 14 14 def get_navigation_items(self, req): 15 # Hide meta nav items 16 add_stylesheet(req, 'navmover/css/navmover.css') 17 move_items = self.env.config.get('navmover', 'meta_to_main', ''). \ 15 move_to = self.env.config.get('navmover', 'move_to') or 'metanav' 16 move_items = self.env.config.get('navmover', 'move_items', ''). \ 18 17 replace(',', ' ').split() 18 self.env.log.debug(move_items) 19 # Ensure sanity 20 if move_to not in ('mainnav', 'metanav'): 21 move_to = 'mainnav' 22 if move_to == 'mainnav': 23 move_from = 'metanav' 24 else: 25 move_from = 'mainnav' 26 # Hide the appropriate nav block 27 add_stylesheet(req, 'navmover/css/hide_%s.css' % move_from) 19 28 # Find meta nav items 20 29 meta_items = [] … … 22 31 if contributor == self: continue 23 32 for item in contributor.get_navigation_items(req): 24 if (not move_items or item[1] in move_items) and item[0] == 'metanav'\33 if (not move_items or item[1] in move_items) and item[0] == move_from \ 25 34 and not unicode(item[2]).startswith('logged in as'): 26 meta_items.append(( 'mainnav', item[1], item[2]))35 meta_items.append((move_to, item[1], item[2])) 27 36 28 37 return meta_items
