{% extends '@ChillPerson/CRUD/view.html.twig' %}

{% block content %}
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
    {% block crud_content_header %}
        <h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
    {% endblock crud_content_header %}

    {% block crud_content_view_details %}
        <dl class="chill_view_data">
            <dt>Date</dt>
            <dd>{{ entity.reportDate|format_date('long') }}</dd>

            <h2>Souhaits</h2>

            <dt>Orientation souhaitée</dt>
            <dd>
                {% for r in entity.souhait %}
                    {% if loop.first %}<ul>{% endif %}
                    <li>{{ r.libelle }} ({{ r.metier.code }} - {{ r.metier.libelle }})</li>
                    {% if loop.last %}</ul>{% endif %}
                {% else %}
                    <p>Aucune orientation indiquée</p>
                {% endfor %}
                {% if entity.domaineActiviteSouhait is not empty %}
                    <p>Domaine d'activité souhaité&nbsp;:</p>
                    <blockquote class="chill-user-quote">{{ entity.domaineActiviteSouhait|nl2br }}</blockquote>
                {% endif %}
            </dd>

            <dt>Type de contrat recherché</dt>
            <dd>
                {% for type in entity.typeContrat %}
                    {% if loop.first %}<ul>{% endif %}
                    <li>{{ ('projet_prof.type_contrat.' ~ type)|trans }}</li>
                    {% if loop.last %}</ul>{% endif %}
               {% endfor %}

               {% if entity.typeContratNotes is not empty %}
                   <blockquote class="chill-user-quote">{{ entity.typeContratNotes|nl2br }}</blockquote>
                {% endif %}
            </dd>

            <dt>Volume horaire souhaité</dt>
            <dd>
                {% for type in entity.volumeHoraire %}
                    {% if loop.first %}<ul>{% endif %}
                    <li>{{ ('projet_prof.volume_horaire.' ~ type)|trans }}</li>
                    {% if loop.last %}</ul>{% endif %}
               {% endfor %}

               {% if entity.volumeHoraireNotes is not empty %}
                   <blockquote class="chill-user-quote">{{ entity.volumeHoraireNotes|nl2br }}</blockquote>
                {% endif %}
            </dd>

            <h2>Projet professionnel</h2>

            <dt>Idée</dt>
            <dd>
                {{ entity.idee|chill_print_or_message('Aucune information', 'blockquote') }}
            </dd>

            <dt>En cours de construction</dt>
            <dd>
                {{ entity.enCoursConstruction|chill_print_or_message('Aucune information', 'blockquote') }}
            </dd>

            <dt>Validé</dt>
            <dd>
                {% for r in entity.valide %}
                    {% if loop.first %}<ul>{% endif %}
                    <li>{{ r.libelle }} ({{ r.metier.code }} - {{ r.metier.libelle }})</li>
                    {% if loop.last %}</ul>{% endif %}
                {% else %}
                    <p>Aucune orientation indiquée</p>
                {% endfor %}

                {% if entity.valideNotes is not empty %}
                    <blockquote class="chill-user-quote">
                        {{ entity.valideNotes|nl2br }}
                    </blockquote>
                {% endif %}
                {% if entity.domaineActiviteValide is not empty %}
                    <p>Domaine d'activité validé&nbsp;:</p>
                    <blockquote class="chill-user-quote">{{ entity.domaineActiviteValide|nl2br }}</blockquote>
                {% endif %}
            </dd>
        </dl>

        <h2>Notes</h2>

        {{ entity.projetProfessionnelNote|chill_print_or_message('Aucune note', 'blockquote') }}


    {% endblock crud_content_view_details %}
    {% block content_view_actions_duplicate_link %}{% endblock %}

    {% block content_view_actions_back %}
        <li class="cancel">
            <a class="btn btn-cancel" href="{{ chill_return_path_or('chill_job_report_index', { 'person': entity.person.id }) }}">
                {{ 'Cancel'|trans }}
            </a>
        </li>
    {% endblock %}
    {% block content_view_actions_after %}
    {% endblock %}
{% endembed %}
{% endblock %}
