templates/modules/search-widget/main-forms.html.twig line 1

Open in your IDE?
  1. {#{% set activeTab = 'schedule' %}#}
  2. {% set widgetCount = activeWidgets.journey + activeWidgets.schedule + activeWidgets.traffic %}
  3. {% if interactiveMapIsEnabled() and (isWidget is not defined or false == isWidget) %}
  4. {% set widgetCount = widgetCount + 1 %}
  5. {% endif %}
  6. {% if widgetCount > 1 %}
  7. {% include "modules/search-widget/banners/banners.html.twig" %}
  8. {% apply spaceless %}
  9. <div class="is-Tab-List-Wrapper">
  10. <div class="is-Tab-List-Wrapper-C1">
  11. <ul id="is-Features-List" class="is-Feature-List_{{ widgetCount }}"
  12. role="tablist">
  13. {% if activeWidgets.journey %}
  14. <li class="is-Features-Tab{% if activeTab == 'journey' %} is-active{% endif %}"
  15. role="presentation">
  16. <a id="is-TabLink_Journey" class="is-Features-Tab-Link" data-toggle="is-tab" href="#is-Journey" data-sync-tab="#is-Journey-Results"
  17. role="tab" aria-controls="is-Journey" aria-selected="{{ activeTab == 'journey' ? 'true' : 'false' }}" tabindex="{{ activeTab == 'journey' ? '0' : '-1' }}" data-id="is-TabLink1"
  18. >
  19. <h2 class="is-Features-Tab-Text">{{ 'widget.itinerary'|trans }}</h2>
  20. </a>
  21. </li>
  22. {% endif %}
  23. {% if activeWidgets.schedule %}
  24. <li class="is-Features-Tab{% if activeTab == 'schedule' %} is-active{% endif %}"
  25. role="presentation">
  26. <a id="is-TabLink_Schedule" class="is-Features-Tab-Link" data-toggle="is-tab" href="#is-Schedule" data-sync-tab="#is-Schedule-Results"
  27. role="tab" aria-controls="is-Schedule" aria-selected="{{ activeTab == 'schedule' ? 'true' : 'false' }}" tabindex="-1" data-id="is-TabLink2"
  28. >
  29. <h2 class="is-Features-Tab-Text">{{ 'widget.schedules'|trans }}</h2>
  30. </a>
  31. </li>
  32. {% endif %}
  33. {% if activeWidgets.traffic %}
  34. <li class="is-Features-Tab{% if activeTab == 'traffic' %} is-active{% endif %}"
  35. role="presentation">
  36. <a id="is-TabLink_Traffic{% if activeTab == 'traffic' %}_Disable_Ajax{% endif %}" class="is-Features-Tab-Link{% if displayDisruptionWithAjax is defined and true == displayDisruptionWithAjax %} is-load-with-ajax{% endif %}" data-toggle="is-tab" href="#is-TrafficInfos" data-sync-tab="#is-TrafficInfos-Results"
  37. role="tab" aria-controls="is-TrafficInfos" aria-selected="{{ activeTab == 'traffic' ? 'true' : 'false' }}" tabindex="-1" data-id="is-TabLink3"
  38. onclick="$(document).trigger(TrackingManager.event.track, {event: 'info-trafic'})"
  39. >
  40. <h2 class="is-Features-Tab-Text">{{ 'widget.traffic_infos'|trans }}</h2>
  41. </a>
  42. </li>
  43. {% endif %}
  44. {% if interactiveMapIsEnabled() and (isWidget is not defined or false == isWidget) %}
  45. <li class="is-Features-Tab{% if activeTab == 'interactiveMap' %} is-active{% endif %}"
  46. role="presentation">
  47. <a id="is-TabLink_LinesAndPoi" class="is-Features-Tab-Link is-load-with-ajax" data-toggle="is-tab" href="#is-LinesAndPoi" data-sync-tab="#is-LinesAndPoi-Results"
  48. role="tab" aria-controls="is-LinesAndPoi" aria-selected="{{ activeTab == 'interactiveMap' ? 'true' : 'false' }}" tabindex="-1" data-id="is-TabLink4"
  49. >
  50. <h2 class="is-Features-Tab-Text">{{ 'widgets_tabs.interactive_map'|trans }}</h2>
  51. </a>
  52. </li>
  53. {% endif %}
  54. </ul>
  55. </div>
  56. <a class="is-Tab-NavButton is-Tab-NavButton_Prev" title="{{ 'widgets_tabs.previous'|trans }}"><i class="is-Icon is-Icon-com-chevron-left-thick" aria-hidden="true"></i></a>
  57. <a class="is-Tab-NavButton is-Tab-NavButton_Next" title="{{ 'widgets_tabs.next'|trans }}"><i class="is-Icon is-Icon-com-chevron-right-thick" aria-hidden="true"></i></a>
  58. </div>
  59. {% endapply %}
  60. <div class="is-Tab-Content">
  61. <div class="is-Tab-Pane{% if activeTab == 'journey' %} is-active{% endif %}" id="is-Journey"
  62. role="tabpanel" aria-hidden="{% if activeTab == 'journey' %}false{% else %}true{% endif %}"
  63. {% if activeTab != 'journey' %}inert{% endif %}
  64. aria-labelledby="is-TabLink_Journey"
  65. >
  66. {% include "modules/search-widget/journey/form.html.twig" %}
  67. </div>
  68. <div class="is-Tab-Pane{% if activeTab == 'schedule' %} is-active{% endif %}" id="is-Schedule"
  69. role="tabpanel" aria-hidden="{% if activeTab == 'schedule' %}false{% else %}true{% endif %}"
  70. {% if activeTab != 'schedule' %}inert{% endif %}
  71. aria-labelledby="is-TabLink_Schedule"
  72. >
  73. {% include "modules/search-widget/schedule/form.html.twig" %}
  74. </div>
  75. <div class="is-Tab-Pane{% if activeTab == 'traffic' %} is-active{% endif %}" id="is-TrafficInfos"
  76. role="tabpanel" aria-hidden="{% if activeTab == 'traffic' %}false{% else %}true{% endif %}"
  77. {% if activeTab != 'traffic' %}inert{% endif %}
  78. aria-labelledby="is-TabLink_Traffic"
  79. >
  80. {#{% include "modules/search-widget/traffic-infos/form.html.twig" %}#}
  81. </div>
  82. <div class="is-Tab-Pane{% if activeTab == 'interactiveMap' %} is-active{% endif %}" id="is-LinesAndPoi"
  83. role="tabpanel" aria-hidden="{% if activeTab == 'interactiveMap' %}false{% else %}true{% endif %}"
  84. {% if activeTab != 'interactiveMap' %}inert{% endif %}
  85. aria-labelledby="is-TabLink_LinesAndPoi"
  86. >
  87. {#{% include "modules/search-widget/interactive-map/form.html.twig" %}#}
  88. </div>
  89. </div>
  90. {% elseif activeWidgets.journey %}
  91. <div id="is-Journey">
  92. {% include "modules/search-widget/journey/form.html.twig" %}
  93. </div>
  94. {% elseif activeWidgets.schedule %}
  95. <div id="is-Schedule">
  96. {% include "modules/search-widget/schedule/form.html.twig" %}
  97. </div>
  98. {% elseif activeWidgets.traffic %}
  99. <div id="is-TrafficInfos">
  100. {% include "modules/search-widget/traffic-infos/form.html.twig" %}
  101. </div>
  102. {% endif %}
  103. {% if activeWidgets.banners is defined and activeWidgets.banners %}
  104. <div id="is-Banners">
  105. {% include "modules/search-widget/banners/banners.html.twig" %}
  106. </div>
  107. {% endif %}
  108. {% if activeWidgets.login is defined and activeWidgets.login %}
  109. <div id="is-Login">
  110. {% include "modules/search-widget/login/login.html.twig" %}
  111. </div>
  112. {% endif %}
  113. {% if activeWidgets.loginForm is defined and activeWidgets.loginForm %}
  114. <div id="is-Login">
  115. {% include "pages/account/loginFormContentModal.html.twig" %}
  116. </div>
  117. {% endif %}
  118. {% if activeWidgets.journeyBooking is defined and activeWidgets.journeyBooking %}
  119. <div id="is-JourneyBooking">
  120. {% include "modules/search-widget/booking/booking.html.twig" %}
  121. </div>
  122. {% endif %}