[UPDT] BASE: Updated html pages by replace boolean field values into Yes or No words in html using template tag

This commit is contained in:
Horilla
2024-12-13 15:38:20 +05:30
parent 873c2d871a
commit f13f679e79
8 changed files with 9 additions and 77 deletions

View File

@@ -1,53 +0,0 @@
{% load static %} {% load i18n horillafilters %}
{% if records %}
<div class="oh-sticky-table__table mt-3">
<div class="oh-sticky-table__thead">
<div class="oh-sticky-table__tr">
<div class="oh-sticky-table__th">{% trans "Leave Type" %}</div>
<div class="oh-sticky-table__th" style="width: 110px">
{% trans "Minus Days" %}
</div>
<div class="oh-sticky-table__th">
{% trans "Deducted From" %}
<span title="{% trans 'Carry Forward Days' %}">{% trans "CFD" %}</span>
</div>
<div class="oh-sticky-table__th">{% trans "Penalty amount" %}</div>
<div class="oh-sticky-table__th">{% trans "Created Date" %}</div>
</div>
</div>
<div class="oh-sticky-table__tbody">
{% for acc in records %}
<div class="oh-sticky-table__tr">
<div class="oh-sticky-table__td">{{ acc.leave_type_id }}</div>
<div class="oh-sticky-table__td">{{ acc.minus_leaves }}</div>
<div class="oh-sticky-table__td">
{% if acc.deduct_from_carry_forward %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
</div>
<div class="oh-sticky-table__td">
{{ acc.penalty_amount|currency_symbol_position }}
</div>
<div class="oh-sticky-table__td">{{ acc.created_at }}</div>
</div>
{% endfor %}
</div>
</div>
{% else %}
<div class="oh-sticky-table__table mt-3">
<div class="oh-404__subtitle">
<img
style="width: 190px; height: 190px"
src="{% static 'images/ui/no_penalty.png' %}"
class="oh-404__image mb-4"
alt="Page not found. 404."
/>
<h5 class="oh-404__subtitle">
{% trans "No penalties found" %}
</h5>
</div>
</div>
{% endif %}

View File

@@ -1,4 +1,4 @@
{% load i18n %}
{% load i18n %} {% load horillafilters %}
<div class="oh-sticky-table">
<div class="oh-sticky-table__table oh-table--sortable">
<div class="oh-sticky-table__thead">
@@ -17,11 +17,7 @@
<div class="oh-sticky-table__td">{{act.title}}</div>
<div class="oh-sticky-table__td">{{act.get_action_type_display}}</div>
<div class="oh-sticky-table__td">
{% if act.block_option %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
{{act.block_option|yes_no}}
</div>
{% if perms.employee.change_actiontype or perms.employee.delete_actiontype %}
<div class="oh-sticky-table__td">

View File

@@ -1,4 +1,4 @@
{% load i18n %}
{% load i18n %}{% load horillafilters %}
<div class="oh-sticky-table">
<div class="oh-sticky-table__table oh-table--sortable">
<div class="oh-sticky-table__thead">
@@ -14,11 +14,7 @@
{% for tag in audittags %}
<div class="oh-sticky-table__tr" draggable="true" id="auditTagTr{{tag.id}}">
<div class="oh-sticky-table__td">{{tag}}</div>
{% if tag.highlight == True %}
<div class="oh-sticky-table__td">{% trans "Yes" %}</div>
{% else %}
<div class="oh-sticky-table__td">{% trans "No" %}</div>
{% endif %}
<div class="oh-sticky-table__td">{{tag.highlight|yes_no}}</div>
{% if perms.horilla_audit.delete_audittag or perms.horilla_audit.delete_audittag %}
<div class="oh-sticky-table__td">
<div class="oh-btn-group">

View File

@@ -6,7 +6,7 @@
{% if "leave"|app_installed %}
<div class="oh-sticky-table__th">{% trans "Leave Type" %}</div>
<div class="oh-sticky-table__th" style="width: 110px">{% trans "Minus Days" %}</div>
<div class="oh-sticky-table__th">{% trans "Deducted From" %}<span
<div class="oh-sticky-table__th">{% trans "Deducted From " %}<span
title="{% trans 'Carry Forward Days' %}">{% trans "CFD" %}</span></div>
{% endif %}
<div class="oh-sticky-table__th">{% trans "Penalty amount" %}</div>

View File

@@ -87,9 +87,7 @@
<div class="oh-timeoff-modal__stat" style="margin-left: 20px;">
<span class="oh-timeoff-modal__stat-title">{% trans "Is permenent shift" %}</span>
<span class="oh-timeoff-modal__stat-count">
{% if shift_request.is_permanent_shift == True %} {% trans "Yes" %}
{% else %} {% trans "No" %}
{% endif %}
{{shift_request.is_permanent_shift|yes_no}}
</span>
</div>
</div>

View File

@@ -87,11 +87,7 @@
<div class="oh-timeoff-modal__stat" style="margin-left: 20px;">
<span class="oh-timeoff-modal__stat-title">{% trans "Is permenent work type" %}</span>
<span class="oh-timeoff-modal__stat-count">
{% if work_type_request.is_permanent_work_type == True %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
{{work_type_request.is_permanent_work_type|yes_no}}
</span>
</div>
</div>

View File

@@ -104,8 +104,7 @@
<div data-cell-index="1" class="oh-sticky-table__td">{{ i.action }}</div>
{% endif %}
<div data-cell-index="5" class="oh-sticky-table__td">
{% if i.action.block_option %} {% trans "Yes" %}
{% else %}{% trans "No" %}{% endif %}
{{ i.action.block_option|yes_no }}
</div>
{% if i.action.action_type == 'suspension' and i.unit_in == "days" %}
<div data-cell-index="2" class="oh-sticky-table__td">

View File

@@ -7,4 +7,4 @@
</ol>
{% else %}
{% trans "Not Added" %}
{% endif %}
{% endif %}