feat: enable ZOPK knowledge widget and timeline admin link
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Enable "Czy wiesz, że..." ZOPK facts widget on homepage for all
logged-in users (was admin-only and disabled with {% if False %})
- Add "Oś czasu" button to ZOPK admin dashboard navigation (was
only accessible from public /zopk page edit links)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
172f2085db
commit
09f176cf1a
@ -128,9 +128,9 @@ def index():
|
||||
# Backward compat — next_event used by other parts
|
||||
next_event = upcoming_events[0]['event'] if upcoming_events else None
|
||||
|
||||
# ZOPK Knowledge facts — admin only widget
|
||||
# ZOPK Knowledge facts — widget dla zalogowanych
|
||||
zopk_facts = []
|
||||
if current_user.is_admin:
|
||||
if current_user.is_authenticated:
|
||||
try:
|
||||
from database import ZOPKKnowledgeFact, ZOPKNews
|
||||
zopk_facts = db.query(ZOPKKnowledgeFact).join(ZOPKNews).filter(
|
||||
|
||||
@ -1308,6 +1308,7 @@
|
||||
<div class="admin-actions">
|
||||
<a href="{{ url_for('public.zopk_index') }}" class="btn btn-secondary" target="_blank">Zobacz stronę publiczną</a>
|
||||
<a href="{{ url_for('admin.admin_zopk_news') }}" class="btn btn-secondary">Zarządzaj newsami</a>
|
||||
<a href="{{ url_for('admin.admin_zopk_timeline') }}" class="btn btn-secondary">Oś czasu</a>
|
||||
<button class="btn btn-primary" onclick="openAddNewsModal()">+ Dodaj news</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1052,12 +1052,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ZOPK Knowledge Widget — admin only -->
|
||||
{% if False and current_user.is_authenticated and current_user.is_admin and zopk_facts %}
|
||||
<!-- ZOPK Knowledge Widget — widoczny dla zalogowanych -->
|
||||
{% if current_user.is_authenticated and zopk_facts %}
|
||||
<div style="background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%); border-radius: var(--radius-lg); padding: var(--spacing-lg); margin-bottom: var(--spacing-xl); color: white;" data-animate="fadeIn">
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-sm); margin-bottom: var(--spacing-md);">
|
||||
<span style="font-size: 1.5rem;">💡</span>
|
||||
<h3 style="margin: 0; font-size: var(--font-size-lg); font-weight: 700;">Czy wiesz, że... <span style="font-weight: 400; font-size: var(--font-size-sm); opacity: 0.8;">(Baza Wiedzy ZOPK)</span></h3>
|
||||
<h3 style="margin: 0; font-size: var(--font-size-lg); font-weight: 700;">Czy wiesz, że... <span style="font-weight: 400; font-size: var(--font-size-sm); opacity: 0.8;">Zielony Okręg Przemysłowy Kaszubia</span></h3>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--spacing-md);">
|
||||
{% for fact in zopk_facts %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user