templates/modules/search-widget/schedule/includes/stopAreaLine.html.twig line 1

Open in your IDE?
  1. {% set lineColor = 'aaa' %}
  2. {% if stopAreaLine.color is defined and stopAreaLine.color is not empty %}
  3. {% set lineColor = stopAreaLine.color %}
  4. {% endif %}
  5. {% if stopAreaLine.sName is empty %}
  6. {% set sName = "-" %}
  7. {% else %}
  8. {% set sName = stopAreaLine.sName %}
  9. {% endif %}
  10. <a data-toggle="is-tooltip" title="{{ 'schedule.see_line_timesheet_new_format'|trans({ 'mode': stopAreaLine.modeText, 'lineIdent': stopAreaLine.sName })|raw }}"
  11. class="is-Schedule-StopPoint-Line-Link is-Line is-line-directions-switch"
  12. data-line-id="{{ stopAreaLine.id }}"
  13. data-line-short-name="{{ sName }}"
  14. data-line-sub-network-name="{{ stopAreaLine.subNetwork.name }}"
  15. data-mode-text="{{ stopAreaLine.modeText }}"
  16. data-direction="OUTWARD"
  17. onclick="$(document).trigger(TrackingManager.event.track, {event: 'stoptolane'});"
  18. >
  19. {% if groupBySubNetworks is defined and true == groupBySubNetworks %}
  20. {% set disruption = 0 %}
  21. {% if lines is defined and lines is not empty %}
  22. {% for line in lines %}
  23. {% for lineInfos in line.line %}
  24. {% if lineInfos.id == stopAreaLine.id %}
  25. {% set disruption = 1 %}
  26. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': lineInfos , 'currentDisruptions': disruptions.currentDisruptions, 'showDisruptionBadge' : true } %}
  27. {% endif %}
  28. {% endfor %}
  29. {% endfor %}
  30. {% endif %}
  31. {% if disruption == 0 %}
  32. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': stopAreaLine , 'currentDisruptions': disruptions.currentDisruptions, 'showDisruptionBadge' : true } %}
  33. {% endif %}
  34. {% else %}
  35. {% set disruption = 0 %}
  36. {% if lines is defined and lines is not empty %}
  37. {% for line in lines %}
  38. {% set line = line.line %}
  39. {% if line.id == stopAreaLine.id %}
  40. {% set disruption = 1 %}
  41. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': line} %}
  42. {% endif %}
  43. {% endfor %}
  44. {% endif %}
  45. {% if disruption == 0 %}
  46. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': stopAreaLine} %}
  47. {% endif %}
  48. {% endif %}
  49. {% if groupBySubNetworks is defined and true == groupBySubNetworks %}
  50. <span>{{ stopAreaLine.lName }}</span>
  51. {% else %}
  52. {{ stopAreaLine.subNetwork.name }}
  53. {% endif %}
  54. </a>