push
This commit is contained in:
96
app/templates/base.html
Normal file
96
app/templates/base.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!doctype html>
|
||||
<html lang="pl" data-bs-theme="{{ 'dark' if theme == 'dark' else 'light' }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ app_name }}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" rel="stylesheet">
|
||||
<link href="{{ static_asset('css/app.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-shell d-flex">
|
||||
<aside class="sidebar bg-body-tertiary border-end p-3">
|
||||
<div class="mb-4">
|
||||
<div class="d-flex align-items-center gap-2 mb-1">
|
||||
<span class="brand-icon"><i class="fa-solid fa-file-invoice-dollar"></i></span>
|
||||
<div>
|
||||
<h5 class="mb-0">{{ app_name }}</h5>
|
||||
<div class="small text-secondary">Panel KSeF i archiwum</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-section-label">Główne</div>
|
||||
<nav class="nav flex-column gap-1 mb-3">
|
||||
<a class="nav-link" href="{{ url_for('dashboard.index') }}"><i class="fa-solid fa-chart-column me-2"></i>Dashboard</a>
|
||||
<a class="nav-link" href="{{ url_for('invoices.index') }}"><i class="fa-solid fa-table-list me-2"></i>Faktury Otrzymane</a>
|
||||
<a class="nav-link" href="{{ url_for('invoices.issued_list') }}"><i class="fa-solid fa-paper-plane me-2"></i>Faktury Wystawione</a>
|
||||
<a class="nav-link nav-link-accent" href="{{ url_for('invoices.issued_new') }}"><i class="fa-solid fa-square-plus me-2"></i>Wystaw fakturę</a>
|
||||
{% if nfz_module_enabled %}
|
||||
<a class="nav-link nav-link-highlight" href="{{ url_for('nfz.index') }}"><i class="fa-solid fa-hospital me-2"></i>Faktury NFZ</a>
|
||||
{% endif %}
|
||||
<a class="nav-link" href="{{ url_for('invoices.monthly') }}"><i class="fa-solid fa-calendar-days me-2"></i>Zestawienia</a>
|
||||
</nav>
|
||||
|
||||
<div class="menu-section-label">Kartoteki</div>
|
||||
<nav class="nav flex-column gap-1 mb-3">
|
||||
<a class="nav-link" href="{{ url_for('invoices.customers') }}"><i class="fa-solid fa-address-book me-2"></i>Kontrahenci</a>
|
||||
<a class="nav-link" href="{{ url_for('invoices.products') }}"><i class="fa-solid fa-boxes-stacked me-2"></i>Towary i usługi</a>
|
||||
</nav>
|
||||
|
||||
<div class="menu-section-label">Konfiguracja</div>
|
||||
<nav class="nav flex-column gap-1">
|
||||
<a class="nav-link" href="{{ url_for('notifications.index') }}"><i class="fa-solid fa-bell me-2"></i>Powiadomienia</a>
|
||||
<a class="nav-link" href="{{ url_for('settings.index') }}"><i class="fa-solid fa-gear me-2"></i>Ustawienia</a>
|
||||
{% if current_user.is_authenticated and current_user.role == 'admin' %}
|
||||
<a class="nav-link" href="{{ url_for('admin.index') }}"><i class="fa-solid fa-shield-halved me-2"></i>Admin</a>
|
||||
{% endif %}
|
||||
<a class="nav-link text-danger-emphasis" href="{{ url_for('auth.logout') }}"><i class="fa-solid fa-right-from-bracket me-2"></i>Wyloguj</a>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<main class="flex-grow-1 main-column">
|
||||
<header class="border-bottom px-4 py-3 bg-body sticky-top page-topbar">
|
||||
<div class="d-flex justify-content-between align-items-center gap-3 flex-wrap">
|
||||
<div>
|
||||
<div class="text-secondary small mb-1">{{ current_company.name if current_company else 'Brak aktywnej firmy' }}</div>
|
||||
<strong class="page-title">{% block title %}{% endblock %}</strong>
|
||||
</div>
|
||||
<div class="d-flex gap-2 align-items-center flex-wrap">
|
||||
{% if current_company %}
|
||||
<div class="d-flex align-items-center gap-2 top-chip">
|
||||
<i class="fa-solid fa-building text-primary"></i>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown">{{ current_company.name }}</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{% for item in available_companies %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('dashboard.switch_company', company_id=item.id) }}">{{ item.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<span class="small text-secondary top-chip"><i class="fa-solid fa-circle-half-stroke me-1"></i>{{ 'Ciemny' if theme == 'dark' else 'Jasny' }}</span>
|
||||
{% if read_only_mode %}<span class="readonly-pill readonly-pill-compact"><i class="fa-solid fa-eye me-1"></i>R/O</span>{% endif %}
|
||||
<a class="btn btn-sm btn-primary" href="{{ url_for('dashboard.index') }}" title="Strona główna"><i class="fa-solid fa-house"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="p-4 page-content-wrap">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }} shadow-sm alert-dismissible fade show" role="alert"><i class="fa-solid fa-circle-info me-2"></i>{{ message }}<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
<footer class="global-footer border-top bg-body px-4 py-3 text-secondary small">{{ global_footer_text }}</footer>
|
||||
</main>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user