{% extends 'App::V2/base.html.twig' %} {% set currentProfile = profileItem.profile is defined and profileItem.profile ? profileItem.profile : item.profile %} {% set currentCategory = profileItem.category is defined and profileItem.category ? profileItem.category : item.category %} {% set currentLocation = location|default(null) %} {% set firstName %} {% if currentProfile.user is defined and currentProfile.user and currentProfile.user.device == 'ANDROID' %} {{ currentProfile.lastname|default('')|trim|upper }} {% else %} {{ currentProfile.firstname|default('')|trim|lower|capitalize }} {% endif %} {% endset %} {% set lastName %} {% if currentProfile.user is defined and currentProfile.user and currentProfile.user.device == 'ANDROID' %} {{ currentProfile.firstname|default('')|trim|first|lower|capitalize }} {% else %} {{ currentProfile.lastname|default('')|trim|first|upper }} {% endif %} {% endset %} {% set teacherName = (firstName ~ ' ' ~ lastName ~ '.')|trim %} {% set city = currentProfile.city|default('') %} {% set postalCode = currentProfile.department|default('') %} {% set country = currentProfile.country|default('FR')|upper %} {% set categoryName = currentCategory.name|default('Cours particuliers') %} {% set categorySlug = currentCategory.slug|default('') %} {% set isFormation = currentCategory.type is defined and currentCategory.type == 'formations' %} {% set isCoach = categorySlug == 'coach-sportif' %} {% set categoryKind = isFormation ? 'Formation' : (isCoach ? 'Séance' : 'Cours particuliers') %} {% set dePrefix = categoryName|first|lower in ['a','e','i','o','u','h','é','è','ê','ë'] ? "d'" : 'de ' %} {% set itemContent = item.content|default('')|trim %} {% set profileContent = currentProfile.content|default('')|trim %} {% set cleanContent = itemContent ?: profileContent %} {% set bio = cleanContent ? (cleanContent|length > 220 ? cleanContent|slice(0, 220) ~ '...' : cleanContent) : 'Annonce de cours particuliers sur RueduProf.' %} {% set longBio = cleanContent ?: 'Annonce de cours particuliers sur RueduProf.' %} {% set avatar = (currentProfile.avatar is defined and currentProfile.avatar and currentProfile.avatar.path is defined and currentProfile.avatar.path) ? 'https://www.rueduprof.com/uploads/avatar/' ~ currentProfile.avatar.path : null %} {% set subjects = [] %} {% set levels = [] %} {% set modes = [] %} {% set pricing = [] %} {% set otherSubjects = [] %} {% set priceFrom = null %} {% for categoryItem in currentProfile.categories|default([]) %} {% if categoryItem.lang is not defined or categoryItem.lang == 'fr' %} {% if categoryItem.category is defined and categoryItem.category and categoryItem.category.name is defined and categoryItem.category.name and categoryItem.category.name not in subjects %} {% set subjects = subjects|merge([categoryItem.category.name]) %} {% endif %} {% if categoryItem.pricePerHour is defined and categoryItem.pricePerHour is not null %} {% if priceFrom is null or categoryItem.pricePerHour < priceFrom %} {% set priceFrom = categoryItem.pricePerHour %} {% endif %} {% endif %} {% if categoryItem.primaire is defined and categoryItem.primaire and 'Primaire' not in levels %} {% set levels = levels|merge(['Primaire']) %} {% endif %} {% if categoryItem.college is defined and categoryItem.college and 'Collège' not in levels %} {% set levels = levels|merge(['Collège']) %} {% endif %} {% if categoryItem.lycee is defined and categoryItem.lycee and 'Lycée' not in levels %} {% set levels = levels|merge(['Lycée']) %} {% endif %} {% if categoryItem.superieur is defined and categoryItem.superieur and 'Supérieur' not in levels %} {% set levels = levels|merge(['Supérieur']) %} {% endif %} {% if categoryItem.webcam is defined and categoryItem.webcam and 'En ligne' not in modes %} {% set modes = modes|merge(['En ligne']) %} {% endif %} {% if categoryItem.outPlace is defined and categoryItem.outPlace and 'À domicile' not in modes %} {% set modes = modes|merge(['À domicile']) %} {% endif %} {% if categoryItem.inPlace is defined and categoryItem.inPlace and 'Chez le professeur' not in modes %} {% set modes = modes|merge(['Chez le professeur']) %} {% endif %} {% set noteParts = [] %} {% if categoryItem.webcam is defined and categoryItem.webcam %} {% set noteParts = noteParts|merge(['En ligne']) %} {% endif %} {% if categoryItem.outPlace is defined and categoryItem.outPlace %} {% set noteParts = noteParts|merge(['À domicile']) %} {% endif %} {% if categoryItem.inPlace is defined and categoryItem.inPlace %} {% set noteParts = noteParts|merge(['Chez le professeur']) %} {% endif %} {% if categoryItem.category is defined and categoryItem.category and categoryItem.category.name is defined %} {% set pricing = pricing|merge([{ 'label': categoryItem.category.name, 'slug': categoryItem.category.slug|default(''), 'type': categoryItem.category.type|default(null), 'price': (categoryItem.pricePerHour is defined and categoryItem.pricePerHour is not null) ? categoryItem.pricePerHour ~ '€ / h' : 'Sur demande', 'description': categoryItem.content|default(''), 'note': noteParts|join(' · '), 'current': categoryItem.id is defined and profileItem.id is defined and categoryItem.id == profileItem.id }]) %} {% endif %} {% if categoryItem.id is defined and profileItem.id is defined and categoryItem.id != profileItem.id and categoryItem.category is defined and categoryItem.category %} {% set otherSubjects = otherSubjects|merge([categoryItem]) %} {% endif %} {% endif %} {% endfor %} {% set headline = categoryKind ~ ' ' ~ dePrefix ~ categoryName ~ (city ? ' à ' ~ city : '') %} {% set heroTitle = categoryKind ~ ' ' ~ dePrefix ~ categoryName ~ ' avec ' ~ teacherName|trim %} {% set heroMetaLocation = city ? (postalCode ? city ~ ' (' ~ postalCode ~ ')' : city) : postalCode %} {% set zones = [] %} {% if heroMetaLocation %} {% set zones = zones|merge([heroMetaLocation]) %} {% endif %} {% if currentLocation and currentLocation.slug is defined and currentLocation.slug == 'en-ligne' and 'En ligne' not in zones %} {% set zones = zones|merge(['En ligne']) %} {% endif %} {% set teacher = teacher|default({ 'first_name': firstName ?: 'Professeur', 'last_name': lastName ?: '', 'headline': headline, 'city': heroMetaLocation, 'price_from': priceFrom ?? 0, 'rating': null, 'reviews_count': 0, 'students_count': 0, 'response_time': null, 'experience_years': null, 'verified': false, 'bio': bio, 'long_bio': longBio, 'avatar': avatar, 'teaches': subjects, 'levels': levels, 'modes': modes, 'zones': zones, 'languages': country == 'FR' ? ['Français'] : [country], 'badges': [], 'highlights': [], 'pricing': pricing, 'availability': [], 'reviews': [], 'faq': [] }) %} {% set seoTitle %}{{ categoryKind }} {{ dePrefix }}{{ categoryName }}{% if heroMetaLocation %} à {{ heroMetaLocation }}{% endif %} avec {{ teacherName|trim }}{% endset %} {% set seoUrl %}https://www.rueduprof.com/{{ currentProfile.id ~ '/professeur-' ~ currentProfile.department ~ '-' ~ (currentProfile.firstname|myslugify) ~ '-' ~ (currentProfile.lastname|first|myslugify) ~ '/' }}{% endset %} {% set seoDescription %}Découvrez la fiche {{ categoryKind|lower }} {{ dePrefix }}{{ categoryName }} de {{ teacherName|trim }}{% if item.pricePerHour is defined and item.pricePerHour is not null %}, à partir de {{ item.pricePerHour }}€ / h{% endif %}.{% endset %} {% block title %}{{ seoTitle|trim }}{% endblock %} {% block meta_title %}{{ seoTitle|trim|raw }}{% endblock %} {% block meta_description %}{{ seoDescription|trim }}{% endblock %} {% block canonical %}{{ seoUrl|trim }}{% endblock %} {% block open_graph %} {% if teacher.avatar %}{% endif %} {% endblock %} {% block twitter_card %} {% if teacher.avatar %}{% endif %} {% endblock %} {% block snippet_json %} {% include 'App::schema/profile_category_show.html.twig' with { location: currentLocation, profileItem: profileItem, item: item } only %} {% endblock %} {% block body %}
{% set flashes = app.session.flashbag.all() %} {% for type, messages in flashes %} {% for message in messages %} {% if type == 'success' %}
Message envoyé

