templates/modules/search-widget/journey/mode-header.html.twig line 1

Open in your IDE?
  1. <div class="is-Journey-Results-Header {% if validator.error is not defined %}is-hide{% endif %}">
  2. <div id="is-Journey-Results-Summary" aria-hidden="false" style="display: none;" tabindex="-1"></div>
  3. {% set isFirst = true %}
  4. <ul class="is-Journey-Mode-List" role="tablist" aria-labelledby="is-Journey-Results-Summary" tabindex="-1">
  5. {% for mode in modesLayout %}
  6. {% set hideMode = false %}
  7. {% if tripPlanner is defined and tripPlanner[mode] is not defined %}
  8. {% set hideMode = true %}
  9. {% endif %}
  10. <li class="is-Journey-Mode-Tab{% if hideMode %} is-hidden{% endif %}{% if isFirst == true %} is-active{% endif %}" role="presentation">
  11. {% if hideMode == false %}
  12. {% set isFirst = false %}
  13. {% endif %}
  14. <a class="is-Journey-Mode-Tab-Link" data-toggle="is-tab" href="#is-Journey-Mode_{{ mode }}" role="tab" aria-controls="is-Journey-Mode_{{ mode }}" aria-selected="false" aria-label="{{ ('mode.' ~ mode|lower)|trans }}" data-mode="{{ mode }}">
  15. <span aria-hidden="true">
  16. <span class="is-Journey-Mode-Tab-Button">
  17. <i class="is-Icon is-Icon-sim-{{ mode }}" aria-hidden="true"></i>
  18. </span>
  19. <strong class="is-Journey-Mode-Tab-Label">
  20. <span class="is-Journey-Mode-Tab-Label-Value">
  21. {% if tripPlanner is defined and tripPlanner[mode] is defined %}
  22. {% set tab = tripPlanner[mode] %}
  23. {% if tab.totalTimeValue is defined and tab.totalTimeValue is not empty %}
  24. {{ tab.totalTimeValue|raw }}
  25. {% else %}
  26. -
  27. {% endif %}
  28. {% else %}
  29. -
  30. {% endif %}
  31. </span>
  32. </strong>
  33. </span>
  34. </a>
  35. </li>
  36. {% endfor %}
  37. </ul>
  38. </div>
  39. <div class="is-Tab-Content">
  40. {% for mode in modesLayout %}
  41. <div class="is-Tab-Pane{% if loop.index0 == 0 %} is-active{% endif %}" id="is-Journey-Mode_{{ mode }}" role="tabpanel" aria-hidden="false">
  42. {% set result = [] %}
  43. {% if tripPlanner is defined and tripPlanner[mode] is defined %}
  44. {% set result = { (mode): tripPlanner[mode] } %}
  45. {% endif %}
  46. {% include "modules/search-widget/journey/result.html.twig" with {"tripPlanner": result } %}
  47. </div>
  48. {% endfor %}
  49. </div>