{% extends "base.html" %} {% block title %}{{ classified.title }} - Norda Biznes Hub{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
Powrot do tablicy
{{ 'Szukam' if classified.listing_type == 'szukam' else 'Oferuje' }} {{ classified.category }}
{% if classified.author_id == current_user.id %} {% endif %}

{{ classified.title }}

{{ classified.description }}
{% if classified.budget_info or classified.location_info %}
{% if classified.budget_info %}
Budzet / Cena
{{ classified.budget_info }}
{% endif %} {% if classified.location_info %}
Lokalizacja
{{ classified.location_info }}
{% endif %}
{% endif %}
{{ (classified.author.name or classified.author.email)[0].upper() }}
{{ classified.author.name or classified.author.email.split('@')[0] }}
{% if classified.company %}
{{ classified.company.name }}
{% endif %}
{% if classified.author_id != current_user.id %} Skontaktuj sie {% endif %}
{{ classified.views_count }} wyswietlen Dodano: {{ classified.created_at.strftime('%d.%m.%Y %H:%M') }} {% if classified.expires_at %} Wygasa: {{ classified.expires_at.strftime('%d.%m.%Y') }} {% endif %}
{% endblock %} {% block extra_js %} const csrfToken = '{{ csrf_token() }}'; async function closeClassified() { if (!confirm('Czy na pewno chcesz zamknac to ogloszenie?')) { return; } try { const response = await fetch('{{ url_for("classifieds_close", classified_id=classified.id) }}', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRFToken': csrfToken } }); const data = await response.json(); if (data.success) { window.location.href = '{{ url_for("classifieds_index") }}'; } else { alert(data.error || 'Wystapil blad'); } } catch (error) { alert('Blad polaczenia'); } } {% endblock %}