125 lines
6.6 KiB
HTML
125 lines
6.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Fox Fitt - Work & Payroll{% endblock %}</title>
|
|
{% if project_description %}
|
|
<meta name="description" content="{{ project_description }}">
|
|
{% endif %}
|
|
{% load static %}
|
|
<!-- Bootstrap 5 CDN -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<!-- Google Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
<!-- Font Awesome -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
|
<style>
|
|
body { font-family: 'Inter', sans-serif; }
|
|
</style>
|
|
{% block head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #0f172a;">
|
|
<div class="container">
|
|
<a class="navbar-brand heading-font fw-bold" href="{% url 'home' %}">
|
|
<span style="color: #10b981;">Fox</span> Fitt
|
|
</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav ms-auto align-items-center">
|
|
{% if user.is_authenticated %}
|
|
{# Dashboard #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.view_project or user.managed_teams.exists or user.assigned_projects.exists %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'home' %}">Dashboard</a></li>
|
|
{% endif %}
|
|
|
|
{# Log Work #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.add_worklog %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'log_attendance' %}">Log Work</a></li>
|
|
{% else %}
|
|
{# Fallback for existing users if strict mode is not desired, but user requested hiding. #}
|
|
{# I will leave it visible ONLY if they are supervisors to maintain status quo for them if they lack permissions #}
|
|
{% if user.managed_teams.exists or user.assigned_projects.exists %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'log_attendance' %}">Log Work</a></li>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# History #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.view_worklog or user.managed_teams.exists or user.assigned_projects.exists %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'work_log_list' %}">History</a></li>
|
|
{% endif %}
|
|
|
|
{# Payroll #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.view_payrollrecord %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'payroll_dashboard' %}">Payroll</a></li>
|
|
{% endif %}
|
|
|
|
{# Loans #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.view_loan %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'loan_list' %}">Loans</a></li>
|
|
{% endif %}
|
|
|
|
{# Receipts #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.add_expensereceipt %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'create_receipt' %}">Receipts</a></li>
|
|
{% endif %}
|
|
|
|
{# Manage #}
|
|
{% if user.is_staff or user.is_superuser or perms.core.change_worker %}
|
|
<li class="nav-item"><a class="nav-link" href="{% url 'manage_resources' %}">Manage</a></li>
|
|
{% endif %}
|
|
|
|
<li class="nav-item dropdown ms-lg-3">
|
|
<a class="nav-link dropdown-toggle btn btn-sm btn-outline-light text-white px-3" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
{{ user.username }}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end shadow border-0" aria-labelledby="userDropdown">
|
|
{% if user.is_staff or user.is_superuser %}
|
|
<li><a class="dropdown-item" href="/admin/">Admin Panel</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
{% endif %}
|
|
<li>
|
|
<form action="{% url 'logout' %}" method="post" style="display: inline;">
|
|
{% csrf_token %}
|
|
<button type="submit" class="dropdown-item">Logout</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item"><a class="nav-link btn btn-sm btn-primary px-3" href="{% url 'login' %}">Login</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main>
|
|
{% if messages %}
|
|
<div class="container mt-3">
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags|default:'info' }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<footer class="py-4 mt-5 border-top bg-light">
|
|
<div class="container text-center text-muted small">
|
|
© 2026 Fox Fitt Management System. All rights reserved.
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html> |