[ADD]user-leave-empty-view.html
This commit is contained in:
20
leave/templates/leave/user-leave-empty-view.html
Normal file
20
leave/templates/leave/user-leave-empty-view.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends 'index.html' %}{% block content %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
<div
|
||||
class="oh-wrapper-main"
|
||||
>
|
||||
<main :class="sidebarOpen ? 'oh-main__sidebar-visible' : ''">
|
||||
|
||||
<div class="oh-wrapper">
|
||||
<div class="oh-404">
|
||||
<img style=" width: 150px;height: 150px;" src="{% static 'images/ui/leave_types.png' %}" class="oh-404__image" alt="Page not found. 404."/>
|
||||
<h3 class="oh-404__subtitle">{% trans "Leave types not assigned to you" %}</h3>
|
||||
<p class="oh-404__subtitle">{% trans "Please contact your administrators for assistance" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1242,9 +1242,13 @@ def user_leave_view(request):
|
||||
page_number = request.GET.get("page")
|
||||
page_obj = paginator_qry(queryset, page_number)
|
||||
assigned_leave_filter = AssignedLeaveFilter()
|
||||
if not queryset.exists():
|
||||
template_name = "leave/user-leave-empty-view.html"
|
||||
else:
|
||||
template_name = "leave/user-leave-view.html"
|
||||
return render(
|
||||
request,
|
||||
"leave/user-leave-view.html",
|
||||
template_name,
|
||||
{
|
||||
"user_leaves": page_obj,
|
||||
"form": assigned_leave_filter.form,
|
||||
|
||||
2
static/images/ui/desktop.ini
Normal file
2
static/images/ui/desktop.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[LocalizedFileNames]
|
||||
edit_btn.png=@edit_btn,0
|
||||
BIN
static/images/ui/edit_btn.png
Normal file
BIN
static/images/ui/edit_btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
static/images/ui/leave_types.png
Normal file
BIN
static/images/ui/leave_types.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Reference in New Issue
Block a user