You are here

uc-cart-block-title.html.twig in Ubercart 8.4

{#
/**
 * @file
 * Default theme implementation to display the shopping cart block title.
 *
 * Available variables:
 * - title: The text to use for the title of the block.
 * - show_icon: TRUE if the cart icon is to be displayed.
 * - empty: TRUE if the cart is empty.
 * - collapsible: TRUE if the cart block is collapsible.
 * - collapsed: TRUE if the cart block is collapsed initially.
 * - cart_url: The URL of the cart page.
 *
 * @see uc_cart_preprocess_block()
 * @see template_preprocess_uc_cart_block_title()
 *
 * @ingroup themeable
#}
{% if show_icon and cart_empty %}
  <a href="{{ cart_url }}"><span class="cart-block-icon empty" title="{{ 'View your shopping cart.'|t }}"></span></a>
{% elseif show_icon %}
  <a href="{{ cart_url }}"><span class="cart-block-icon" title="{{ 'View your shopping cart.'|t }}"></span></a>
{% endif %}

{% if collapsible and collapsed %}
  <span class="cart-block-arrow collapsed" title="{{ 'Show/hide shopping cart contents.'|t }}">{{ title }}</span>
{% elseif collapsible %}
  <span class="cart-block-arrow" title="{{ 'Show/hide shopping cart contents.'|t }}">{{ title }}</span>
{% else %}
  {{ title }}
{% endif %}

File

uc_cart/templates/uc-cart-block-title.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display the shopping cart block title.
  5. *
  6. * Available variables:
  7. * - title: The text to use for the title of the block.
  8. * - show_icon: TRUE if the cart icon is to be displayed.
  9. * - empty: TRUE if the cart is empty.
  10. * - collapsible: TRUE if the cart block is collapsible.
  11. * - collapsed: TRUE if the cart block is collapsed initially.
  12. * - cart_url: The URL of the cart page.
  13. *
  14. * @see uc_cart_preprocess_block()
  15. * @see template_preprocess_uc_cart_block_title()
  16. *
  17. * @ingroup themeable
  18. #}
  19. {% if show_icon and cart_empty %}
  20. <a href="{{ cart_url }}"><span class="cart-block-icon empty" title="{{ 'View your shopping cart.'|t }}"></span></a>
  21. {% elseif show_icon %}
  22. <a href="{{ cart_url }}"><span class="cart-block-icon" title="{{ 'View your shopping cart.'|t }}"></span></a>
  23. {% endif %}
  24. {% if collapsible and collapsed %}
  25. <span class="cart-block-arrow collapsed" title="{{ 'Show/hide shopping cart contents.'|t }}">{{ title }}</span>
  26. {% elseif collapsible %}
  27. <span class="cart-block-arrow" title="{{ 'Show/hide shopping cart contents.'|t }}">{{ title }}</span>
  28. {% else %}
  29. {{ title }}
  30. {% endif %}