Commit 17947190 authored by Łukasz Nowak's avatar Łukasz Nowak

- simplify more and really respect naming convention (thanks jm again)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27633 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 32fb58e6
...@@ -144,15 +144,14 @@ class BusinessPath(Path): ...@@ -144,15 +144,14 @@ class BusinessPath(Path):
XXX - implementation missing XXX - implementation missing
TBD - look at CategoryTool._buildFilter for inspiration TBD - look at CategoryTool._buildFilter for inspiration
""" """
filtered_category_list = [] # basic filtering:
for local_category in category_list: # * remove categories which base name is not category
# basic filtering, dirty way: # * respect base parameter
# - remove categories, which are not defined in category parameter prefix = category + '/'
# - support base parameter start_index = not base and len(prefix) or 0
base_category, base_value = local_category.split('/', 1) return [category[start_index:]
if base_category == category: for category in category_list
filtered_category_list.append(base == 1 and local_category or base_value) if category.startswith(prefix)]
return filtered_category_list
# Dynamic context based categories # Dynamic context based categories
def _getDynamicCategoryList(self, context): def _getDynamicCategoryList(self, context):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment