diff --git a/NorahUniversity/__pycache__/settings.cpython-312.pyc b/NorahUniversity/__pycache__/settings.cpython-312.pyc index ee8b9a6..9a36850 100644 Binary files a/NorahUniversity/__pycache__/settings.cpython-312.pyc and b/NorahUniversity/__pycache__/settings.cpython-312.pyc differ diff --git a/recruitment/__pycache__/admin.cpython-312.pyc b/recruitment/__pycache__/admin.cpython-312.pyc index 7e73a6f..b454784 100644 Binary files a/recruitment/__pycache__/admin.cpython-312.pyc and b/recruitment/__pycache__/admin.cpython-312.pyc differ diff --git a/recruitment/__pycache__/forms.cpython-312.pyc b/recruitment/__pycache__/forms.cpython-312.pyc index a421df6..1a3e017 100644 Binary files a/recruitment/__pycache__/forms.cpython-312.pyc and b/recruitment/__pycache__/forms.cpython-312.pyc differ diff --git a/recruitment/__pycache__/linkedin_service.cpython-312.pyc b/recruitment/__pycache__/linkedin_service.cpython-312.pyc index 8350c01..56e8775 100644 Binary files a/recruitment/__pycache__/linkedin_service.cpython-312.pyc and b/recruitment/__pycache__/linkedin_service.cpython-312.pyc differ diff --git a/recruitment/__pycache__/models.cpython-312.pyc b/recruitment/__pycache__/models.cpython-312.pyc index f67832d..826902f 100644 Binary files a/recruitment/__pycache__/models.cpython-312.pyc and b/recruitment/__pycache__/models.cpython-312.pyc differ diff --git a/recruitment/__pycache__/signals.cpython-312.pyc b/recruitment/__pycache__/signals.cpython-312.pyc index 0af7a5b..e8303fa 100644 Binary files a/recruitment/__pycache__/signals.cpython-312.pyc and b/recruitment/__pycache__/signals.cpython-312.pyc differ diff --git a/recruitment/__pycache__/urls.cpython-312.pyc b/recruitment/__pycache__/urls.cpython-312.pyc index 2ed18ea..12c1cc7 100644 Binary files a/recruitment/__pycache__/urls.cpython-312.pyc and b/recruitment/__pycache__/urls.cpython-312.pyc differ diff --git a/recruitment/__pycache__/views.cpython-312.pyc b/recruitment/__pycache__/views.cpython-312.pyc index 9e9fa12..58e19f8 100644 Binary files a/recruitment/__pycache__/views.cpython-312.pyc and b/recruitment/__pycache__/views.cpython-312.pyc differ diff --git a/recruitment/decorators.py b/recruitment/decorators.py new file mode 100644 index 0000000..b929bf2 --- /dev/null +++ b/recruitment/decorators.py @@ -0,0 +1,17 @@ +from functools import wraps +from datetime import date +from django.shortcuts import redirect, get_object_or_404 +from django.http import HttpResponseNotFound + +def job_not_expired(view_func): + @wraps(view_func) + def _wrapped_view(request, job_id, *args, **kwargs): + + from .models import JobPosting + job = get_object_or_404(JobPosting, pk=job_id) + + if job.expiration_date and job.application_deadline< date.today(): + return redirect('expired_job_page') + + return view_func(request, job_id, *args, **kwargs) + return _wrapped_view \ No newline at end of file diff --git a/templates/jobs/job_detail_candidate.html b/templates/jobs/job_detail_candidate.html index 72e99db..fb602a4 100644 --- a/templates/jobs/job_detail_candidate.html +++ b/templates/jobs/job_detail_candidate.html @@ -1,129 +1,228 @@ {% extends "base.html" %} {% block title %}{{ job.title }} - University ATS{% endblock %} +{% block customCSS %} + + +{% endblock %} {% block content %}
-
-
-
-

{{ job.title }}

- + +
+
+
+
Ready to Apply?
+
+
+

Review the job details, then apply below.

+ + + Apply for this Position + + + {% comment %}

+ Application ID: **{{ job.pk }}** +

{% endcomment %} +
+
+
+ +
+
+
+

{{ job.title }}

+ + {% with status_class=job.status|lower %} + {{ job.get_status_display }} + {% endwith %}
+
- -
-
- Department: {{ job.department|default:"Not specified" }} -
-
- Position Number: {{ job.position_number|default:"Not specified" }} -
-
-
-
- Job Type: {{ job.get_job_type_display }} +

Job Overview

+
+ + {% if job.salary_range %} +
+ + Salary: + {{ job.salary_range }}
-
- Workplace: {{ job.get_workplace_type_display }} -
-
- -
-
- Location: {{ job.get_location_display }} -
-
- Created By: {{ job.created_by|default:"Not specified" }} -
-
- - {% if job.salary_range %} -
-
- Salary Range: {{ job.salary_range }} -
-
- {% endif %} - - {% if job.start_date %} -
-
- Start Date: {{ job.start_date }} -
-
- {% endif %} - - {% if job.application_deadline %} -
-
- Application Deadline: {{ job.application_deadline }} - {% if job.is_expired %} - EXPIRED + {% endif %} + +
+ + Deadline: + {% if job.application_deadline %} + {{ job.application_deadline|date:"M d, Y" }} + {% if job.is_expired %} + EXPIRED + {% endif %} + {% else %} + Not specified {% endif %}
+ +
+ + Job Type: {{ job.get_job_type_display }} +
+ +
+ + Location: {{ job.get_location_display }} +
+ +
+ + Department: {{ job.department|default:"Not specified" }} +
+ +
+ + JOB ID: {{ job.internal_job_id|default:"N/A" }} +
+ +
+ + Workplace: {{ job.get_workplace_type_display }} +
+ +
+ + Created By: {{ job.created_by|default:"N/A" }} +
- {% endif %} - {% if job.description %} -
-
Description
-
{{ job.description|linebreaks }}
+
+
+
+ Job Description +
+
{{ job.description|linebreaks }}
{% endif %} {% if job.qualifications %} -
-
Qualifications
-
{{ job.qualifications|linebreaks }}
+
+
+
+ Qualifications +
+
{{ job.qualifications|linebreaks }}
{% endif %} {% if job.benefits %} -
-
Benefits
-
{{ job.benefits|linebreaks }}
+
+
+
+ Benefits +
+
{{ job.benefits|linebreaks }}
{% endif %} {% if job.application_instructions %} -
-
Application Instructions
-
{{ job.application_instructions|linebreaks }}
+
+
+
+ Application Instructions +
+
{{ job.application_instructions|linebreaks }}
{% endif %} -
- -
- - -
-
-
Ready to Apply?
-
-
-

Review the job details on the left, then click the button below to submit your application.

- - Apply for this Position - -

- You'll be redirected to our secure application form where you can upload your resume and provide additional details. -

-
-
- - - -
- +
+ {% if job.form_template.pk %} + + Apply for this Position + + {% endif %} +
{% endblock %} \ No newline at end of file