Commit 1b893ac2 authored by William Colmenares's avatar William Colmenares

set active status in navbar

parent e1f65371
......@@ -23,19 +23,18 @@
<div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<li class="nav-item {{ application_page }} dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Applications</a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="{% url 'jobs:my_applications' %}">Your applications</a>
<a class="dropdown-item" href="{% url 'jobs:applications_others' %}">Applications to your jobs</a>
</ul>
</li>
<li class="nav-item">
<li class="nav-item {{ messages_page }}">
<a class="nav-link" href="{% url 'jobs:messages_inbox' %}">Messages</a>
</li>
<li class="nav-item justify-content-end">
<li class="nav-item {{ my_jobs_page }} justify-content-end">
<a class="nav-link" href="{% url 'jobs:my_jobs' %}">Your Jobs</a>
{# {% url 'jobs:job_list' %}#}
</li>
<a class="btn btn-outline-primary mx-1" href="{% url 'jobs:job_create' %}">Post a job</a>
<div class="dropdown-divider"></div>
......
......@@ -161,6 +161,7 @@ class ListOwnApplications(ListView):
def get_context_data(self, **kwargs):
context = super(ListOwnApplications, self).get_context_data(**kwargs)
context['title'] = 'Your Applications'
context['application_page'] = 'active'
return context
......@@ -176,6 +177,7 @@ class ListJobApplications(ListView):
context = super(ListJobApplications, self).get_context_data(**kwargs)
context['title'] = 'Applications to your jobs'
context['form'] = MessageForm
context['application_page'] = 'active'
return context
......@@ -201,6 +203,7 @@ class MesssageInbox(LoginRequiredMixin, ListView):
def get_context_data(self, **kwargs):
context = super(MesssageInbox, self).get_context_data(**kwargs)
context['title'] = 'Messages Inbox'
context['messages_page'] = 'active'
return context
......@@ -220,6 +223,7 @@ class Conversation(LoginRequiredMixin, ListView):
context = super(Conversation, self).get_context_data(**kwargs)
context['form'] = MessageForm
context['person'] = User.objects.get(id=self.kwargs['pk'])
context['messages_page'] = 'active'
return context
......@@ -235,6 +239,7 @@ class MyJobs(LoginRequiredMixin, ListView):
def get_context_data(self, **kwargs):
context = super(MyJobs, self).get_context_data(**kwargs)
context['title'] = 'Your jobs'
context['my_jobs_page'] = 'active'
return context
......
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