Votre demande a bien été transmise

{{ message }}

Votre demande a été prise en compte
Le professeur peut vous répondre rapidement
Vos informations ont bien été transmises
{% else %} {% endif %} {% endfor %} {% endfor %}
{% if teacher.avatar %} {{ teacher.first_name }} {{ teacher.last_name|first }}. {% else %}
{{ teacher.first_name|slice(0,1) }}{{ teacher.last_name|slice(0,1) }}
{% endif %}
{{ categoryKind }} {{ categoryName }} {% if teacher.verified %} Profil vérifié {% endif %}

{{ heroTitle }}

{{ teacher.headline }}

{% if teacher.city %}{{ teacher.city }}{% endif %} {% if item.pricePerHour is defined and item.pricePerHour is not null %}{{ item.pricePerHour }}€ / h{% endif %} {{ categoryName }}

{{ teacher.bio }}

{% for subject in teacher.teaches %} {{ subject }} {% endfor %}
À propos

{{ categoryKind }} {{ dePrefix }}{{ categoryName }}

{{ longBio|raw|nl2br }}

{% if profileContent and itemContent and itemContent != profileContent %}
Le professeur

Présentation générale

{{ profileContent|raw|nl2br }}

{% endif %}
Informations clés

Matière, niveaux et modalités

