{% import 'shared/componnents/_macros/_alerts.html.twig' as alerts %} {% extends 'base.html.twig' %} {% block title %}Ajouter nouveau pension{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% block content %} {% if form.pension.vars.errors|length %} {{ alerts.notification(form_errors(form.pension), 'info') }} {% endif %} {% include 'shared/layout/_content-header.html.twig' with { 'item_lien': { 0: { 'label': hotel.name, 'path': path('app_hotel_detail', {'hotelId': hotel.id}) } } }%} {% if pension %} {% include 'hotel_pension/_form.html.twig' with { 'path': path('app_hotel_pension_new', {'hotelId': hotel.id}), 'path_list': path('app_hotel_pension_index', {'hotelId': hotel.id}), 'label_btn': 'Ajouter', 'title': 'Ajouter Pension' } %} {% else %} {{ alerts.alert('please_create_them_here'|trans, 'danger', 'fa fa-fw fa-warning', 'Warning !', path('app_pension_index')) }} {% endif %} {% endblock %}