Got upload view working, staging preview and delete working ok

This commit is contained in:
Roberto Rosario
2011-07-06 01:31:27 -04:00
parent 7417fca835
commit 2816c1f86f
16 changed files with 520 additions and 85 deletions

View File

@@ -131,6 +131,9 @@ def _get_object_navigation_links(context, menu_name=None, links_dict=object_navi
current_view = resolve_to_name(current_path)
context_links = []
# Don't fudge with the original global dictionary
links_dict = links_dict.copy()
query_string = urlparse.urlparse(request.get_full_path()).query or urlparse.urlparse(request.META.get('HTTP_REFERER', u'/')).query
parsed_query_string = urlparse.parse_qs(query_string)
@@ -155,6 +158,16 @@ def _get_object_navigation_links(context, menu_name=None, links_dict=object_navi
except VariableDoesNotExist:
obj = None
try:
"""
Check for and inject a temporary navigation dictionary
"""
temp_navigation_links = Variable('temporary_navigation_links').resolve(context)
if temp_navigation_links:
links_dict.update(temp_navigation_links)
except VariableDoesNotExist:
pass
try:
links = links_dict[menu_name][current_view]['links']
for link in resolve_links(context, links, current_view, current_path, parsed_query_string):
@@ -169,6 +182,7 @@ def _get_object_navigation_links(context, menu_name=None, links_dict=object_navi
except KeyError:
pass
return context_links