Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

73 lines
3.0KB

  1. {% macro startCard(col, zone = "default", card ='primary', fullWidth = false ) %}
  2. {% if col > 0 %}
  3. <div class="col-{{ col }}">{% endif %}
  4. <div class="card card-{{ card }}">
  5. <div class="card-header">
  6. <h3 class="card-title">
  7. {% set label = "group."~zone %}
  8. {{ label|trans({}, 'lcshop')|raw }}
  9. </h3>
  10. </div>
  11. <div class="card-body {{ fullWidth == true ? 'p-0' : 'row' }}">
  12. {% endmacro %}
  13. {% macro endCard(noCol = false) %}
  14. </div>
  15. </div>
  16. {% if noCol == false %}</div>{% endif %}
  17. {% endmacro %}
  18. {% macro productField(colspan, field, fieldName, fieldDisplay = false, displaySuffix="",attr="") %}
  19. {% if fieldDisplay == false %}{% set fieldDisplay = fieldName %}{% endif %}
  20. <td {{ attr|raw }} colspan="{{ colspan }}" class="{{ fieldName }}" v-on:click="{{ fieldName }}Inherited = true">
  21. <div v-show="{{ fieldName }}Inherited == false">
  22. <div v-if="{{ fieldName }}">
  23. {% verbatim %}{{ {% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
  24. </div>
  25. <div v-else class="inherited">
  26. {% verbatim %}{{ productFamily.{% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
  27. </div>
  28. </div>
  29. <div v-show="{{ fieldName }}Inherited == true">
  30. {{ form_widget(field, {'attr' : {'v-model' : fieldName , 'v-on:focusout': fieldName~'Inherited = false', '@change' : fieldName~'Updated'}}) }}
  31. </div>
  32. </td>
  33. {% endmacro %}
  34. {% macro priceField(field, fieldTax, fieldName, behaviorPriceValue) %}
  35. <div class="form-group field-price col-12" v-show="behaviorPrice == '{{ behaviorPriceValue }}'">
  36. <div class="row">
  37. <div class="col-12">
  38. {{ form_label(field) }}
  39. </div>
  40. <div class="col-6">
  41. <div class="form-widget">
  42. <div class="input-group">
  43. {{ form_widget(field, {'attr' : {'v-model': fieldName, '@change' : fieldName~'Updated'}}) }}
  44. <div class="input-group-append">
  45. <span class="input-group-text">€ HT
  46. {% if behaviorPriceValue == 'by-reference-unit' %}/ ${ unitReference }{% endif %}
  47. </span>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="col-6">
  53. <div class="input-group">
  54. {{ form_widget(fieldTax, {'attr' : {'v-model': fieldName ~ 'WithTax', '@change' : fieldName~'WithTaxUpdated'}}) }}
  55. <div class="input-group-append">
  56. <span class="input-group-text">€ TTC
  57. {% if behaviorPriceValue == 'by-reference-unit' %}/ ${ unitReference }{% endif %}
  58. </span>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. {% endmacro %}