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

81 行
3.4KB

  1. {% extends '@LcShop/backend/default/show.html.twig' %}
  2. {% trans_default_domain 'lcshop' %}
  3. {% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
  4. {% import '@LcShop/backend/user/macros.html.twig' as user_macros %}
  5. {% block global_actions %}
  6. {% if entity is not null %}
  7. {% set action = {label : "action.user.switch", icon: 'user-secret', css_class: 'btn btn-sm btn-danger'} %}
  8. {% include '@LcShop/backend/user/block/user-switch.html.twig' with {item: entity, is_dropdown: false, action: action, translation_domain: 'lcshop', trans_parameters: {}, item_id: entity.id}%}
  9. <button id="btn-ticket-write-to-user"
  10. data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}"
  11. data-user="{{ entity.id }}"
  12. class="btn-sm btn-success"
  13. type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }}
  14. </button>
  15. {% endif %}
  16. {% endblock %}
  17. {% block main %}
  18. <div class="lc-vue-js-container" id="lc-user">
  19. <div class="row">
  20. <div class="col-3">
  21. {{ user_macros.card_info(entity) }}
  22. </div>
  23. <div class="col-3">
  24. {{ user_macros.box_rank_total_order(entity) }}
  25. {{ user_macros.box_total_order(entity) }}
  26. </div>
  27. <div class="col-3">
  28. {{ user_macros.box_rank_sum_order(entity) }}
  29. {{ user_macros.box_total_spent(entity) }}
  30. </div>
  31. <div class="col-3">
  32. {{ user_macros.box_register_since(entity) }}
  33. {{ user_macros.box_login_since(entity) }}
  34. </div>
  35. <div class="col-6">
  36. {% set redeliveries = orderUtils.getRedeliveryByUser(entity) %}
  37. {% if redeliveries|length %}
  38. {{ macros.card_start('Redelivery.list', 'danger card-outline', true) }}
  39. {{ user_macros.list_order_product_redelivery(redeliveries) }}
  40. {{ macros.card_end() }}
  41. {% endif %}
  42. {% set tickets = ticketUtils.getTicketsByUser(entity) %}
  43. {% if tickets|length %}
  44. {{ macros.card_start('Ticket.listMessages', 'warning card-outline', false) }}
  45. {{ macros.list_tickets(tickets) }}
  46. {{ macros.card_end() }}
  47. {% endif %}
  48. {% if entity.reductionCredits|length %}
  49. {{ macros.card_start('ReductionCredit.list', 'warning card-outline', false) }}
  50. {{ macros.list_reduction_credits(entity.reductionCredits) }}
  51. {{ macros.card_end() }}
  52. {% endif %}
  53. {% set reductionCartsAvailable = orderUtils.getReductionCartsAvailableByUser(entity) %}
  54. {% if reductionCartsAvailable|length %}
  55. {{ macros.card_start('ReductionCart.list', 'success card-outline', false) }}
  56. {{ macros.list_reduction_carts(reductionCartsAvailable, entity) }}
  57. {{ macros.card_end() }}
  58. {% endif %}
  59. </div>
  60. <div class="col-6">
  61. {{ macros.card_start('OrderShop.list', 'primary card-outline', false) }}
  62. {{ user_macros.list_order_shops(orderUtils.getOrderShops({'user': entity})) }}
  63. {{ macros.card_end() }}
  64. </div>
  65. </div>
  66. </div>
  67. {% endblock %}