205 lines
10 KiB
HTML
205 lines
10 KiB
HTML
{% load static i18n %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_CODE == 'ar' %}rtl{% else %}ltr{% endif %}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}{% trans 'University ATS' %}{% endblock %}</title>
|
|
|
|
{% if LANGUAGE_CODE == 'ar' %}
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
|
|
{% else %}
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
{% endif %}
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'image/favicon/apple-touch-icon.png'%}">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'image/favicon/favicon-32x32.png'%}">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'image/favicon/favicon-16x16.png'%}">
|
|
<link rel="manifest" href="{% static 'image/favicon/site.webmanifest'%}">
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" />
|
|
<link rel="stylesheet" href="{% static 'css/main.css' %}">
|
|
|
|
|
|
<script src="{% static 'js/main.js' %}"></script>
|
|
<script src="{% static 'js/typo.js' %}"></script>
|
|
{% block customCSS %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
|
|
<aside class="sidebar d-flex flex-column" id="sidebar">
|
|
<div class="sidebar-brand text-center">
|
|
<img src="{% static 'image/kaauh_green1.png' %}" alt="Logo" style="width: 40px;">
|
|
<div class="text-white small mt-2 fw-bold brand-subtitle">KAAUH ATS</div>
|
|
</div>
|
|
|
|
<nav class="sidebar-nav">
|
|
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'dashboard' %}active{% endif %}" href="{% url 'dashboard' %}">
|
|
<i class="fas fa-th-large me-2"></i> <span>{% trans "Dashboard" %}</span>
|
|
</a>
|
|
|
|
|
|
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'job_list' %}active{% endif %}" href="{% url 'job_list' %}">
|
|
<i class="fas fa-briefcase me-2"></i> <span>{% trans "Jobs" %}</span>
|
|
</a>
|
|
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'job_bank' %}active{% endif %}" href="{% url 'job_bank' %}">
|
|
<i class="fas fa-university me-2"></i> <span>{% trans "Job Bank" %}</span>
|
|
</a>
|
|
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'application_list' %}active{% endif %}" href="{% url 'application_list' %}">
|
|
<i class="fas fa-user-tie me-2"></i> <span>{% trans "Applications" %}</span>
|
|
</a>
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'person_list' %}active{% endif %}" href="{% url 'person_list' %}">
|
|
<i class="fas fa-user me-2"></i> <span>{% trans "Applicants" %}</span>
|
|
</a>
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'agency_list' %}active{% endif %}" href="{% url 'agency_list' %}">
|
|
<i class="fas fa-building me-2"></i> <span>{% trans "Agencies" %}</span>
|
|
</a>
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'interview_list' %}active{% endif %}" href="{% url 'interview_list' %}">
|
|
<i class="fas fa-calendar-alt me-2"></i> <span>{% trans "Interviews" %}</span>
|
|
</a>
|
|
|
|
<div class="mt-auto">
|
|
<div class="mt-4 pt-3 border-top border-secondary mx-3 uppercase">
|
|
{% comment %} <small class="text-white-50 px-2">{% trans "System" %}</small> {% endcomment %}
|
|
</div>
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'message_list' %}active{% endif %}" href="{% url 'message_list' %}">
|
|
<i class="fas fa-envelope me-2"></i>
|
|
<span>{% trans "Messages" %}</span>
|
|
{% if request.user.get_unread_message_count > 0 %}
|
|
<span class="badge rounded-pill bg-danger ms-auto">
|
|
{{ request.user.get_unread_message_count }}
|
|
</span>
|
|
{% endif %}
|
|
</a>
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'kaauh_career' %}active{% endif %}" href="{% url 'kaauh_career' %}">
|
|
<i class="fas fa-globe me-2"></i> <span>{% trans "Career Page" %}</span>
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% if request.user.is_authenticated and request.user.is_superuser %}
|
|
<div class="mt-auto">
|
|
<div class="mt-4 pt-3 border-top border-secondary mx-3 uppercase">
|
|
{% comment %} <small class="text-white-50 px-2">{% trans "System" %}</small> {% endcomment %}
|
|
</div>
|
|
<a class="nav-link-custom {% if request.resolver_match.url_name == 'settings' %}active{% endif %}" href="{% url 'settings' %}">
|
|
<i class="fas fa-cog me-2"></i> <span>{% trans "Settings" %}</span>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</nav>
|
|
|
|
{% if request.user.is_authenticated %}
|
|
<div class="logout-section">
|
|
<form method="post" action="{% url 'account_logout'%}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-link text-decoration-none d-flex align-items-center">
|
|
<i class="fas fa-sign-out-alt me-2"></i> <span>{% trans "Sign Out" %}</span>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="mt-auto p-3 border-top border-secondary text-center">
|
|
<a href="https://tenhal.sa/" class="text-decoration-none" target="_blank">
|
|
<div class="text-white-50 brand-subtitle" style="font-size: 0.7rem; letter-spacing: 0.5px;">
|
|
{% trans "POWERED BY" %} <span class="text-white fw-bold">TENHAL</span>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="main-wrapper">
|
|
<header class="content-header justify-content-between">
|
|
<div class="d-flex align-items-center">
|
|
<button class="btn me-2" id="sidebarCollapse">
|
|
<i class="fas fa-bars"></i>
|
|
</button>
|
|
|
|
<div class="hospital-text d-none d-md-block">
|
|
<small class="text-teal fw-bold">{% trans "KAAUH Applicant Tracking System" %}</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center gap-3">
|
|
<a href="{% url 'message_list' %}" class="btn btn-sm btn-outline-secondary position-relative d-none d-lg-block">
|
|
<i class="fas fa-envelope"></i>
|
|
{% if request.user.get_unread_message_count > 0 %}
|
|
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
|
|
{{ request.user.get_unread_message_count }}
|
|
</span>
|
|
{% endif %}
|
|
</a>
|
|
|
|
{% if LANGUAGE_CODE == 'en' %}
|
|
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
|
|
<input name="language" type="hidden" value="ar">
|
|
<input name="next" type="hidden" value="{{ request.get_full_path }}">
|
|
<button class="btn btn-sm btn-outline-secondary" type="submit">🇸🇦 العربية</button>
|
|
</form>
|
|
{% else %}
|
|
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
|
|
<input name="language" type="hidden" value="en">
|
|
<input name="next" type="hidden" value="{{ request.get_full_path }}">
|
|
<button class="btn btn-sm btn-outline-secondary" type="submit">🇺🇸 English</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
<div class="dropdown">
|
|
<button class="btn p-0 border-0" data-bs-toggle="dropdown">
|
|
{% if user.profile_image %}
|
|
<img src="{{ user.profile_image.url }}" class="rounded-circle border" width="35" height="35">
|
|
{% else %}
|
|
<div class="profile-avatar" style="width: 35px; height: 35px; font-size: 0.8rem;">
|
|
{{ user.username|first|upper }}
|
|
</div>
|
|
{% endif %}
|
|
</button>
|
|
{% if request.user.is_authenticated %}
|
|
<ul class="dropdown-menu dropdown-menu-end shadow border-0">
|
|
<li class="px-3 py-2 border-bottom">
|
|
<div class="fw-bold small">{{ user.get_full_name|default:user.username }}</div>
|
|
<div class="text-muted text-xs">{{ user.email|truncatechars:20 }}</div>
|
|
</li>
|
|
<li><a class="dropdown-item mt-1" href="{% url 'user_detail' request.user.pk %}">{% trans "Profile" %}</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form method="post" action="{% url 'account_logout'%}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="dropdown-item text-danger">{% trans "Sign Out" %}</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="main-container mx-3 my-3">
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.7/dist/htmx.min.js"></script>
|
|
|
|
|
|
{% block customJS %}{% endblock %}
|
|
</body>
|
|
</html>
|