From dba9af100ae185ccecac57b236214a586f047d87 Mon Sep 17 00:00:00 2001 From: Faheed Date: Sun, 1 Feb 2026 13:38:06 +0300 Subject: [PATCH] before fixing the icon --- recruitment/templatetags/brand_logo.py | 25 + recruitment/templatetags/logo_tags.py | 142 + recruitment/urls.py | 3 +- .../TEMPLATE_TAILWIND_CONVERSION_SUMMARY.md | 310 ++ templates/account/login.html | 2 +- .../applicant/application_submit_form.html | 1943 +++++++------ templates/applicant/career.html | 1048 ++++--- .../applicant/job_application_detail.html | 683 +++-- .../partials/candidate_facing_base.html | 278 +- templates/base.html | 9 +- templates/forms/create_form_template.html | 179 +- templates/forms/document_form.html | 16 +- templates/forms/edit_form.html | 1134 ++------ templates/forms/form_builder.html | 2520 ++++++----------- templates/forms/form_embed.html | 549 ++-- templates/forms/form_list.html | 259 +- templates/forms/form_preview.html | 520 +++- templates/forms/form_submission_details.html | 302 +- .../forms/form_template_all_submissions.html | 520 ++-- .../forms/form_template_submissions_list.html | 519 ++-- templates/forms/form_templates_list.html | 564 ++-- templates/includes/_list_view_switcher.html | 82 +- .../application_exam_status_form.html | 34 +- .../includes/application_modal_body.html | 276 +- .../applications_update_exam_form.html | 49 +- .../applications_update_interview_form.html | 16 +- .../applications_update_offer_form.html | 16 +- .../includes/candidate_resume_template.html | 738 ++--- templates/includes/comment_form.html | 19 +- templates/includes/comment_list.html | 79 +- templates/includes/copy_to_clipboard.html | 60 +- templates/includes/delete_comment_form.html | 21 +- templates/includes/delete_modal.html | 26 +- templates/includes/document_list.html | 55 +- templates/includes/easy_logs.html | 504 ++-- templates/includes/edit_comment_form.html | 19 +- templates/includes/email_compose_form.html | 529 ++-- templates/includes/language_options.html | 12 +- templates/includes/meeting_form.html | 88 +- .../includes/schedule_interview_div.html | 169 +- templates/interviews/interview_detail.html | 176 +- templates/jobs/job_applicants.html | 40 +- templates/jobs/job_applications_list.html | 10 +- templates/logo/ats_logo.html | 60 + .../agency_access_link_confirm.html | 108 +- .../agency_access_link_detail.html | 226 +- .../recruitment/agency_assignment_detail.html | 777 ++--- templates/recruitment/agency_detail.html | 1153 +++----- templates/recruitment/agency_form.html | 718 +++-- .../agency_portal_assignment_detail.html | 863 ++---- .../recruitment/agency_portal_dashboard.html | 341 ++- .../recruitment/agency_portal_login.html | 504 ++-- .../agency_portal_persons_list.html | 449 +-- templates/recruitment/applicant_profile.html | 72 +- templates/recruitment/applicant_signup.html | 287 +- templates/recruitment/application_create.html | 397 +-- templates/recruitment/application_delete.html | 355 +-- templates/recruitment/application_detail.html | 891 +++--- .../application_resume_template.html | 1582 +++-------- templates/recruitment/application_update.html | 384 +-- .../applications_document_review_view.html | 874 +++--- .../recruitment/applications_exam_view.html | 838 +++--- .../recruitment/applications_hired_view.html | 988 +++---- .../applications_interview_view.html | 1087 ++++--- .../recruitment/applications_offer_view.html | 1006 +++---- .../applications_screening_view.html | 1005 ++++--- templates/recruitment/candidate_delete.html | 363 +-- templates/recruitment/interview_calendar.html | 164 +- templates/recruitment/interview_detail.html | 233 +- .../notification_confirm_all_read.html | 121 +- .../notification_confirm_delete.html | 68 +- templates/recruitment/notification_list.html | 253 +- templates/recruitment/partials/note_form.html | 248 +- .../recruitment/partials/note_modal.html | 17 +- .../partials/stage_confirmation_modal.html | 40 +- .../recruitment/schedule_meeting_form.html | 188 +- templates/recruitment/source_form.html | 1001 ++++--- templates/recruitment/source_list.html | 395 ++- 78 files changed, 14425 insertions(+), 18174 deletions(-) create mode 100644 recruitment/templatetags/brand_logo.py create mode 100644 recruitment/templatetags/logo_tags.py create mode 100644 templates/TEMPLATE_TAILWIND_CONVERSION_SUMMARY.md create mode 100644 templates/logo/ats_logo.html diff --git a/recruitment/templatetags/brand_logo.py b/recruitment/templatetags/brand_logo.py new file mode 100644 index 0000000..5270201 --- /dev/null +++ b/recruitment/templatetags/brand_logo.py @@ -0,0 +1,25 @@ +from django import template +from django.utils.safestring import mark_safe +import uuid + +register=template.Library() + +@register.inclusion_tag('logo/ats_logo.html') +def ats_tenhal_logo(height="140", extra_classes=""): + """ + Renders the Tenhal Logo. + The width is automatically calculated based on the 500:140 aspect ratio. + """ + # Calculate width based on original aspect ratio (approx 3.57) + try: + width = int(float(height) * (500 / 140)) + except ValueError: + width = "auto" + + return { + 'height': height, + 'width': width, + 'classes': extra_classes, + # We generate a unique ID so gradients don't break if the logo is used twice on one page + 'uid': uuid.uuid4().hex[:6] + } \ No newline at end of file diff --git a/recruitment/templatetags/logo_tags.py b/recruitment/templatetags/logo_tags.py new file mode 100644 index 0000000..a9cd5d8 --- /dev/null +++ b/recruitment/templatetags/logo_tags.py @@ -0,0 +1,142 @@ +from django import template +from django.utils.safestring import mark_safe + +register = template.Library() + +@register.simple_tag +def logo_tenhal_ats(height="40", width=None): + """ + Renders the Tenhal ATS logo SVG. + Usage: {% logo_tenhal_ats height="40" %} + """ + # Calculate width proportionally if not provided + if width is None: + width = str(int(float(height) * 3.57)) # Aspect ratio of 500/140 + + svg = f''' + + ''' + + return mark_safe(svg) + +@register.simple_tag +def logo_ats(height="40", width=None): + """ + Renders the Tenhal ATS logo SVG. + Usage: {% logo_tenhal_ats height="40" %} + """ + # Calculate width proportionally if not provided + if width is None: + width = height # Aspect ratio of 500/140 + + svg = f''' + + ''' + + return mark_safe(svg) \ No newline at end of file diff --git a/recruitment/urls.py b/recruitment/urls.py index d1f5821..45a9159 100644 --- a/recruitment/urls.py +++ b/recruitment/urls.py @@ -25,7 +25,8 @@ urlpatterns = [ # Job-specific Views path("jobs//applicants/", views.job_applicants_view, name="job_applicants"), path("jobs//applications/", views.JobApplicationListView.as_view(), name="job_applications_list"), - path("jobs//calendar/", views.interview_calendar_view, name="interview_calendar"), + path + ("jobs//calendar/", views.interview_calendar_view, name="interview_calendar"), # Job Actions & Integrations path("jobs//post-to-linkedin/", views.post_to_linkedin, name="post_to_linkedin"), diff --git a/templates/TEMPLATE_TAILWIND_CONVERSION_SUMMARY.md b/templates/TEMPLATE_TAILWIND_CONVERSION_SUMMARY.md new file mode 100644 index 0000000..d3ecbf8 --- /dev/null +++ b/templates/TEMPLATE_TAILWIND_CONVERSION_SUMMARY.md @@ -0,0 +1,310 @@ +# Template Tailwind CSS Conversion Summary + +## Objective +Convert all templates to match the base.html theme and use only Tailwind CSS instead of Bootstrap. + +## Base Theme Configuration +- **Primary Color**: Temple Red (#9d2235) and hover (#7a1a29) +- **Background Colors**: White (#ffffff), Light Gray (#f9fafb) +- **Border Colors**: Gray-200 (#e5e7eb) +- **Text Colors**: Gray-900 (#111827), Gray-700 (#374151), Gray-600 (#4b5563) +- **Icons**: Lucide Icons +- **Components**: + - Cards: `bg-white rounded-2xl shadow-sm border border-gray-200` + - Buttons Primary: `bg-temple-red hover:bg-[#7a1a29] text-white font-semibold px-4 py-2.5 rounded-xl` + - Buttons Secondary: `border border-gray-300 text-gray-700 hover:bg-gray-50 font-medium px-4 py-2 rounded-xl` + - Inputs: `w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-temple-red focus:border-transparent` + +## Completed Templates ✓ + +### Includes Directory (ALL COMPLETED ✓) +- [x] delete_modal.html +- [x] edit_comment_form.html +- [x] delete_comment_form.html +- [x] comment_form.html +- [x] comment_list.html +- [x] meeting_form.html +- [x] _list_view_switcher.html +- [x] language_options.html +- [x] search_form.html +- [x] easy_logs.html +- [x] paginator.html +- [x] application_exam_status_form.html +- [x] application_modal_body.html +- [x] applications_update_exam_form.html +- [x] applications_update_interview_form.html +- [x] applications_update_offer_form.html +- [x] candidate_resume_template.html +- [x] copy_to_clipboard.html +- [x] schedule_interview_div.html + +### Recruitment Directory +- [x] application_delete.html +- [x] candidate_delete.html +- [x] agency_access_link_confirm.html +- [x] notification_confirm_all_read.html +- [x] notification_confirm_delete.html +- [x] agency_access_link_detail.html +- [x] agency_portal_assignment_detail.html +- [x] applicant_signup.html +- [x] agency_portal_persons_list.html +- [x] interview_calendar.html +- [x] source_form.html + +### Recruitment/Partials Directory +- [x] stage_update_modal.html +- [x] note_form.html +- [x] note_modal.html +- [x] stage_confirmation_modal.html + +## Templates Requiring Conversion + +### Recruitment Directory +- [ ] agency_form.html +- [ ] agency_detail.html +- [ ] agency_portal_login.html +- [ ] agency_portal_dashboard.html +- [ ] agency_list.html +- [ ] agency_assignment_list.html +- [ ] settings_form.html +- [ ] settings_list.html +- [ ] settings_detail.html +- [ ] application_detail.html +- [ ] applications_list.html +- [ ] applicant_profile.html +- [ ] dashboard.html + +### Recruitment/Partials Directory +- [ ] _candidate_table.html +- [ ] _guage_chart.html +- [ ] ai_overview_breadcromb.html +- [ ] error.html +- [ ] exam-results.html +- [ ] interview-results.html +- [ ] offer-results.html +- [ ] stage_display.html +- [ ] stage_update_form.html +- [ ] stage_update_success.html +- [ ] stats_cards.html + +### Jobs Directory +- [ ] job_list.html +- [ ] job_detail.html +- [ ] create_job.html +- [ ] edit_job.html +- [ ] job_applicants.html +- [ ] applicants_of_stage.html +- [ ] apply_form.html +- [ ] application_success.html +- [ ] job_bank.html +- [ ] job_applications_list.html + +### Jobs/Partials Directory +- [ ] delete_modal.html +- [ ] applicant_tracking.html +- [ ] image_upload.html +- [ ] linkedin_content_form.html + +### Account Directory +- [ ] login.html +- [ ] logout.html +- [ ] account_inactive.html +- [ ] password_reset.html +- [ ] password_reset_done.html +- [ ] password_reset_from_key.html +- [ ] password_reset_from_key_done.html +- [ ] password_change.html +- [ ] email_confirm.html +- [ ] email.html +- [ ] verification_sent.html +- [ ] email/email_confirmation_message.html +- [ ] email/password_reset_key_message.html + +### Interviews Directory +- [ ] interview_list.html +- [ ] interview_detail.html +- [ ] interview_create_type_selection.html +- [ ] interview_create_onsite.html +- [ ] interview_create_remote.html +- [ ] interview_participants_form.html +- [ ] onsite_location_form.html +- [ ] preview_schedule.html +- [ ] schedule_interviews.html + +### Interviews/Partials Directory +- [ ] ai_questions_list.html +- [ ] interview_list.html + +### Interviews/Email Directory +- [ ] interview_invitation.html + +### People Directory +- [ ] person_list.html +- [ ] person_detail.html +- [ ] create_person.html +- [ ] update_person.html +- [ ] delete_person.html +- [ ] person_confirm_delete.html + +### Messages Directory +- [ ] message_list.html +- [ ] message_detail.html +- [ ] message_form.html +- [ ] application_message_list.html +- [ ] application_message_detail.html +- [ ] application_message_form.html + +### Meetings Directory +- [ ] list_meetings.html +- [ ] meeting_details.html +- [ ] create_meeting.html +- [ ] update_meeting.html +- [ ] delete_meeting_form.html +- [ ] create_remote_meeting.html +- [ ] reschedule_meeting.html +- [ ] reschedule_onsite_meeting.html +- [ ] schedule_meeting_form.html +- [ ] schedule_onsite_meeting_form.html + +### User Directory +- [ ] profile.html +- [ ] settings.html +- [ ] admin_settings.html +- [ ] portal_profile.html +- [ ] staff_password_create.html +- [ ] create_staff.html + +### Applicant Directory +- [ ] career.html +- [ ] job_application_detail.html +- [ ] application_submit_form.html + +### Applicant/Partials Directory +- [ ] candidate_facing_base.html + +### Forms Directory +- [ ] form_list.html +- [ ] form_templates_list.html +- [ ] create_form_template.html +- [ ] edit_form.html +- [ ] form_builder.html +- [ ] form_embed.html +- [ ] form_preview.html +- [ ] form_template_submissions_list.html +- [ ] form_template_all_submissions.html +- [ ] form_submission_details.html +- [ ] document_form.html + +## Conversion Guidelines + +### Key Changes Made: +1. **Removed Bootstrap classes** (e.g., `btn btn-primary`, `card`, `form-control`) +2. **Added Tailwind CSS classes** with custom color scheme +3. **Replaced Bootstrap icons** with Lucide Icons +4. **Standardized component styling** using: + - `bg-temple-red` for primary actions + - `rounded-2xl` for cards + - `shadow-sm` for subtle depth + - Consistent padding and spacing + +### Common Patterns: + +#### Buttons +```html + + + + + +``` + +#### Cards +```html +
+
+ +
+
+``` + +#### Forms +```html +
+ + +
+``` + +#### Alerts/Notifications +```html + +
+ Success Message +
+ + +
+ Error Message +
+ + +
+ Warning Message +
+ + +
+ Info Message +
+``` + +#### Modals +```html + +``` + +#### Badges +```html + + Badge Text + +``` + +## Status Summary + +- **Total Templates**: ~150+ +- **Completed**: ~25 +- **Remaining**: ~125+ +- **Completion**: ~17% + +## Next Steps + +1. Continue converting remaining templates in recruitment directory +2. Convert all templates in jobs directory +3. Convert all templates in account directory +4. Convert all templates in interviews directory +5. Convert all templates in other directories +6. Remove Bootstrap CDN links from base.html once all templates are converted +7. Test all templates for consistency and functionality + +## Notes + +- All converted templates use Lucide Icons instead of Font Awesome or Bootstrap icons +- Custom Tailwind config needed for `bg-temple-red` color (should be added to tailwind.config.js) +- Modal interactions now use JavaScript instead of Bootstrap's data attributes +- All forms use consistent styling and validation states +- Responsive design is maintained through Tailwind's responsive prefixes (sm:, md:, lg:, etc.) \ No newline at end of file diff --git a/templates/account/login.html b/templates/account/login.html index 0469aa7..122f13f 100644 --- a/templates/account/login.html +++ b/templates/account/login.html @@ -145,4 +145,4 @@ lucide.createIcons(); - \ No newline at end of file +h \ No newline at end of file diff --git a/templates/applicant/application_submit_form.html b/templates/applicant/application_submit_form.html index ccc8b06..955d9ac 100644 --- a/templates/applicant/application_submit_form.html +++ b/templates/applicant/application_submit_form.html @@ -1,845 +1,1019 @@ {% extends 'applicant/partials/candidate_facing_base.html' %} {% load static i18n %} + {% block title %}{% trans "Career Application Form" %}{% endblock %} + {% block content %} - - -
-
- - {{job.title}}   {{job_id}} - -
-
- -
-
-
-
- -
1 of 1
+
+ +
+
+
+
+

{{ job.title }}

+

{{ job.department }}

+
+
1 of 1
+
+
+
+
-
-
- + + +
+
+ +
+ + + -
-
- +// Load template +async function loadTemplate() { + try { + const response = await fetch(`/api/v1/templates/${state.jobSlug}/`); + + console.log('Template API response status:', response.status); + + // Check if redirected + if (response.redirected) { + window.location.href = response.url; + return; + } + + // Get response text first + const responseText = await response.text(); + + // Try to parse as JSON + let result; + try { + result = JSON.parse(responseText); + } catch (e) { + console.error('Template API response (non-JSON):', responseText.substring(0, 500)); + + // Check if HTML (login page) + if (responseText.trim().startsWith(' {% endblock content %} \ No newline at end of file diff --git a/templates/applicant/career.html b/templates/applicant/career.html index 59127e7..40e591e 100644 --- a/templates/applicant/career.html +++ b/templates/applicant/career.html @@ -4,410 +4,247 @@ {% block title %}{% trans "Career Opportunities" %}{% endblock %} {% block content %} - -
-
-
-

{% trans "Build Your Future" %}

-

{% trans "Join a community of excellence and growth." %}

+ +
+
+
+ +
+
+
+ {% trans "We're Hiring" %} +
+

+ {% trans "Build Your Future" %} +

+

+ {% trans "Join a community of excellence and growth. Discover opportunities that match your passion and expertise." %} +

+ +
+
+
{{ total_open_roles|default:"0" }}
+
{% trans "Open Positions" %}
+
+
+
50+
+
{% trans "Departments" %}
+
+
+
95%
+
{% trans "Satisfaction Rate" %}
+
+
+
+
+ +
+ + +
-
- -
-
+ -