From bf480e19eb94fd461c948fd30e7d47966e05cfda Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:42:19 +0530 Subject: [PATCH 1/4] feat(Job Portal): add Publish Applications Received toggle (#1561) (#1601) * feat: add Publish Applications Received toggle * feat: add a description to the Publish Applications Received field (cherry picked from commit 130fde9ac07514d325673936019f4e8f3581cdcf) Co-authored-by: Akash Tom <61287991+krantheman@users.noreply.github.com> --- hrms/hr/doctype/job_opening/job_opening.json | 9 ++++++ hrms/templates/generators/job_opening.html | 34 +++++++++++--------- hrms/www/jobs/index.html | 10 ++++-- hrms/www/jobs/index.py | 1 + 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/hrms/hr/doctype/job_opening/job_opening.json b/hrms/hr/doctype/job_opening/job_opening.json index 6e3331694e..7edf4a91b3 100644 --- a/hrms/hr/doctype/job_opening/job_opening.json +++ b/hrms/hr/doctype/job_opening/job_opening.json @@ -30,6 +30,7 @@ "section_break_6", "publish", "route", + "publish_applications_received", "column_break_12", "job_application_route", "section_break_14", @@ -241,6 +242,14 @@ "fieldtype": "Select", "label": "Salary Paid Per", "options": "Month\nYear" + }, + { + "default": "1", + "depends_on": "publish", + "description": "If enabled, the total no. of applications received for this opening will be displayed on the website", + "fieldname": "publish_applications_received", + "fieldtype": "Check", + "label": "Publish Applications Received" } ], "icon": "fa fa-bookmark", diff --git a/hrms/templates/generators/job_opening.html b/hrms/templates/generators/job_opening.html index 1ef81698d5..740ab40014 100644 --- a/hrms/templates/generators/job_opening.html +++ b/hrms/templates/generators/job_opening.html @@ -145,24 +145,26 @@ {% endif %} -
-
-
- - - -
-
-
{{ _("Applications Received") }}
-
{{ no_of_applications }}
+ {%- if publish_applications_received -%} +
+
+
+ + + +
+
+
{{ _("Applications Received") }}
+
{{ no_of_applications }}
+
-
+ {%- endif -%} {%- if (status == 'Open' and closes_on) or (status == 'Closed' and closed_on) -%}
diff --git a/hrms/www/jobs/index.html b/hrms/www/jobs/index.html index f32a759800..b7be8d1f00 100644 --- a/hrms/www/jobs/index.html +++ b/hrms/www/jobs/index.html @@ -230,9 +230,13 @@

{{ _("Job Openings") }}