Implemented child url regex highlight for regular links, improve the document duplicate list, improved staging file delete view

This commit is contained in:
Roberto Rosario
2011-07-07 00:59:05 -04:00
parent 0b4df31726
commit 79cc9dd9c8
8 changed files with 67 additions and 90 deletions
@@ -123,6 +123,13 @@ def resolve_links(context, links, current_view, current_path, parsed_query_strin
new_link['disabled'] = link['conditional_disable'](context)
else:
new_link['disabled'] = False
if current_view in link.get('children_views', []):
new_link['active'] = True
for child_url_regex in link.get('children_url_regex', []):
if re.compile(child_url_regex).match(current_path.lstrip('/')):
new_link['active'] = True
context_links.append(new_link)
return context_links