diff --git a/recruitment/templates/candidate/candidate_nav.html b/recruitment/templates/candidate/candidate_nav.html
index 5de3e24e2..495e9f45d 100644
--- a/recruitment/templates/candidate/candidate_nav.html
+++ b/recruitment/templates/candidate/candidate_nav.html
@@ -37,6 +37,7 @@ x-data="{searchShow: false}"
hx-trigger="keyup changed delay:.2s"
hx-target="#section"
class="oh-input oh-input__icon"
+ hx-vals = '{"view":"{{request.GET.view}}"}'
aria-label="Search Input"
/>
@@ -44,7 +45,7 @@ x-data="{searchShow: false}"
-
\ No newline at end of file
diff --git a/recruitment/views/search.py b/recruitment/views/search.py
index 9846d9d0f..61c9bae08 100644
--- a/recruitment/views/search.py
+++ b/recruitment/views/search.py
@@ -116,6 +116,9 @@ def candidate_filter_view(request):
"""
This method is used for filter,pagination and search candidate.
"""
+ templete = "candidate/candidate_card.html"
+ if request.GET.get('view') == 'list':
+ templete= "candidate/candidate_list.html"
previous_data = request.environ["QUERY_STRING"]
filter_obj = CandidateFilter(
request.GET, queryset=Candidate.objects.filter(is_active=True)
@@ -125,7 +128,7 @@ def candidate_filter_view(request):
page_obj = paginator.get_page(page_number)
return render(
request,
- "candidate/candidate_card.html",
+ templete,
{"data": page_obj, "pd": previous_data},
)