Compare commits
2 Commits
d1dda003d6
...
f9aaaeb788
| Author | SHA1 | Date | |
|---|---|---|---|
| f9aaaeb788 | |||
| 99643eb08c |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -629,6 +629,10 @@ class JobPostingStatusForm(forms.ModelForm):
|
|||||||
widgets = {
|
widgets = {
|
||||||
'status': forms.Select(attrs={'class': 'form-select'}),
|
'status': forms.Select(attrs={'class': 'form-select'}),
|
||||||
}
|
}
|
||||||
|
class LinkedPostContentForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = JobPosting
|
||||||
|
fields = ['linkedin_post_formated_data']
|
||||||
|
|
||||||
class FormTemplateIsActiveForm(forms.ModelForm):
|
class FormTemplateIsActiveForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
@ -137,12 +137,17 @@ def format_job_description(pk):
|
|||||||
|
|
||||||
**HASHTAGS: for search and reach:**
|
**HASHTAGS: for search and reach:**
|
||||||
{job_posting.hash_tags}
|
{job_posting.hash_tags}
|
||||||
|
|
||||||
|
**APPLICATION URL: for career page only if it is provided**
|
||||||
|
{job_posting.application_url}
|
||||||
---
|
---
|
||||||
|
|
||||||
**TASK 1: HTML Formatting (Two Blocks)**
|
**TASK 1: HTML Formatting (Two Blocks)**
|
||||||
1. **Format the Job Description:** Organize and format the raw JOB DESCRIPTION and BENEFITS data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
1. **Format the Job Description:** Organize and format the raw JOB DESCRIPTION and BENEFITS data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
||||||
2. **Format the Qualifications:** Organize and format the raw QUALIFICATIONS data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
2. **Format the Qualifications:** Organize and format the raw QUALIFICATIONS data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
||||||
2. **Format the Requirements:** Organize and format the raw Requirements data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
3. **Format the Benefits:** Organize and format the raw Requirements data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
||||||
|
4. **Application Instructions:** Organize and format the raw Requirements data into clear, readable sections using `<h2>` headings and `<ul>`/`<li>` bullet points. Encapsulate the entire formatted block within a single `<div>`.
|
||||||
|
|
||||||
|
|
||||||
**TASK 2: LinkedIn Post Creation**
|
**TASK 2: LinkedIn Post Creation**
|
||||||
1. **Write the Post:** Create an engaging, professional, and concise LinkedIn post (maximum 1300 characters) summarizing the opportunity.
|
1. **Write the Post:** Create an engaging, professional, and concise LinkedIn post (maximum 1300 characters) summarizing the opportunity.
|
||||||
@ -158,8 +163,9 @@ def format_job_description(pk):
|
|||||||
**Output Keys:**
|
**Output Keys:**
|
||||||
1. `html_job_description`
|
1. `html_job_description`
|
||||||
2. `html_qualifications`
|
2. `html_qualifications`
|
||||||
3 `html_job_requirements`
|
3. 'html_benefits'
|
||||||
4. `linkedin_post_data`
|
4. 'html_application_instructions'
|
||||||
|
5. `linkedin_post_data`
|
||||||
|
|
||||||
**Do not include any other text, explanation, or markdown outside of the final JSON object.**
|
**Do not include any other text, explanation, or markdown outside of the final JSON object.**
|
||||||
"""
|
"""
|
||||||
@ -176,6 +182,8 @@ def format_job_description(pk):
|
|||||||
|
|
||||||
job_posting.description = data.get('html_job_description')
|
job_posting.description = data.get('html_job_description')
|
||||||
job_posting.qualifications = data.get('html_qualifications')
|
job_posting.qualifications = data.get('html_qualifications')
|
||||||
|
job_posting.benefits=data.get('html_benefits')
|
||||||
|
job_posting.application_instructions=data.get('html_application_instruction')
|
||||||
job_posting.linkedin_post_formated_data=data.get('linkedin_post_data')
|
job_posting.linkedin_post_formated_data=data.get('linkedin_post_data')
|
||||||
job_posting.save(update_fields=['description', 'qualifications','linkedin_post_formated_data'])
|
job_posting.save(update_fields=['description', 'qualifications','linkedin_post_formated_data'])
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,7 @@ urlpatterns = [
|
|||||||
path('forms/', views.form_templates_list, name='form_templates_list'),
|
path('forms/', views.form_templates_list, name='form_templates_list'),
|
||||||
path('forms/create-template/', views.create_form_template, name='create_form_template'),
|
path('forms/create-template/', views.create_form_template, name='create_form_template'),
|
||||||
|
|
||||||
|
path('jobs/<slug:slug>/edit_linkedin_post_content/',views.edit_linkedin_post_content,name='edit_linkedin_post_content'),
|
||||||
path('jobs/<slug:slug>/candidate_screening_view/', views.candidate_screening_view, name='candidate_screening_view'),
|
path('jobs/<slug:slug>/candidate_screening_view/', views.candidate_screening_view, name='candidate_screening_view'),
|
||||||
path('jobs/<slug:slug>/candidate_exam_view/', views.candidate_exam_view, name='candidate_exam_view'),
|
path('jobs/<slug:slug>/candidate_exam_view/', views.candidate_exam_view, name='candidate_exam_view'),
|
||||||
path('jobs/<slug:slug>/candidate_interview_view/', views.candidate_interview_view, name='candidate_interview_view'),
|
path('jobs/<slug:slug>/candidate_interview_view/', views.candidate_interview_view, name='candidate_interview_view'),
|
||||||
|
|||||||
@ -33,6 +33,7 @@ from .forms import (
|
|||||||
StaffUserCreationForm,
|
StaffUserCreationForm,
|
||||||
MeetingCommentForm,
|
MeetingCommentForm,
|
||||||
ToggleAccountForm,
|
ToggleAccountForm,
|
||||||
|
LinkedPostContentForm
|
||||||
|
|
||||||
)
|
)
|
||||||
from easyaudit.models import CRUDEvent, LoginEvent, RequestEvent
|
from easyaudit.models import CRUDEvent, LoginEvent, RequestEvent
|
||||||
@ -343,6 +344,7 @@ def job_detail(request, slug):
|
|||||||
offer_count = applicants.filter(stage="Offer").count()
|
offer_count = applicants.filter(stage="Offer").count()
|
||||||
|
|
||||||
status_form = JobPostingStatusForm(instance=job)
|
status_form = JobPostingStatusForm(instance=job)
|
||||||
|
linkedin_content_form=LinkedPostContentForm(instance=job)
|
||||||
try:
|
try:
|
||||||
# If the related object exists, use its instance data
|
# If the related object exists, use its instance data
|
||||||
image_upload_form = JobPostingImageForm(instance=job.post_images)
|
image_upload_form = JobPostingImageForm(instance=job.post_images)
|
||||||
@ -471,6 +473,7 @@ def job_detail(request, slug):
|
|||||||
'high_potential_ratio': high_potential_ratio,
|
'high_potential_ratio': high_potential_ratio,
|
||||||
'avg_t2i_days': avg_t2i_days,
|
'avg_t2i_days': avg_t2i_days,
|
||||||
'avg_t_in_exam_days': avg_t_in_exam_days,
|
'avg_t_in_exam_days': avg_t_in_exam_days,
|
||||||
|
'linkedin_content_form':linkedin_content_form
|
||||||
}
|
}
|
||||||
return render(request, "jobs/job_detail.html", context)
|
return render(request, "jobs/job_detail.html", context)
|
||||||
|
|
||||||
@ -508,6 +511,30 @@ def job_image_upload(request, slug):
|
|||||||
return redirect('job_detail', slug=job.slug)
|
return redirect('job_detail', slug=job.slug)
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def edit_linkedin_post_content(request,slug):
|
||||||
|
|
||||||
|
job=get_object_or_404(JobPosting,slug=slug)
|
||||||
|
linkedin_content_form=LinkedPostContentForm(instance=job)
|
||||||
|
if request.method=='POST':
|
||||||
|
linkedin_content_form=LinkedPostContentForm(request.POST,instance=job)
|
||||||
|
if linkedin_content_form.is_valid():
|
||||||
|
linkedin_content_form.save()
|
||||||
|
messages.success(request,"Linked post content updated successfully!")
|
||||||
|
return redirect('job_detail',job.slug)
|
||||||
|
else:
|
||||||
|
messages.error(request,"Error update the Linkedin Post content")
|
||||||
|
return redirect('job_detail',job.slug)
|
||||||
|
|
||||||
|
else:
|
||||||
|
linkedin_content_form=LinkedPostContentForm()
|
||||||
|
return redirect('job_detail',job.slug)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def kaauh_career(request):
|
def kaauh_career(request):
|
||||||
active_jobs = JobPosting.objects.select_related(
|
active_jobs = JobPosting.objects.select_related(
|
||||||
'form_template'
|
'form_template'
|
||||||
|
|||||||
@ -356,6 +356,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -404,6 +406,11 @@
|
|||||||
<small>{% trans "Error:" %} {{ job.linkedin_post_status }}</small>
|
<small>{% trans "Error:" %} {{ job.linkedin_post_status }}</small>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if job.linkedin_post_formated_data %}
|
||||||
|
<button type="button" class="btn btn-main-action w-100" data-bs-toggle="modal" data-bs-target="#linkedinData">
|
||||||
|
<i class="fas fa-edit me-1"></i> {% trans "Update LinkedIn Content" %}
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -499,6 +506,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% include "jobs/partials/image_upload.html" %}
|
{% include "jobs/partials/image_upload.html" %}
|
||||||
|
{% include "jobs/partials/linkedin_content_form.html"%}
|
||||||
|
|
||||||
<div class="modal fade" id="editStatusModal" tabindex="-1" aria-labelledby="editStatusModalLabel" aria-hidden="true">
|
<div class="modal fade" id="editStatusModal" tabindex="-1" aria-labelledby="editStatusModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|||||||
22
templates/jobs/partials/linkedin_content_form.html
Normal file
22
templates/jobs/partials/linkedin_content_form.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{% load crispy_forms_tags %}
|
||||||
|
<div class="modal fade mt-4" id="linkedinData" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="myModalLabel">Edit linkedin Post content</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form method="post" action="{% url 'edit_linkedin_post_content' job.slug %}" enctype="multipart/form-data" >
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ linkedin_content_form|crispy }}
|
||||||
|
<div class="modal-footer mt-2">
|
||||||
|
<button type="button" class="btn btn-lg btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
|
<button type="submit" class="btn btn-main-action ">Save changes</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user