{% extends 'base.html.twig' %}

{% block title %}Annonces{% endblock %}

{% block body %}
    <h1>Annonces</h1>

    <table class="table">
        <tbody>
            <tr>
                <th>Id</th>
                <td>{{ notice.id }}</td>
            </tr>
            <tr>
                <th>Titre</th>
                <td>{{ notice.titleNotice }}</td>
            </tr>
            <tr>
                <th>Prix</th>
                <td>{{ notice.priceNotice }}</td>
            </tr>
            <tr>
                <th>Description</th>
                <td>{{ notice.descriptionNotice }}</td>
            </tr>
            <tr>
                <th>Localisation</th>
                <td>{{ notice.locationNotice }}</td>
            </tr>
            <tr>
                <th>Photo 1</th>
                <td><img src="{{ asset('uploads/photos/' ~ notice.photoOneNotice) }}" width="100"></td>
            </tr>
            <tr>
                <th>Photo 2</th>
                <td><img src="{{ asset('uploads/photos/' ~ notice.photoTwoNotice) }}" width="100"></td>
            </tr>
            <tr>
                <th>Photo 3</th>
                <td><img src="{{ asset('uploads/photos/' ~ notice.photoThreeNotice) }}" width="100"></td>
            </tr>
            <tr>
                <th>Date</th>
                <td>{{ notice.dateNotice ? notice.dateNotice|date('Y-m-d H:i:s') : '' }}</td>
            </tr>
            <tr>
                <th>Catégorie Professionnelle</th>
                <td>{{ notice.categoryProfessionnalNotice ? 'Oui' : 'Non' }}</td>
            </tr>
        </tbody>
    </table>

    <a href="{{ path('notice_index') }}">Retour à la liste</a>

    <a href="{{ path('notice_edit', {'id': notice.id}) }}">Modifier</a>

    {{ include('notice/_delete_form.html.twig') }}
{% endblock %}
