From 51f16e8712aa3a12087e8ae25fad07f5ad9901a1 Mon Sep 17 00:00:00 2001 From: Horilla Date: Tue, 26 Aug 2025 10:17:41 +0530 Subject: [PATCH] [UPDT] BASE: Updated mail template Delete button title --- base/templates/mail/empty_mail_template.html | 53 ++++++-------------- base/templates/mail/view_templates.html | 2 +- load_data/mail_automations.json | 28 ++++++++++- load_data/mail_templates.json | 17 ++++++- 4 files changed, 58 insertions(+), 42 deletions(-) diff --git a/base/templates/mail/empty_mail_template.html b/base/templates/mail/empty_mail_template.html index 6b41b8f82..c49e4d31b 100644 --- a/base/templates/mail/empty_mail_template.html +++ b/base/templates/mail/empty_mail_template.html @@ -1,50 +1,29 @@ {% extends 'index.html' %} {% load static i18n %} {% block content %} -
-
+

{% trans "Mail Templates" %}

{% if perms.base.add_horillamailtemplate %} - + {% endif %}
-
-
-
- Page not found. 404. -
- {% trans "There are currently no email templates." %} -
-
-
-
+
+
+ Page not found. 404. +

{% trans "No Records found." %}

+

{% trans "There are currently no email templates available." %}

