diff options
Diffstat (limited to 'chimere')
-rw-r--r-- | chimere/templates/chimere/blocks/categories.html | 2 | ||||
-rw-r--r-- | chimere/views.py | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/chimere/templates/chimere/blocks/categories.html b/chimere/templates/chimere/blocks/categories.html index 5ba89fc..8c8a8f8 100644 --- a/chimere/templates/chimere/blocks/categories.html +++ b/chimere/templates/chimere/blocks/categories.html @@ -23,7 +23,9 @@ </ul> </li> {% endfor %} + {% if sub_categories %} <li id='display_submited'> <input type='checkbox' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%} </li> + {% endif %} </ul> diff --git a/chimere/views.py b/chimere/views.py index 817aa74..99ecc89 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -549,17 +549,19 @@ def getGeoObjects(request, area_name, category_ids, status): return HttpResponse(data) def get_available_categories(request, area_name=None, area=None, status='A', - force=None): + force=None): ''' Get categories for a designed area ''' context_data, redir = get_base_response(area_name) area = context_data["area"] - if area and area.dynamic_categories and \ - not "current_extent" in request.GET: - return "" if redir: return redir + if area and area.dynamic_categories and \ + not "current_extent" in request.GET: + context_data['sub_categories'] = [] + return render_to_response('chimere/blocks/categories.html', context_data, + context_instance=RequestContext(request)) if not area or not area.dynamic_categories: # Categories are not updated dynamicaly when the user move the map # so we return ALL the categories |