From d889444fab6a9c8399818b284234cd3be6ab3e54 Mon Sep 17 00:00:00 2001 From: Maciej Pienczyn Date: Mon, 30 Mar 2026 11:45:22 +0200 Subject: [PATCH] feat(membership): print button + print-optimized CSS for declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Blue "Drukuj deklarację" button in action sidebar (submitted + under_review) - @media print CSS: hides nav, sidebar, buttons; full-width main content - Print header with chamber name, declaration number, date, status - Clean data sections for paper output - Uses native window.print() — browser shows printer selection dialog Co-Authored-By: Claude Opus 4.6 (1M context) --- templates/admin/membership_detail.html | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/templates/admin/membership_detail.html b/templates/admin/membership_detail.html index 1a6f0da..801bb84 100644 --- a/templates/admin/membership_detail.html +++ b/templates/admin/membership_detail.html @@ -537,10 +537,56 @@ background: var(--background); border-radius: var(--radius); } + + /* Print styles */ + @media print { + /* Hide navigation, sidebar actions, admin bar, buttons, modals */ + nav, .admin-bar, .sidebar, .action-buttons, .action-help, + .modal, .modal-overlay, .alert, .btn-action, .btn-back, + footer, .notifications-menu, .user-menu, .breadcrumb, + .workflow-timeline, .detail-header .status-badge { display: none !important; } + + /* Full width for main content */ + .content-grid { display: block !important; } + .main-content { width: 100% !important; max-width: 100% !important; } + + /* Clean print header */ + body { font-size: 11pt; color: #000; background: #fff; } + .detail-header h1 { font-size: 16pt; margin-bottom: 4pt; } + + /* Print header with logo and title */ + .print-header { + display: block !important; + text-align: center; + margin-bottom: 20pt; + padding-bottom: 10pt; + border-bottom: 2px solid #2E4872; + } + .print-header h2 { font-size: 14pt; color: #2E4872; margin: 0; } + .print-header p { font-size: 10pt; color: #666; margin: 4pt 0 0; } + + /* Data sections clean */ + .info-section { break-inside: avoid; margin-bottom: 12pt; border: 1px solid #ddd; padding: 8pt; } + .info-section h2 { font-size: 12pt; color: #2E4872; border-bottom: 1px solid #2E4872; padding-bottom: 4pt; } + .info-row { padding: 2pt 0; } + .info-label { font-weight: bold; } + + /* Page setup */ + @page { margin: 15mm; } + } + + /* Hidden in screen, visible in print */ + .print-header { display: none; } {% endblock %} {% block content %} + + ← Powrót do listy deklaracji @@ -777,6 +823,9 @@ +

Zmieni status na "W trakcie rozpatrywania" i odblokuje opcje zatwierdzenia, odrzucenia lub prośby o poprawki. @@ -822,6 +871,9 @@ +