From: <al...@us...> - 2010-04-30 19:12:48
|
Revision: 14387 http://translate.svn.sourceforge.net/translate/?rev=14387&view=rev Author: alaaosh Date: 2010-04-30 19:12:42 +0000 (Fri, 30 Apr 2010) Log Message: ----------- add translation_project as extra template context, we need to do this with a separate argument instead of hackishness Modified Paths: -------------- src/trunk/Pootle/local_apps/pootle_app/views/admin/util.py Modified: src/trunk/Pootle/local_apps/pootle_app/views/admin/util.py =================================================================== --- src/trunk/Pootle/local_apps/pootle_app/views/admin/util.py 2010-04-29 19:42:34 UTC (rev 14386) +++ src/trunk/Pootle/local_apps/pootle_app/views/admin/util.py 2010-04-30 19:12:42 UTC (rev 14387) @@ -189,12 +189,14 @@ "error_msg": msg, } } - if model_args.get("project", None): + if 'translation_project' in model_args: + template_vars['translation_project'] = model_args['translation_project'] + if 'project' in model_args: template_vars["project"] = model_args['project'] - if model_args.get("search", None): - template_vars["search"] = model_args['search'] - if model_args.get("navitems", None): + if 'language' in model_args: + template_vars['language'] = model_args['language'] + if 'navitems' in model_args: template_vars["navitems"] = model_args['navitems'] - if model_args.get("feed_path", None): + if 'feed_path' in model_args: template_vars["feed_path"] = model_args['feed_path'] return render_to_response(template, template_vars, context_instance=RequestContext(request)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |