From 2d70a660f1d418b6905b96755c9fd6dea56ece16 Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 1 Oct 2025 13:54:44 +0530 Subject: [PATCH] [FIX] EMPLOYEE: #918 --- .../templates/documents/document_nav.html | 4 +- employee/templates/documents/requests.html | 21 ++- employee/templates/tabs/htmx/view_file.html | 129 +++++++----------- employee/views.py | 30 +++- 4 files changed, 94 insertions(+), 90 deletions(-) diff --git a/employee/templates/documents/document_nav.html b/employee/templates/documents/document_nav.html index 258b2c3d5..b4850c3d1 100644 --- a/employee/templates/documents/document_nav.html +++ b/employee/templates/documents/document_nav.html @@ -23,8 +23,10 @@
{% if documents %}
{% trans "View File" %} -
@@ -140,11 +140,22 @@ {% else %} {% comment %} # 918 {% endcomment %} - + title="{% trans 'Approve' %}" + class="oh-btn oh-btn--success w-100" + onclick="event.stopPropagation();" + > {% endif %} diff --git a/employee/templates/tabs/htmx/view_file.html b/employee/templates/tabs/htmx/view_file.html index 81cae5b9e..279826c24 100644 --- a/employee/templates/tabs/htmx/view_file.html +++ b/employee/templates/tabs/htmx/view_file.html @@ -1,98 +1,73 @@ {% load i18n %} {% load horillafilters %} {% load static %}
- + {% if document.document %} - {% if perms.horilla_document.change_documentrequest %} - {% if document.status == "approved" %} - - - - {% else %} - - - + {% if perms.horilla_document.change_documentrequest %} + {% if document.status == "approved" %} + + + + {% else %} + + + + {% endif %} + {% if document.status == "rejected" %} + + + + {% else %} + + + + {% endif %} {% endif %} - {% if document.status == "rejected" %} - - - - {% else %} - - - - {% endif %} - {% endif %} - + + {% endif %}
{% if document.document %} -