Changeset 1199 in products
- Timestamp:
- Jul 31, 2009 1:21:12 PM (15 years ago)
- Location:
- quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/menu.py
r1197 r1199 19 19 def __init__(self, context): 20 20 super(DropDownMenuQueryBuilder, self).__init__(context) 21 # TODO: make sure sitemap query builder is what we need22 # override depth by dropdown menu settings23 21 if self._settings.content_tabs_level > 0: 24 22 self.query['path']['depth'] = self._settings.content_tabs_level … … 39 37 def __init__(self, context, view=None): 40 38 super(DropDownMenuStrategy, self).__init__(context, view) 41 # TODO: make sure default navtree strategy is what we need42 39 self.bottomLevel = self._settings.content_tabs_level 43 40 -
quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/viewlets.py
r1197 r1199 33 33 self.conf = conf = self._settings() 34 34 self.tool = getToolByName(context, 'portal_actions') 35 36 #import pdb;pdb.set_trace()37 35 38 36 # fetch actions-based tabs? … … 78 76 currentItem = False 79 77 currentParent = False 80 # TODO: adjust img tag81 78 icon = info['icon'] and '<img src="%s" />' % info['icon'] or '' 82 79 83 80 # look up children for a given action 84 81 children = [] 85 if level <= self.conf.actions_tabs_level: 82 bottomLevel = self.conf.actions_tabs_level 83 if bottomLevel < 1 or level < bottomLevel: 86 84 # try to find out appropriate subcategory 87 subcat_id = info['id'] + self.conf.nested_category_sufix 85 subcat_id = info['id'] 86 if self.conf.nested_category_sufix is not None: 87 subcat_id += self.conf.nested_category_sufix 88 88 if self.conf.nested_category_prefix is not None: 89 89 subcat_id = self.conf.nested_category_prefix + subcat_id 90 if subcat_id in category.objectIds(): 90 if subcat_id != info['id'] and \ 91 subcat_id in category.objectIds(): 91 92 subcat = category._getOb(subcat_id) 92 93 if IActionCategory.providedBy(subcat): … … 129 130 def _content_tabs(self): 130 131 """Return tree of tabs based on content structure""" 131 # TODO: check currentItem functionality132 # TODO: make non-folderish work as proxy 132 133 context = aq_inner(self.context) 133 134 -
quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/interfaces.py
r1197 r1199 88 88 description=_(u"Sufix part of the category id to be looked up during " 89 89 u"linking with action."), 90 default=u"_sub") 90 default=u"_sub", 91 required=False)
Note: See TracChangeset
for help on using the changeset viewer.