Commit 5da4612a authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

do not show "No groups found!" message when group search form loads

parent b70326a9
......@@ -80,7 +80,9 @@
</tbody>
</table>
{% else %}
<h2>No groups found!</h2>
{% if is_search %}
<h2>No groups found!</h2>
{% endif %}
{% endif %}
</div>
{% endblock %}
......@@ -641,7 +641,7 @@ def group_approval_request(request, group_id):
@signed_terms_required
@login_required
def group_search(request, queryset=EmptyQuerySet(), extra_context={}, **kwargs):
def group_search(request, extra_context={}, **kwargs):
join_forms = {}
if request.method == 'GET':
form = AstakosGroupSearchForm()
......@@ -656,10 +656,13 @@ def group_search(request, queryset=EmptyQuerySet(), extra_context={}, **kwargs):
join_forms[g.name] = f(dict(group=g,
person=request.user,
date_requested=datetime.now().strftime("%d/%m/%Y")))
return object_list(request,
queryset,
template_name='im/astakosgroup_list.html',
extra_context=dict(form=form, is_search=True, join_forms=join_forms))
return object_list(request,
queryset,
template_name='im/astakosgroup_list.html',
extra_context=dict(form=form, is_search=True, join_forms=join_forms))
return render_response(template='im/astakosgroup_list.html',
form = form,
context_instance=get_context(request))
@signed_terms_required
@login_required
......
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