您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

93 行
4.1KB

  1. {% extends '@LcShop/backend/default/show.html.twig' %}
  2. {% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
  3. {% trans_default_domain 'lcshop' %}
  4. {% block main %}
  5. <div class="row">
  6. <div class="col-4">
  7. {% embed '@LcShop/backend/default/block/embed_box.twig' %}
  8. {% trans_default_domain 'lcshop' %}
  9. {% block class %}bg-info{% endblock %}
  10. {% block icon %}toggle-on{% endblock %}
  11. {% block label %} {{ "field.default.status"|trans }}{% endblock %}
  12. {% block value %}
  13. {{ form_start(form_ticket_status,{'attr' : {'id' : 'ticketStatusForm'}}) }}
  14. {% form_theme form_ticket_status '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}
  15. {% for field in form_ticket_status.status %}
  16. {{ form_widget(field, {'attr': {"class" : 'ticket-status'}}) }}
  17. {% endfor %}
  18. {{ form_end(form_ticket_status) }}
  19. {% endblock %}
  20. {% endembed %}
  21. {% if entity.user %}
  22. {{ macros.box_info('bg-info', 'user', "field.default.user"|trans, entity.user.summary) }}
  23. {% else %}
  24. {{ macros.box_info('bg-info', 'user-secret', "field.default.visitor"|trans, entity.user ? entity.user.summary : entity.visitorInfos) }}
  25. {% endif %}
  26. {{ macros.box_info('bg-warning', 'calendar', "field.default.date"|trans, entity.createdAt|date('d/m/Y')) }}
  27. {% set trad = "field.Ticket.typeOptions."~entity.type %}
  28. {{ macros.box_info('bg-success', 'archive', "field.default.category"|trans, trad|trans) }}
  29. {% set trad = "field.Ticket.statusOptions."~entity.status %}
  30. {% if entity.orderShop is not null %}
  31. {{ macros.box_info('bg-danger', 'credit-card', "field.default.order"|trans, entity.orderShop.reference) }}
  32. {% endif %}
  33. </div>
  34. <div class="col-8">
  35. {{ macros.card_start('Ticket.listMessages') }}
  36. <div class="col-12 direct-chat-primary">
  37. {% for message in entity.ticketMessages %}
  38. <div class="direct-chat-msg {{ message.answerByAdmin ? 'right' }}">
  39. <div class="direct-chat-infos clearfix">
  40. <span class="direct-chat-name {{ message.answerByAdmin ? 'float-right' : 'float-left' }}">
  41. {{ message.createdBy }}
  42. </span>
  43. <span class="direct-chat-timestamp {{ message.answerByAdmin ? 'float-left' : 'float-right' }}">
  44. {{ message.createdAt|date('d/m/Y H:i') }}
  45. </span>
  46. </div>
  47. {% if message.answerByAdmin %}
  48. <img src="{{ asset('assets/img/backend/logo-pdl.png') }}" alt="" class="direct-chat-img"/>
  49. {% else %}
  50. <div class="direct-chat-img align-items-center">
  51. <i class="fa fa-user-circle" style="font-size: 2rem"></i>
  52. </div>
  53. {% endif %}
  54. <div class="direct-chat-text">
  55. {{ message.message|nl2br }}
  56. </div>
  57. </div>
  58. {% endfor %}
  59. </div>
  60. <hr />
  61. {{ form_start(form_add_ticket_message, {"attr" : {"class" : 'col-12', 'id' : 'addTicketMessageForm'}}) }}
  62. {% form_theme form_add_ticket_message '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}
  63. <div class="row">
  64. <div class="col-12">
  65. {{ form_row(form_add_ticket_message.message) }}
  66. </div>
  67. </div>
  68. {{ form_end(form_add_ticket_message) }}
  69. {{ macros.card_end() }}
  70. <div>
  71. </div>
  72. </div>
  73. </div>
  74. {% endblock %}
  75. {% block script_javascript %}
  76. {{ parent() }}
  77. <script src="{{ asset('bundles/lcshop/js/backend/script/ticket/init-edit.js') }}"></script>
  78. {% endblock %}