From f13f679e79ca1190b4553add4e5569e8c5548eaf Mon Sep 17 00:00:00 2001 From: Horilla Date: Fri, 13 Dec 2024 15:38:20 +0530 Subject: [PATCH] [UPDT] BASE: Updated html pages by replace boolean field values into Yes or No words in html using template tag --- .../attendance/penalty/penalty_view.html | 53 ------------------- .../base/action_type/action_type_view.html | 8 +-- .../base/audit_tag/audit_tag_view.html | 8 +-- base/templates/penalty/penalty_view.html | 2 +- .../htmx/shift_request_detail.html | 4 +- .../htmx/work_type_request_single_view.html | 6 +-- .../disciplinary_records.html | 3 +- .../horilla_automations/mail_cc.html | 2 +- 8 files changed, 9 insertions(+), 77 deletions(-) delete mode 100644 attendance/templates/attendance/penalty/penalty_view.html diff --git a/attendance/templates/attendance/penalty/penalty_view.html b/attendance/templates/attendance/penalty/penalty_view.html deleted file mode 100644 index 345c3885b..000000000 --- a/attendance/templates/attendance/penalty/penalty_view.html +++ /dev/null @@ -1,53 +0,0 @@ -{% load static %} {% load i18n horillafilters %} -{% if records %} -
-
-
-
{% trans "Leave Type" %}
-
- {% trans "Minus Days" %} -
-
- {% trans "Deducted From" %} - {% trans "CFD" %} -
-
{% trans "Penalty amount" %}
-
{% trans "Created Date" %}
-
-
-
- {% for acc in records %} -
-
{{ acc.leave_type_id }}
-
{{ acc.minus_leaves }}
-
- {% if acc.deduct_from_carry_forward %} - {% trans "Yes" %} - {% else %} - {% trans "No" %} - {% endif %} -
-
- {{ acc.penalty_amount|currency_symbol_position }} -
-
{{ acc.created_at }}
-
- {% endfor %} -
-
-{% else %} -
-
- Page not found. 404. -
- {% trans "No penalties found" %} -
-
-
- -{% endif %} diff --git a/base/templates/base/action_type/action_type_view.html b/base/templates/base/action_type/action_type_view.html index a57acd751..11034dc80 100644 --- a/base/templates/base/action_type/action_type_view.html +++ b/base/templates/base/action_type/action_type_view.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n %} {% load horillafilters %}
@@ -17,11 +17,7 @@
{{act.title}}
{{act.get_action_type_display}}
- {% if act.block_option %} - {% trans "Yes" %} - {% else %} - {% trans "No" %} - {% endif %} + {{act.block_option|yes_no}}
{% if perms.employee.change_actiontype or perms.employee.delete_actiontype %}
diff --git a/base/templates/base/audit_tag/audit_tag_view.html b/base/templates/base/audit_tag/audit_tag_view.html index 3740b8927..1e684ba11 100644 --- a/base/templates/base/audit_tag/audit_tag_view.html +++ b/base/templates/base/audit_tag/audit_tag_view.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n %}{% load horillafilters %}
@@ -14,11 +14,7 @@ {% for tag in audittags %}
{{tag}}
- {% if tag.highlight == True %} -
{% trans "Yes" %}
- {% else %} -
{% trans "No" %}
- {% endif %} +
{{tag.highlight|yes_no}}
{% if perms.horilla_audit.delete_audittag or perms.horilla_audit.delete_audittag %}
diff --git a/base/templates/penalty/penalty_view.html b/base/templates/penalty/penalty_view.html index 676f4fca8..7f41fc26b 100644 --- a/base/templates/penalty/penalty_view.html +++ b/base/templates/penalty/penalty_view.html @@ -6,7 +6,7 @@ {% if "leave"|app_installed %}
{% trans "Leave Type" %}
{% trans "Minus Days" %}
-
{% trans "Deducted From" %}{% trans "Deducted From " %}{% trans "CFD" %}
{% endif %}
{% trans "Penalty amount" %}
diff --git a/base/templates/shift_request/htmx/shift_request_detail.html b/base/templates/shift_request/htmx/shift_request_detail.html index d09520c0f..bac974f1f 100644 --- a/base/templates/shift_request/htmx/shift_request_detail.html +++ b/base/templates/shift_request/htmx/shift_request_detail.html @@ -87,9 +87,7 @@
{% trans "Is permenent shift" %} - {% if shift_request.is_permanent_shift == True %} {% trans "Yes" %} - {% else %} {% trans "No" %} - {% endif %} + {{shift_request.is_permanent_shift|yes_no}}
diff --git a/base/templates/work_type_request/htmx/work_type_request_single_view.html b/base/templates/work_type_request/htmx/work_type_request_single_view.html index 296130205..9b547a5de 100644 --- a/base/templates/work_type_request/htmx/work_type_request_single_view.html +++ b/base/templates/work_type_request/htmx/work_type_request_single_view.html @@ -87,11 +87,7 @@
{% trans "Is permenent work type" %} - {% if work_type_request.is_permanent_work_type == True %} - {% trans "Yes" %} - {% else %} - {% trans "No" %} - {% endif %} + {{work_type_request.is_permanent_work_type|yes_no}}
diff --git a/employee/templates/disciplinary_actions/disciplinary_records.html b/employee/templates/disciplinary_actions/disciplinary_records.html index 1e300a2e5..6163139a9 100644 --- a/employee/templates/disciplinary_actions/disciplinary_records.html +++ b/employee/templates/disciplinary_actions/disciplinary_records.html @@ -104,8 +104,7 @@
{{ i.action }}
{% endif %}
- {% if i.action.block_option %} {% trans "Yes" %} - {% else %}{% trans "No" %}{% endif %} + {{ i.action.block_option|yes_no }}
{% if i.action.action_type == 'suspension' and i.unit_in == "days" %}
diff --git a/horilla_automations/templates/horilla_automations/mail_cc.html b/horilla_automations/templates/horilla_automations/mail_cc.html index 0834bedef..9b3ac037a 100644 --- a/horilla_automations/templates/horilla_automations/mail_cc.html +++ b/horilla_automations/templates/horilla_automations/mail_cc.html @@ -7,4 +7,4 @@ {% else %} {% trans "Not Added" %} -{% endif %} \ No newline at end of file +{% endif %}