Matière principale
{{ categoryName }}
Niveaux

{{ teacher.levels is not empty ? teacher.levels|join(' · ') : 'Sur demande' }}

Lieu du cours

{{ teacher.modes is not empty ? teacher.modes|join(' · ') : 'À préciser' }}

Zones desservies

{{ teacher.zones is not empty ? teacher.zones|join(' · ') : 'À préciser' }}

Autres matières
{% for subject in teacher.teaches %} {{ subject }} {% else %} Aucune autre matière renseignée. {% endfor %}
Tarifs & matières

Tarifs et autres matières de {{ teacher.first_name }} {{ teacher.last_name|first }}.

{# Autres fiches matières #} {% for otherItem in otherSubjects %}
{{ otherItem.category.name }}
{% if otherItem.pricePerHour %} {{ otherItem.pricePerHour }}€ / h {% else %} Sur demande {% endif %}
{% if otherItem.category.type and otherItem.category.type == 'formations' %} Formation {% else %} Cours {% endif %}
{% if otherItem.content %}

{{ otherItem.content|length > 140 ? otherItem.content|slice(0, 140) ~ '...' : otherItem.content }}

{% endif %}
{% if otherItem.primaire %}Primaire{% endif %} {% if otherItem.college %}Collège{% endif %} {% if otherItem.lycee %}Lycée{% endif %} {% if otherItem.superieur %}Supérieur{% endif %}
{% endfor %}
{{ form_start(form_message, {'attr': {'class': 'vstack gap-3'}}) }} {{ form_errors(form_message) }}
{{ form_label(form_message.email, 'Email', {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form_message.email, {'attr': {'class': 'form-control form-control-lg rounded-4','placeholder': 'Votre email'}}) }} {{ form_errors(form_message.email) }}
{{ form_label(form_message.mobile, 'Téléphone', {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form_message.mobile, {'attr': {'id': 'inputError1','class': 'form-control form-control-lg rounded-4','placeholder': 'Votre numéro de mobile'}}) }} {{ form_errors(form_message.mobile) }}
{{ form_label(form_message.category, 'Matière', {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form_message.category, {'attr': {'class': 'form-select form-select-lg rounded-4 ui-select'}}) }} {{ form_errors(form_message.category) }}
{{ form_label(form_message.level, 'Niveau', {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form_message.level, {'attr': {'class': 'form-select form-select-lg rounded-4 ui-select'}}) }} {{ form_errors(form_message.level) }}
{{ form_label(form_message.message, 'Votre besoin', {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form_message.message, {'attr': {'rows': 4,'class': 'form-control rounded-4','placeholder': 'Exemple : besoin en ' ~ categoryName|lower ~ ', 2 séances par semaine...'}}) }} {{ form_errors(form_message.message) }}
{{ form_widget(form_message.recaptcha, {'attr': {'options': {'theme': 'light','type': 'image','size': 'normal'}}}) }} {{ form_errors(form_message.recaptcha) }}
Contacter ce professeur {{ form_end(form_message) }}
Demande contextualisée sur {{ categoryName }}
Contact direct et gratuit
{% if item.pricePerHour is defined and item.pricePerHour is not null %}{{ item.pricePerHour }}€/h{% else %}Sur demande{% endif %}
{{ categoryName }}
Contacter
{% endblock %}