https und suche
This commit is contained in:
parent
89fa8910de
commit
5fddfc4b7c
Binary file not shown.
|
|
@ -29,8 +29,8 @@
|
||||||
<link href='https://fonts.googleapis.com/css?family=Roboto&display=swap' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Roboto&display=swap' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
<!-- include summernote css/js -->
|
<!-- include summernote css/js -->
|
||||||
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.css" rel="stylesheet">
|
||||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -404,27 +404,6 @@ def GlobalSearch(request):
|
||||||
res_areas = Areas.objects.filter(agency__pk=ag).filter(name__icontains=searchfor)
|
res_areas = Areas.objects.filter(agency__pk=ag).filter(name__icontains=searchfor)
|
||||||
res_tasks = Tasks.objects.filter(agency__pk=ag).filter(name__icontains=searchfor) |Tasks.objects.filter(agency__pk=ag).filter(area__name__icontains=searchfor)
|
res_tasks = Tasks.objects.filter(agency__pk=ag).filter(name__icontains=searchfor) |Tasks.objects.filter(agency__pk=ag).filter(area__name__icontains=searchfor)
|
||||||
res_pers = User.objects.filter(profile__agency__pk=ag).filter(first_name__icontains=searchfor) | User.objects.filter(profile__agency__pk=ag).filter(last_name__icontains=searchfor)
|
res_pers = User.objects.filter(profile__agency__pk=ag).filter(first_name__icontains=searchfor) | User.objects.filter(profile__agency__pk=ag).filter(last_name__icontains=searchfor)
|
||||||
'''
|
|
||||||
results_st = list(results)
|
|
||||||
final_results_st = []
|
|
||||||
i = 0
|
|
||||||
for ele in results_st:
|
|
||||||
tempele = {}
|
|
||||||
tempele['id'] = ele.pk
|
|
||||||
tempele['name'] = ele.name
|
|
||||||
# First 100 chars of the Content
|
|
||||||
tempele['content'] = cleanhtml(ele.content[:100])
|
|
||||||
tempele['first_name'] = ele.created_standard_by.first_name
|
|
||||||
tempele['last_name'] = ele.created_standard_by.last_name
|
|
||||||
tempele['first_name_mod'] = ele.last_modified_by.first_name
|
|
||||||
tempele['last_name_mod'] = ele.last_modified_by.last_name
|
|
||||||
tempele['created'] = formats.date_format(ele.created_standard_date, "d.m.Y")
|
|
||||||
tempele['last_modified_on'] = formats.date_format(ele.last_modified_on, "d.m.Y")
|
|
||||||
final_results_st.append(tempele)
|
|
||||||
i += 1
|
|
||||||
'''
|
|
||||||
|
|
||||||
#return JsonResponse({'standards' : final_results_st})
|
|
||||||
html = render_to_string('users/searchres.html', {'res_standard': res_standard, 'res_areas': res_areas, 'res_tasks': res_tasks, 'res_pers': res_pers})
|
html = render_to_string('users/searchres.html', {'res_standard': res_standard, 'res_areas': res_areas, 'res_tasks': res_tasks, 'res_pers': res_pers})
|
||||||
return HttpResponse(html)
|
return HttpResponse(html)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue