{% extends '@LcShop/backend/default/show.html.twig' %} {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} {% trans_default_domain 'lcshop' %} {% block main %}
{% embed '@LcShop/backend/default/block/embed_box.twig' %} {% trans_default_domain 'lcshop' %} {% block class %}bg-info{% endblock %} {% block icon %}toggle-on{% endblock %} {% block label %} {{ "field.default.status"|trans }}{% endblock %} {% block value %} {{ form_start(form_ticket_status,{'attr' : {'id' : 'ticketStatusForm'}}) }} {% form_theme form_ticket_status '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} {% for field in form_ticket_status.ticketStatus %} {{ form_widget(field, {'attr': {"class" : 'ticket-status'}}) }} {% endfor %} {{ form_end(form_ticket_status) }} {% endblock %} {% endembed %} {% if entity.user %} {{ macros.box_info('bg-info', 'user', "field.default.user"|trans, entity.user.summary) }} {% else %} {{ macros.box_info('bg-info', 'user-secret', "field.default.visitor"|trans, entity.user ? entity.user.summary : entity.visitorInfos) }} {% endif %} {{ macros.box_info('bg-warning', 'calendar', "field.default.date"|trans, entity.createdAt|date('d/m/Y')) }} {% set trad = "field.Ticket.typeOptions."~entity.type %} {{ macros.box_info('bg-success', 'archive', "field.default.category"|trans, trad|trans) }} {% set trad = "field.Ticket.ticketStatusOptions."~entity.ticketStatus %} {% if entity.orderShop is not null %} {{ macros.box_info('bg-danger', 'credit-card', "field.default.order"|trans, entity.orderShop.reference) }} {% endif %}
{{ macros.card_start('Ticket.listMessages') }}
{% for message in entity.ticketMessages %}
{{ entity.username }} {{ message.createdAt|date('d/m/Y H:i') }}
{% if message.answerByAdmin %} {% else %}
{% endif %}
{{ message.message|nl2br }}
{% endfor %}

{{ form_start(form_add_ticket_message, {"attr" : {"class" : 'col-12', 'id' : 'addTicketMessageForm'}}) }} {% form_theme form_add_ticket_message '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}
{{ form_row(form_add_ticket_message.message) }}
{{ form_end(form_add_ticket_message) }} {{ macros.card_end('ticketMessages') }}
{% endblock %} {% block script_javascript %} {{ parent() }} {% endblock %}