+
+
{% endblock content %} diff --git a/base/templates/mail/view_templates.html b/base/templates/mail/view_templates.html index 1a968af1a..dd857014e 100644 --- a/base/templates/mail/view_templates.html +++ b/base/templates/mail/view_templates.html @@ -52,7 +52,7 @@ class="text-danger" style="cursor: pointer" onclick="return confirm('Do you want to delete this template?')" - title="{% trans 'Edit' %}" + title="{% trans 'Delete' %}" > diff --git a/load_data/mail_automations.json b/load_data/mail_automations.json index 34511472b..acfbea201 100644 --- a/load_data/mail_automations.json +++ b/load_data/mail_automations.json @@ -151,8 +151,8 @@ "created_by": 1, "modified_by": 1, "is_active": true, - "title": "Offer of Employment at {{nstance.get_company}}", - "method_title": "offer_of_employment_at_{{nstance.get_company}}", + "title": "Offer of Employment at {{instance.get_company}}", + "method_title": "offer_of_employment_at_{{instance.get_company}}", "model": "recruitment.models.Candidate", "mail_to": "['get_email']", "mail_details": "pk", @@ -334,5 +334,29 @@ "also_sent_to": [], "template_attachments": [] } + }, + { + "model": "horilla_automations.mailautomation", + "pk": 15, + "fields": { + "created_at": "2025-08-26T03:39:26.124Z", + "created_by": 1, + "modified_by": 1, + "is_active": true, + "title": "Application Status Update - {{ instance.job_position_id }}", + "method_title": "application_status_update_-_{{_instance.job_position_id_}}", + "model": "recruitment.models.RejectedCandidate", + "mail_to": "['candidate_id__get_email']", + "mail_details": "candidate_id__pk", + "mail_detail_choice": "", + "trigger": "on_create", + "mail_template": 17, + "delivery_channel": "email", + "condition_html": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
CodeFieldConditionValueLogic\r\n Action \r\n \r\n \r\n \r\n
C1\r\n \r\n Is Active\r\n ==\r\n
\r\n And\r\n \r\n
\r\n \r\n \r\n
\r\n
", + "condition_querystring": "automation_multiple_condition=automation_multiple_is_active&condition=%3D%3D&automation_multiple_condition=on&logic=and", + "condition": "
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
CodeFieldConditionValueLogic\r\n Action \r\n \r\n \r\n \r\n
C1\r\n \r\n Is Active\r\n ==\r\n
\r\n And\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n ", + "also_sent_to": [], + "template_attachments": [] + } } ] diff --git a/load_data/mail_templates.json b/load_data/mail_templates.json index 1fe11bed0..00d32d401 100644 --- a/load_data/mail_templates.json +++ b/load_data/mail_templates.json @@ -191,7 +191,7 @@ "is_active": false, "title": "Work Type Request Template", "body": "
\n
\n

Work Type Change Request

\n\n

\n Dear {{ model_instance.employee_id.get_reporting_manager }},\n

\n\n

\n A new work type change request has been submitted by {{ model_instance.employee_id }}.\n

\n\n
\n

Current Work Type: {{ model_instance.previous_work_type_id }}

\n

Requested Work Type: {{ model_instance.work_type_id }}

\n

From: {{ model_instance.requested_date }}

\n

Till: {{ model_instance.requested_till }}

\n

Description: {{ model_instance.description }}

\n
\n\n

\n Please review and process this request from your HRMS dashboard.\n

\n\n
\n \n Review Request\n \n
\n\n
\n\n

\n This is an automated message from the HRMS system.
\n Regards, {{ model_instance.employee_id.get_company }}\n

\n
\n
", - "company_id": 1 + "company_id": null } }, { @@ -204,7 +204,20 @@ "is_active": false, "title": "Shift Request Template", "body": "
\n
\n

Shift Change Request

\n\n

\n Dear {{ model_instance.employee_id.get_reporting_manager }},\n

\n\n

\n {{ model_instance.employee_id }} has submitted a shift change request. Please find the details below.\n

\n\n
\n

Previous Shift: {{ model_instance.previous_shift_id }}

\n

Requested Shift: {{ model_instance.shift_id }}

\n

Requested From: {{ model_instance.requested_date }}

\n {% if model_instance.requested_till %}\n

Requested Till: {{ model_instance.requested_till }}

\n {% endif %}\n

Permanent Change: {% if model_instance.is_permanent_shift %}Yes{% else %}No{% endif %}

\n {% if model_instance.reallocate_to %}\n

Reallocate To: {{ model_instance.reallocate_to }}

\n {% endif %}\n {% if model_instance.description %}\n

Description: {{ model_instance.description }}

\n {% endif %}\n
\n\n

\n Please log in to the HRMS system to review and take necessary action on this request.\n

\n\n
\n \n Review Request\n \n
\n\n
\n\n

\n This is an automated message from the HRMS system.
\n Regards, {% if model_instance.employee_id.get_company %}{{ model_instance.employee_id.get_company }}{% else %}HRMS{% endif %}\n

\n
\n
", - "company_id": 1 + "company_id": null + } + }, + { + "model": "base.horillamailtemplate", + "pk": 17, + "fields": { + "created_at": "2025-08-26T03:36:27.757Z", + "created_by": 1, + "modified_by": 1, + "is_active": false, + "title": "Application Status - Not Selected", + "body": "
\n
\n\n

\n Application Status Update - {{ instance.job_position_id }}\n

\n\n

\n Dear {{ instance.name }},\n

\n\n

\n Thank you for applying for the\n {{ instance.job_position_id }} position at\n {% if instance.recruitment_id.company_id %}\n {{ instance.recruitment_id.company_id }}.\n {% else %}\n our company.\n {% endif %}\n

\n\n {% if instance.rejected_candidate.reject_reason_id %}\n

\n After careful consideration, we regret to inform you that your application has not been successful at this time.\n

\n\n
\n

\n Reason for Rejection:\n

\n
    \n {% if instance.rejected_candidate.reject_reason_id.all %}\n {% for reason in instance.rejected_candidate.reject_reason_id.all %}\n
  • {{ reason }}
  • \n {% endfor %}\n {% else %}\n
  • Not specified.
  • \n {% endif %}\n
\n

\n {{ instance.rejected_candidate.description }}\n

\n
\n {% endif %}\n\n

\n We sincerely appreciate the time and effort you invested in your application and encourage you to apply for\n future opportunities that align with your skills and career goals.\n

\n\n
\n\n

\n Best regards,
\n {% if instance.recruitment_id.company_id %}\n {{ instance.recruitment_id.company_id }} Recruitment Team\n {% else %}\n Recruitment Team\n {% endif %}\n

\n\n

\n This is an automated email. Please do not reply directly to this message.\n

\n
\n
", + "company_id": null } } ]