ui2022/card__deliverymethods.html.twig line 1

Open in your IDE?
  1. {% set title = _args.title %}
  2. {% set subtitle = _args.subtitle|default(null) %}
  3. {% set icon = _args.icon|default(null) %}
  4. {% set stats = _args.stats|default([])|filter((s) => s is not empty) %}
  5. <div class="section__infostats mb-4 pb-1">
  6.     <div class="card card__deliverymethods">
  7.         <div class="d-flex align-items-center pb-3 mb-4">
  8.             {% if icon %}
  9.                 <i class="{{ icon}} mr-3 pr-1 h1 mb-0"></i>
  10.             {% endif %}
  11.             <span class="text-gray-dark text-semibold h3 mb-0">
  12.                 {{ title }}
  13.                 {% if subtitle %}
  14.                     <small>{{ subtitle }}</small>
  15.                 {% endif %}
  16.             </span>
  17.         </div>
  18.         <div class="dm__stats px-15 mb-4">
  19.             <div class="row">
  20.                 {% for stat in stats %}
  21.                     <div class="col-md col-12 mb-3 mb-md-0">
  22.                         <div class="text-semibold text-gray-dark dm__stats--label">
  23.                             {{ stat.label }}
  24.                             {% if stat.progress|default(null) is not null %}
  25.                                 {% if stat.link|default(null) %}
  26.                                     <a
  27.                                         href="{{ stat.link|e('html_attr') }}"
  28.                                         class="text-secondary text-medium"
  29.                                         {% if stat.dataToggle|default(null) %}
  30.                                             data-toggle="{{ stat.dataToggle }}"
  31.                                         {% endif %}
  32.                                         {% if stat.dataTarget|default(null) %}
  33.                                             data-target="{{ stat.dataTarget }}"
  34.                                         {% endif %}
  35.                                     >
  36.                                 {% else %}
  37.                                     <span>
  38.                                 {% endif %}
  39.                                     {{ stat.value }}
  40.                                 </{{ stat.link|default(null) ? 'a' : 'span' }}>
  41.                             {% endif %}
  42.                             {% if stat.tooltip|default(null) %}
  43.                                 <span class="badge badge--sphere text-extrabold" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{ stat.tooltip }}">?</span>
  44.                             {% endif %}
  45.                         </div>
  46.                         <div class="dm__stats--value">
  47.                             {% if stat.progress|default(null) is not null %}
  48.                                 <div class="progress__chart progress__chart--dm">
  49.                                     {% include '@ui2022/progress--simple.html.twig' with {
  50.                                         value: stat.progress,
  51.                                     } %}
  52.                                 </div>
  53.                             {% else %}
  54.                                 {% if stat.link|default(null) %}
  55.                                     <a
  56.                                         href="{{ stat.link|e('html_attr') }}"
  57.                                         class="text-secondary text-medium"
  58.                                         {% if stat.dataToggle|default(null) %}
  59.                                             data-toggle="{{ stat.dataToggle }}"
  60.                                         {% endif %}
  61.                                         {% if stat.dataTarget|default(null) %}
  62.                                             data-target="{{ stat.dataTarget }}"
  63.                                         {% endif %}
  64.                                     >
  65.                                 {% else %}
  66.                                     <span>
  67.                                 {% endif %}
  68.                                     {{ stat.value }}
  69.                                 </{{ stat.link|default(null) ? 'a' : 'span' }}>
  70.                             {% endif %}
  71.                         </div>
  72.                     </div>
  73.                 {% endfor %}
  74.             </div>
  75.         </div>
  76.         <div class="dm__info font-14 text-medium pt-1">
  77.             {% block content %}{% endblock %}
  78.         </div>
  79.     </div>
  80. </div>