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

set active status in navbar

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