193 lines
9.8 KiB
HTML
193 lines
9.8 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">
|
|
<meta name="description" content="{% trans 'King Abdullah Academic University Hospital - Portal' %}">
|
|
<title>{% block title %}{% trans 'KAAUH Portal' %}{% endblock %}</title>
|
|
|
|
<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'%}">
|
|
|
|
{% 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="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 hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
|
|
|
<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">
|
|
{% if request.user.user_type == 'agency' %}{% trans "Agency Portal" %}{% else %}{% trans "Candidate Portal" %}{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="sidebar-nav">
|
|
{% if request.user.user_type == 'agency' %}
|
|
<a class="nav-link-custom {% if 'dashboard' in request.path %}active{% endif %}" href="{% url 'agency_portal_dashboard' %}">
|
|
<i class="fas fa-th-large me-2"></i> <span>{% trans "Dashboard" %}</span>
|
|
</a>
|
|
<a class="nav-link-custom {% if 'persons' in request.path %}active{% endif %}" href="{% url 'agency_portal_persons_list' %}">
|
|
<i class="fas fa-users me-2"></i> <span>{% trans "Applicants" %}</span>
|
|
</a>
|
|
{% else %}
|
|
<a class="nav-link-custom {% if 'dashboard' in request.path %}active{% endif %}" href="{% url 'applicant_portal_dashboard' %}">
|
|
<i class="fas fa-th-large me-2"></i> <span>{% trans "Dashboard" %}</span>
|
|
</a>
|
|
<a class="nav-link-custom {% if 'career' in request.path %}active{% endif %}" href="{% url 'kaauh_career' %}">
|
|
<i class="fas fa-briefcase me-2"></i> <span>{% trans "Careers" %}</span>
|
|
</a>
|
|
{% endif %}
|
|
|
|
<a class="nav-link-custom {% if 'message' in request.path %}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>
|
|
|
|
<div class="mt-auto">
|
|
<div class="mt-4 pt-3 border-top border-secondary mx-3 brand-subtitle">
|
|
<small class="text-white-50 px-2 uppercase">{% trans "Account" %}</small>
|
|
</div>
|
|
<a class="nav-link-custom {% if 'profile' in request.path %}active{% endif %}" href="{% url 'user_detail' request.user.pk %}">
|
|
<i class="fas fa-user-circle me-2"></i> <span>{% trans "My Profile" %}</span>
|
|
</a>
|
|
</div>
|
|
</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">
|
|
{% if request.user.user_type == 'agency' %}{% trans "Agency Portal" %}{% else %}{% trans "Applicant Portal" %}{% endif %}
|
|
<span class="text-muted mx-2">|</span>
|
|
<span class="text-secondary">KAAUH</span>
|
|
</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>
|
|
<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>
|
|
</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>
|
|
|
|
<footer class="mt-auto py-3 border-top bg-white">
|
|
<div class="container-fluid px-4 text-center">
|
|
<div class="small text-muted">
|
|
© {% now "Y" %} KAAUH. {% trans "All rights reserved." %}
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
{% include 'includes/delete_modal.html' %}
|
|
|
|
<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> |