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

Open in your IDE?
  1. {% if validator.error == 1 %}
  2. {% for error in validator.errors %}
  3. <div class="is-Alert is-Alert_Warning" role="alert">
  4. <i class="is-Icon is-Icon-com-alert-triangle" aria-hidden="true"></i> {{ error.message }}
  5. </div>
  6. {% endfor %}
  7. {% else %}
  8. <div id="is-LineDirection-Timesheet"{% if hasVehicleRealTime is defined and hasVehicleRealTime == true %} data-direction-id="{{ direction }}" data-direction-display="{{ directionDisplay }}" data-line-id="{{ line[0].id }}" data-line-sname="{{ line[0].sName }}"{% endif %}>
  9. {% if shapes is defined and shapes is not empty %}
  10. <span class="is-hide" id="is-LineDirection-Shapes_json" data-line-id="{{ line[0].id }}">{{ shapes | json_encode }}</span>
  11. {% endif %}
  12. {% if hiddenStopPoints is defined and hiddenStopPoints is not empty %}
  13. <span class="is-hide" id="is-LineDirection-StopPoints_json">{{ hiddenStopPoints | json_encode }}</span>
  14. {% endif %}
  15. {% set lineColor = 'aaa' %}
  16. {% set hasMapButton = false %}
  17. {% if line[0].color is defined and line[0].color is not empty %}
  18. {% set lineColor = line[0].color %}
  19. {% endif %}
  20. <div class="is-Schedule-Header is-Result-Header is-LineDirection-Header">
  21. <button class="is-Schedule-BackButton is-Result-Header-BackButton" title="{{ 'schedule.back_to_results'|trans }}">
  22. <i class="is-Icon is-Icon-com-chevron-left-thick" aria-hidden="true"></i>
  23. </button>
  24. <div class="is-Schedule-H1 is-Widget-H2"
  25. aria-label="{{ lineDirections[direction].display is defined ? 'schedule.line_timesheet_direction_new_format'|trans({ 'mode' : ('mode.' ~ line[0].mode|lower)|trans, 'lineIdent' : line[0].sName, 'subNetwork' : line[0].subNetwork.name, 'lineDirection' : lineDirections[direction].display }) : 'schedule.line_timesheet_new_format'|trans({ 'mode' : ('mode.' ~ line[0].mode|lower)|trans, 'lineIdent' : line[0].sName, 'subNetwork' : line[0].subNetwork.name }) }}"
  26. tabindex="-1">
  27. <div class="is-Line-Info">
  28. <div class="is-Line-Badge-Subnetwork">
  29. <span class="is-Line-Badge">
  30. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': line[0] , 'currentDisruptions': currentDisruptions, 'showDisruptionBadge' : true } %}
  31. </span>
  32. <h3 class="subnetwork">{{ line[0].subNetwork.name }}</h3>
  33. </div>
  34. </div>
  35. </div>
  36. {% if true == enable_html_to_pdf_button_on_instance %}
  37. <div class="is-dropdown is-Result-Header-OptionsButtonGroup">
  38. <a class="is-dropdown-toggle is-Schedule-OptionsButton is-Result-Header-OptionsButton" data-toggle="is-dropdown" id="is-LineDirection-Timesheet-OptionsButton_{{ lineId }}" title="{{ 'schedule.more_options'|trans }}" role="button" aria-haspopup="true" aria-expanded="true" tabindex="0">
  39. <i class="is-Icon is-Icon-com-dots-three-horizontal" aria-hidden="true"></i>
  40. </a>
  41. <ul class="is-dropdown-menu is-dropdown-menu-right" aria-labelledby="is-LineDirection-Timesheet-OptionsButton_{{ lineId }}">
  42. <li>
  43. <a id="is-LineSchedule-Download" href="{% if scheduleLinePdfDownloadUrl is defined %}{{ scheduleLinePdfDownloadUrl}}{% endif %}" target="_blank">{{ 'schedule.pdf_download'|trans }}</a>
  44. </li>
  45. </ul>
  46. </div>
  47. {% elseif widgetContext is not defined or widgetContext is empty or widgetContext == "false" %}
  48. {% if account_module is defined and account_module is not empty %}
  49. <div class="is-Result-Header-OptionsButtonGroup is-Result-Header-FavoriteButton">
  50. <a
  51. {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  52. class="is-AddSubscriptionAlert is-Schedule-AddLineToFavoritesButton is-Favorite-Item-Button {% if isFavoriteLine %}is-active{% endif %}"
  53. data-favorite-line-id="{{ favoriteLineId }}"
  54. data-is-favorite-line="{{ isFavoriteLine }}"
  55. data-token="{% if isFavoriteLine %}{{ csrf_token('favorite_delete_line') }}{% else %}{{ csrf_token('favorite_add_line') }}{% endif %}"
  56. {% else %}
  57. class="is-Favorite-Item-Button{% if login_mode == 'kas' %} is-trigger-kas-login{% else %} is-ShowLoginModalButton {% endif %}"
  58. onclick="$(document).trigger(TrackingManager.event.track, {event: 'login'});"
  59. data-action="addToFavorites"
  60. data-redirect-to-same="true"
  61. {% endif %}
  62. data-favorite-type="LINE"
  63. data-line-id="{{ lineId }}"
  64. data-refresh-reverse-token="true"
  65. data-context="LINE"
  66. role="button"
  67. tabindex="0"
  68. title="{{ 'schedule.favorite.add_to_favorites'|trans }}"
  69. >
  70. <span class="is-Favorite-Item-Button-C1"><i class="is-Icon is-Icon-sim-FAVORITES" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i></i></span>
  71. </a>
  72. </div>
  73. {% endif %}
  74. {% if enable_result_options_button is defined and enable_result_options_button == true %}
  75. <div class="is-dropdown is-Result-Header-OptionsButtonGroup">
  76. <a class="is-dropdown-toggle is-Schedule-OptionsButton is-Result-Header-OptionsButton" data-toggle="is-dropdown" id="is-LineDirection-Timesheet-OptionsButton_{{ lineId }}" title="{{ 'schedule.more_options'|trans }}"
  77. role="button" aria-haspopup="true" aria-expanded="true" tabindex="0">
  78. <i class="is-Icon is-Icon-com-dots-three-horizontal" aria-hidden="true"></i>
  79. </a>
  80. <ul class="is-dropdown-menu is-dropdown-menu-right" aria-labelledby="is-LineDirection-Timesheet-OptionsButton_{{ lineId }}">
  81. <li class="is-hide">
  82. <a href>{{ 'schedule.share'|trans }}</a>
  83. </li>
  84. {% if enable_give_feedback is defined and enable_give_feedback == true %}
  85. <li>
  86. <a class="is-Schedule-FeedBack" role="button" tabindex="0" aria-label="{{ 'schedule.feedback' | trans }}">{{ 'schedule.feedback' | trans }}</a>
  87. </li>
  88. {% endif %}
  89. <li>
  90. <a id="is-LineSchedule-Print" href="{% if scheduleLinePrintUrl is defined %}{{ scheduleLinePrintUrl}}{% endif %}" target="_blank">{{ 'schedule.print'|trans }}</a>
  91. </li>
  92. <li>
  93. <a id="is-LineSchedule-Download" href="{% if scheduleLinePdfDownloadUrl is defined %}{{ scheduleLinePdfDownloadUrl}}{% endif %}" target="_blank">{{ 'schedule.pdf_download'|trans }}</a>
  94. </li>
  95. </ul>
  96. </div>
  97. {% endif %}
  98. {% endif %}
  99. </div>
  100. <div class="is-Result-Config"
  101. role="form">
  102. {% if isPdfPrint is not defined or isPdfPrint is defined and isPdfPrint == false %}
  103. <div class="is-Result-Config-Datetime" >
  104. <input class="is-Features-Input datetime is-Line-Schedule" type="hidden" id="is-Schedule-Datetime" required="required" value="{{ scheduleDatetime }}" data-event-name="is.schedule.line.getSchedules">
  105. <div class="is-TimePreference-Date is-Line-Schedule">
  106. <label for="is-Schedule-TimePreference-Date-Input" class="is-sr-only">{{ 'input.departure_arrival_date'|trans }}</label>
  107. <input type="date" id="is-Schedule-TimePreference-Date-Input" class="is-TimePreference-Date-Input is-DateInput is-Line-Schedule"
  108. aria-label="{{ 'schedule.edit_date'|trans }}">
  109. </div>
  110. <div class="is-TimePreference-Hour">
  111. <label for="is-Schedule-TimePreference-Hour-Input" class="is-sr-only">{{ 'input.departure_arrival_hour'|trans }}</label>
  112. <input type="time" id="is-Schedule-TimePreference-Hour-Input" class="is-TimePreference-Hour-Input is-TimeInput is-Line-Schedule"
  113. aria-label="{{ 'schedule.edit_time'|trans }}">
  114. </div>
  115. </div>
  116. {% endif %}
  117. <div class="is-dropdown is-LineDirection-Dropdown" data-color="{{ lineColor }}">
  118. {% if lineDirections[direction].display is defined %}
  119. <a href="#" class="is-Button is-Button_SecondaryLine is-Button_Dropdown is-Button_WithLabel is-dropdown-toggle" role="button" id="is-LineDirection-ShowListButton" data-toggle="is-dropdown"
  120. aria-haspopup="true" aria-expanded="false" title="{{ 'form.choice_direction'|trans }}" aria-label="{{ 'form.choice_direction'|trans }}">
  121. <span class="is-Button-C1">
  122. <span class="is-Button-Label">{{ 'schedule.direction_dropdown_label'|trans }}</span>
  123. <strong class="is-Button-Content">{{ lineDirections[direction].display }}</strong>
  124. </span>
  125. {% if lineDirections|length > 1 %}
  126. <i class="is-Icon is-Icon-com-chevron-down-thick" aria-hidden="true"></i>
  127. {% endif %}
  128. </a>
  129. {% endif %}
  130. {% if lineDirections|length > 1 %}
  131. <ul class="is-dropdown-menu" aria-labelledby="is-LineDirection-ShowListButton">
  132. {% for key, lineDirection in lineDirections %}
  133. {% if key != (direction) %}
  134. <li>
  135. <a href="#" class="is-line-directions-switch"
  136. data-line-id="{{ lineId }}"
  137. data-line-short-name="{{ line[0].sName }}"
  138. data-mode-text="{{ modeText }}"
  139. data-line-sub-network-name="{% if line[0].subNetwork.name is not empty %}{{ line[0].subNetwork.name }}{% else %}-{% endif %}"
  140. data-direction="{{ key }}">
  141. {{ lineDirection.display }}
  142. </a>
  143. </li>
  144. {% endif %}
  145. {% endfor %}
  146. </ul>
  147. {% endif %}
  148. </div>
  149. {% if (widgetContext is not defined or widgetContext is empty or widgetContext == "false")
  150. and (switch_map_mobile is defined and switch_map_mobile == false)
  151. and (isPdfPrint is not defined or isPdfPrint is defined and isPdfPrint == false)
  152. and (hasMap is defined and hasMap)%}
  153. <div class="is-panel is-panel-default is-Interactive-Map-Container" id="is-InteractiveMap-Button">
  154. <button class="is-Interactive-Map-ShowMapButton is-ShowMapButton">{{ 'schedule.roadmap_show_map'|trans }}</button>
  155. </div>
  156. {% set hasMapButton = true %}
  157. {% endif %}
  158. </div>
  159. {% if lineDisruptions is defined and lineDisruptions is not empty and (lineDisruptions.currentDisruptions is not empty or lineDisruptions.futureDisruptions is not empty) %}
  160. <div class="is-Schedule-Disruptions is-Schedule-Disruptions_LineDirection">
  161. {% if lineDisruptions.currentDisruptions is not empty and lineDisruptions.futureDisruptions is not empty %}
  162. <div class="is-Widget-H3 is-Disruptions-Title_WithTabs">
  163. <h4 class="is-Widget-H3-Left">{{ 'schedule.disruptions'|trans }}</h4>
  164. <ul class="is-Widget-H3-Right">
  165. <li class="is-Disruptions-Title-Tab is-active"><a class="is-Disruptions-Title-Tab-Link" role="tab" data-toggle="is-tab" aria-controls="is-Disruptions_Ongoing" aria-selected="false" href="#is-Disruptions_Ongoing">{{ 'disruptions.tabs.on_going'|trans }}</a></li>
  166. <li class="is-Disruptions-Title-Tab"><a class="is-Disruptions-Title-Tab-Link" role="tab" data-toggle="is-tab" aria-controls="is-Disruptions_ToCome" aria-selected="false" href="#is-Disruptions_ToCome">{{ 'disruptions.tabs.to_come'|trans }}</a></li>
  167. </ul>
  168. </div>
  169. {% else %}
  170. <h4 class="is-Widget-H3">{{ 'schedule.disruptions'|trans }} <span class="is-Widget-H3-Specification">({% if lineDisruptions.currentDisruptions is not empty %}{{ 'disruptions.tabs.on_going'|trans }}{% else %}{{ 'disruptions.tabs.to_come'|trans }}{% endif %})</span></h4>
  171. {% endif %}
  172. <div class="is-Tab-Content">
  173. <div class="is-Tab-Pane{{ lineDisruptions.currentDisruptions is empty ? ' is-Tab-Pane_NoResults' : '' }} is-Disruption-List {{ lineDisruptions.currentDisruptions is not empty ? ' is-active' : '' }}" id="is-Disruptions_Ongoing"
  174. {{ lineDisruptions.currentDisruptions is not empty ? ' role="list"' : '' }}>
  175. {% if lineDisruptions.currentDisruptions is not empty %}
  176. {% for key, disruption in lineDisruptions.currentDisruptions %}
  177. {% if key|trim != 'level' and disruption.effect is defined %}
  178. {% set title = disruption.messages[0].translations[0].title %}
  179. {% set content = disruption.messages[0].translations[0].content %}
  180. {% for message in disruption.messages %}
  181. {% for translation in message.translations %}
  182. {% set locale = translation.locale|split('-') %}
  183. {% if app.request.get('_locale') == locale[0] %}
  184. {% set title = translation.title %}
  185. {% set content = translation.content %}
  186. {% endif %}
  187. {% endfor %}
  188. {% endfor %}
  189. <div class="is-Disruption-Item" role="listitem">
  190. <a class="is-Disruption-Item-Header"
  191. data-toggle="is-collapse" href="#is-ScheduleDisruption-{{ loop.index }}" role="button"
  192. aria-expanded="false" aria-controls="is-ScheduleDisruption-{{ loop.index }}">
  193. <div class="is-Disruption-Item-Header-State">
  194. <div class="is-Disruption-Item-Header-State-C1">
  195. <i class="is-Disruption-Pastille is-Icon is-Icon-com-{{ disruption.cause|lower }} is-Disruption-Effect-{{ disruption.effect|lower }}" aria-hidden="true"></i>
  196. </div>
  197. </div>
  198. <div class="is-Disruption-Item-Header-Title">{{ title }}</div>
  199. </a>
  200. <div class="is-Disruption-Item-Content is-Disruptions-Details is-TrafficInfos-Details-Item is-collapse" id="is-ScheduleDisruption-{{ loop.index }}">
  201. {% if disruption.applicationPatterns is defined and disruption.applicationPatterns is not empty %}
  202. {% if disruption.applicationPatterns|length > 1 %}
  203. <p class="is-Disruptions-Details-Title">{{ 'disruptions.periods' | trans }}</p>
  204. {% else %}
  205. <p class="is-Disruptions-Details-Title">{{ 'disruptions.period' | trans }}</p>
  206. {% endif %}
  207. {% for applicationPattern in disruption.applicationPatterns %}
  208. <p class="is-Disruptions-Details-Item">
  209. {% include 'modules/search-widget/traffic-infos/includes/period-details.html.twig' with {'applicationPattern': applicationPattern} %}
  210. </p>
  211. {% if applicationPattern.recurring is defined and applicationPattern.recurring == true and applicationPattern.pattern.days|length > 1 %}
  212. <p class="is-Disruptions-Details-Item">
  213. {% include 'modules/search-widget/traffic-infos/includes/pattern-days.html.twig' with {'days': applicationPattern.pattern.days} %}
  214. </p>
  215. {% endif %}
  216. <p class="is-Disruptions-Details-Item">
  217. {% for timeSlot in applicationPattern.timeSlots %}
  218. {{ 'time.from'|trans }} {{timeSlot.start|format_datetime('none', 'short', locale=app.request.locale ) }} {{ 'time.to'|trans }} {{timeSlot.end|format_datetime('none', 'short', locale=app.request.locale ) }}
  219. {% endfor %}
  220. </p>
  221. {% if not loop.last %} <br> {% endif %}
  222. {% endfor %}
  223. {% endif %}
  224. <div class="is-Disruptions-Details-Problems">
  225. <span class="is-Disruptions-Details-Problems-Item">{{ disruption.cause | trans }}</span>
  226. <span class="is-Disruptions-Details-Problems-Item">{{ disruption.effect | trans }}</span>
  227. </div>
  228. <p class="is-Disruptions-Details-Title">{{ 'concerned_lines'|trans }}: </p>
  229. {% for line in disruption.impactedEntities.lines %}
  230. <div class="is-Line-Info">
  231. <div class="is-Line-Badge-Subnetwork">
  232. <span class="is-Line-Badge">
  233. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': line } %}
  234. </span>
  235. <span class="direction">{{ line.directionName ?? 'all_directions'|trans }}</span>
  236. </div>
  237. </div>
  238. {% endfor %}
  239. <p class="is-Disruptions-Details-Problems-Item">{{ content|raw }}</p>
  240. {% if disruption.lastUpdate is defined and disruption.lastUpdate is not empty %}
  241. <p class="is-Disruption-Item-Content-UpdateDate is-text-right">
  242. {{ 'disruptions.updated_at' | trans }} {{ disruption.lastUpdate|format_datetime('full', 'short', locale=app.request.locale ) }}
  243. </p>
  244. {% endif %}
  245. </div>
  246. </div>
  247. {% endif %}
  248. {% endfor %}
  249. {% else %}
  250. {% if hasMapButton is defined and hasMapButton == true %}
  251. <div class="is-Alert is-Alert_Info is-Alert_Info--withMarginTop" role="alert">
  252. {% else %}
  253. <div class="is-Alert is-Alert_Info" role="alert">
  254. {% endif %}
  255. <i class="is-Icon is-Icon-com-checkmark" aria-hidden="true"></i>{{ 'disruptions.no_on_going'|trans }}
  256. </div>
  257. {% endif %}
  258. </div>
  259. <div class="is-Tab-Pane{{ lineDisruptions.futureDisruptions is empty ? ' is-Tab-Pane_NoResults' : '' }} is-Disruption-List {{ lineDisruptions.futureDisruptions is not empty and lineDisruptions.currentDisruptions is empty ? ' is-active' : '' }}" id="is-Disruptions_ToCome">
  260. {% if lineDisruptions.futureDisruptions is not empty %}
  261. {% for key, disruption in lineDisruptions.futureDisruptions %}
  262. {% if key|trim != 'level' and disruption.effect is defined %}
  263. {% set title = disruption.messages[0].translations[0].title %}
  264. {% set content = disruption.messages[0].translations[0].content %}
  265. {% for message in disruption.messages %}
  266. {% for translation in message.translations %}
  267. {% set locale = translation.locale|split('-') %}
  268. {% if app.request.get('_locale') == locale[0] %}
  269. {% set title = translation.title %}
  270. {% set content = translation.content %}
  271. {% endif %}
  272. {% endfor %}
  273. {% endfor %}
  274. <div class="is-Disruption-Item" role="listitem">
  275. <a class="is-Disruption-Item-Header"
  276. data-toggle="is-collapse" href="#is-ScheduleFutureDisruption-{{ loop.index }}" role="button"
  277. aria-expanded="false" aria-controls="is-ScheduleFutureDisruption-{{ loop.index }}">
  278. <div class="is-Disruption-Item-Header-State">
  279. <div class="is-Disruption-Item-Header-State-C1">
  280. <i class="is-Disruption-Pastille is-Icon is-Icon-com-{{ disruption.cause|lower }} is-Disruption-Effect-{{ disruption.effect|lower }}" aria-hidden="true"></i>
  281. </div>
  282. </div>
  283. <div class="is-Disruption-Item-Header-Title">{{ title }}</div>
  284. </a>
  285. <div class="is-Disruption-Item-Content is-Disruptions-Details is-collapse" id="is-ScheduleFutureDisruption-{{ loop.index }}">
  286. {% if disruption.applicationPatterns is defined and disruption.applicationPatterns is not empty %}
  287. {% if disruption.applicationPatterns|length > 1 %}
  288. <p class="is-Disruptions-Details-Title">{{ 'disruptions.periods' | trans }}</p>
  289. {% else %}
  290. <p class="is-Disruptions-Details-Title">{{ 'disruptions.period' | trans }}</p>
  291. {% endif %}
  292. {% for applicationPattern in disruption.applicationPatterns %}
  293. <p class="is-Disruptions-Details-Item">
  294. {% include 'modules/search-widget/traffic-infos/includes/period-details.html.twig' with {'applicationPattern': applicationPattern} %}
  295. </p>
  296. {% if applicationPattern.recurring is defined and applicationPattern.recurring == true %}
  297. <p class="is-Disruptions-Details-Item">
  298. {% include 'modules/search-widget/traffic-infos/includes/pattern-days.html.twig' with {'days': applicationPattern.pattern.days} %}
  299. </p>
  300. {% endif %}
  301. <p class="is-Disruptions-Details-Item">
  302. {% for timeSlot in applicationPattern.timeSlots %}
  303. {{ 'time.from'|trans }} {{timeSlot.start|format_datetime('none', 'short', locale=app.request.locale ) }} {{ 'time.to'|trans }} {{timeSlot.end|format_datetime('none', 'short', locale=app.request.locale ) }}
  304. {% endfor %}
  305. </p>
  306. {% if not loop.last %} <br> {% endif %}
  307. {% endfor %}
  308. {% endif %}
  309. <div class="is-Disruptions-Details-Problems">
  310. <span class="is-Disruptions-Details-Problems-Item">{{ disruption.cause | trans }}</span>
  311. <span class="is-Disruptions-Details-Problems-Item">{{ disruption.effect | trans }}</span>
  312. </div>
  313. <p class="is-Disruptions-Details-Title">{{ 'concerned_lines'|trans }}: </p>
  314. {% for line in disruption.impactedEntities.lines %}
  315. <div class="is-Line-Info">
  316. <div class="is-Line-Badge-Subnetwork">
  317. <span class="is-Line-Badge">
  318. {% include "modules/search-widget/schedule/includes/line.html.twig" with { 'line': line } %}
  319. </span>
  320. <span class="direction">{{ line.directionName ?? 'all_directions'|trans }}</span>
  321. </div>
  322. </div>
  323. {% endfor %}
  324. {% if content is defined %}
  325. <p class="is-Disruptions-Details-Problems-Item">{{ content|raw }}</p>
  326. {% endif %}
  327. {% if disruption.lastUpdate is defined and disruption.lastUpdate is not empty %}
  328. <p class="is-Disruption-Item-Content-UpdateDate is-text-right">
  329. {{ 'disruptions.updated_at' | trans }} {{ disruption.lastUpdate|format_datetime('full', 'short', locale=app.request.locale ) }}
  330. </p>
  331. {% endif %}
  332. </div>
  333. </div>
  334. {% endif %}
  335. {% endfor %}
  336. {% else %}
  337. {% if hasMapButton is defined and hasMapButton == true %}
  338. <div class="is-Alert is-Alert_Info is-Alert_Info--withMarginTop" role="alert">
  339. {% else %}
  340. <div class="is-Alert is-Alert_Info" role="alert">
  341. {% endif %}
  342. <i class="is-Icon is-Icon-com-checkmark" aria-hidden="true"></i>{{ 'disruptions.no_to_come'|trans }}
  343. </div>
  344. {% endif %}
  345. </div>
  346. </div>
  347. </div>
  348. {% endif %}
  349. {% set i = 0 %}
  350. {% if lineTimetables.stopPoints is defined and lineTimetables.stopPoints is not empty %}
  351. {% if lineTimetables.journeys is defined and lineTimetables.journeys is not empty %}
  352. {% if lineTimetables.first is defined and lineTimetables.first is not empty and lineTimetables.last is defined and lineTimetables.last is not empty%}
  353. <p class="is-Schedule-FirstAndLastDepartures">
  354. <i class="is-Icon is-Icon-sim-clock" aria-hidden="true"></i>
  355. {% if lineTimetables.first.hours == lineTimetables.last.hours and lineTimetables.first.minutes == lineTimetables.last.minutes %}
  356. {% set departureText = 'schedule.departures_at_new_format' %}
  357. {% else %}
  358. {% set departureText = 'schedule.departures_between_new_format' %}
  359. {% endif %}
  360. {{ departureText|trans({'day': day, 'firstDeparture': lineTimetables.first.hours~":"~lineTimetables.first.minutes, 'lastDeparture': lineTimetables.last.hours~":"~lineTimetables.last.minutes})|raw }}
  361. </p>
  362. {% endif %}
  363. {% endif %}
  364. {% set widgetWidth = '' %}
  365. {% if (widgetContext is defined and widgetContext == "true") %}
  366. {% set widgetWidth = ' is-Widget-Max-Width' %}
  367. {% endif %}
  368. {% if hasMapButton is defined and hasMapButton == true %}
  369. <div class="is-LineDirection-Timesheet-Wrapper is-LineDirection-Timesheet-Wrapper--withMarginTop is-NavigableWrapper">
  370. {% else %}
  371. <div class="is-LineDirection-Timesheet-Wrapper is-NavigableWrapper {{ widgetWidth }}">
  372. {% endif %}
  373. <h4 class="is-Widget-H3">{{ 'timetable'|trans }}</h4>
  374. <div class="is-Scrollbar-Outer">
  375. <div class="is-NavigableWrapper-C1">
  376. <table class="is-LineDirection-Timesheet is-NavigableTable"{# data-navigable-list-length="{{ tabLength }}"#}
  377. aria-label="{{ 'timetable'|trans }} {{ 'route.line'|trans }} {{ line[0].sName }} {{ line[0].lName ?? line[0].sName }} {{ line[0].subNetwork.name }}"
  378. >
  379. <caption class="is-sr-only">{{ 'timetable'|trans }} {{ 'route.line'|trans }} {{ line[0].sName }} {{ line[0].lName ?? line[0].sName }} {{ line[0].subNetwork.name }}</caption>
  380. <thead class="is-Navigable-RemoveFromClone">
  381. <tr>
  382. <th tabindex="-1" scope="col"></th>
  383. <th tabindex="-1" scope="col"><span class="is-hidden-text is-dib">{{ 'schedule.stoppoint_list'|trans }}</span></th>
  384. <th scope="col"><span class="is-hidden-text is-dib">{{ 'schedule.next_departure_per_stoppoint'|trans }}</span></th>
  385. </tr>
  386. </thead>
  387. <tbody>
  388. {% set isExitOnly = false %}
  389. {% set isEntryOnly = false %}
  390. {% for stopPoint in lineTimetables.stopPoints %}
  391. {% set city = '' %}
  392. {% if stopPoint.stopArea.city is defined %}
  393. {% set city = stopPoint.stopArea.city %}
  394. {% endif %}
  395. <tr class="is-Equalizer">
  396. {% apply spaceless %}
  397. <th class="is-Timesheet-Icon" aria-hidden="true" tabindex="-1" scope="row">
  398. <div class="is-Timesheet-Icon-Wrapper">
  399. &nbsp;
  400. <div class="is-Timesheet-VerticalLine" style="background: #{{ lineColor }};"></div>
  401. <i class="is-Timesheet-StopIcon"></i>
  402. </div>
  403. </th>
  404. <th class="is-Timesheet-StopPoint" tabindex="-1" scope="row">
  405. <a data-toggle="is-tooltip"
  406. title="{{ 'schedule.see_stoppoint_timesheet_new_format'|trans({ 'mode': line[0].modeText, 'lineIdent': line[0].sName, 'lineDirection': lineDirections[direction].display, 'stopPointName': stopPoint.name })|raw }}"
  407. class="is-Timesheet-StopPoint-Link is-line-directions-stoppoint"
  408. data-color="{{ lineColor }}" data-lon="{{ stopPoint.lon }}" data-lat="{{ stopPoint.lat }}"
  409. data-line-id="{{ line[0].id }}"
  410. data-direction="{{ direction }}"
  411. data-stoppoint-id="{{ stopPoint.id }}"
  412. data-stoppoint-name="{{ stopPoint.name }}"
  413. onclick="$(document).trigger(TrackingManager.event.track, {event: 'lanetostop'});"
  414. role="button" tabindex="0"
  415. >
  416. <span class="is-Timesheet-StopPoint-Link-C1">
  417. <strong class="is-Timesheet-StopPoint-Name">
  418. {{ stopPoint.name }}
  419. {% if stopPoint.wheelchairBoarding is defined and stopPoint.wheelchairBoarding == 'YES' %}
  420. <i class="is-Icon is-Icon-sim-accessible" aria-hidden="true"></i>
  421. {% endif %}
  422. {% if stopPoint.currentDisruptions is defined and stopPoint.currentDisruptions is not empty %}
  423. {% set disruption = stopPoint.currentDisruptions[0] %}
  424. <i aria-hidden="true" class="is-Icon is-Icon-com-notice is-Disruption-State-{{ disruption.effect|lower }}"></i>
  425. {% endif %}
  426. </strong>
  427. <span class="is-Timesheet-StopPoint-City">{{ city }}</span>
  428. </span>
  429. </a>
  430. </th>
  431. <td class="is-Timesheet-Passages is-NavigableCell is-Navigable-RemoveFromClone" tabindex="-1">
  432. <div class="is-Timesheet-Passage-List-Wrapper is-NavigableCell-Wrapper">
  433. <ul class="is-Timesheet-Passage-List is-NavigableCell-List" role="list" aria-label="{{ 'schedule.next_departure_for_stoppoint_new_format'|trans({ 'stopPoint': stopPoint.name, 'city': city }) }}">
  434. {% for journey in lineTimetables.journeys %}
  435. {% set bEmptyPassage = false %}
  436. {% if journey.times[i] is defined and journey.times[i].hours == '-1' and journey.times[i].minutes == '-1' %}
  437. {% set bEmptyPassage = true %}
  438. {% endif %}
  439. <li class="is-Timesheet-Passage-Item is-NavigableCell-Item{% if journey.isNextDeparture is defined and journey.isNextDeparture %} is-Timesheet-Passage-Item_Current is-NavigableCell-Item_Start{% endif %}"
  440. role="listitem"{{ bEmptyPassage ? ' aria-hidden="true"' : '' }} tabindex="-1">
  441. {% if journey.times[i] is defined %}
  442. {% set footnotes = '' %}
  443. <span class="is-Timesheet-Passage-Item-C1">
  444. {% if bEmptyPassage %}
  445. -
  446. {% else %}
  447. {{ journey.times[i].hours }}:{{ "%02d"|format(journey.times[i].minutes) }}
  448. {% if journey.times[i].noteIds is defined %}
  449. {% for noteId in journey.times[i].noteIds %}
  450. {% if noteId == 'PHONE' %}
  451. <span class="is-Icon-TAD-Wrapper "><i class="is-Icon is-Icon-sim-TAD-PHONE" aria-hidden="true"></i></span>
  452. {% endif %}
  453. {% endfor %}
  454. {% endif %}
  455. {% if journey.notes is defined and journey.times[i] is not defined %}
  456. {% for note in journey.notes %}
  457. {% if note != 'PHONE' %}
  458. {% set footnotes = footnotes ~ (footnotes != '' ? ' ' : '') ~ (note | raw) %}
  459. {% else %}
  460. <span class="is-Icon-TAD-Wrapper"><i class="is-Icon is-Icon-sim-TAD-PHONE" aria-hidden="true"></i></span>
  461. {% endif %}
  462. {% endfor %}
  463. {% endif %}
  464. {% if journey.times[i].entryNotAllowed is defined %}
  465. {% set isExitOnly = true %}
  466. <i class="is-ExitOnly is-Icon is-Icon-sim-arrow-thin-right"
  467. title="{{ 'schedule.exit_only'|trans }}" aria-hidden="true"></i>
  468. {% endif %}
  469. {% if journey.times[i].exitNotAllowed is defined %}
  470. {% set isEntryOnly = true %}
  471. <i class="is-EntryOnly is-Icon is-Icon-sim-arrow-thin-right"
  472. title="{{ 'schedule.entry_only'|trans }}" aria-hidden="true"></i>
  473. {% endif %}
  474. {% endif %}
  475. </span>
  476. {% if journey.times[i].entryNotAllowed is defined %}
  477. <span class="is-sr-only">{{ 'schedule.exit_only'|trans }}</span>
  478. {% endif %}
  479. {% if journey.times[i].exitNotAllowed is defined %}
  480. <span class="is-sr-only">{{ 'schedule.entry_only'|trans }}</span>
  481. {% endif %}
  482. {{ footnotes != '' ? ('<sub class="is-Footnote">' ~ footnotes ~ '</sub>')|raw : '' }}
  483. {% endif %}
  484. </li>
  485. {% endfor %}
  486. </ul>
  487. </div>
  488. </td>
  489. {% endapply %}
  490. </tr>
  491. {% set i = i + 1 %}
  492. {% endfor %}
  493. </tbody>
  494. </table>
  495. </div>
  496. </div>
  497. </div>
  498. {% else %}
  499. {% if hasMapButton is defined and hasMapButton == true %}
  500. <div class="is-Alert is-Alert_Warning is-Alert_Info--withMarginTop" role="alert">{{ "schedule.no_schedules_on_this_direction" | trans }}</div>
  501. {% else %}
  502. <div class="is-Alert is-Alert_Warning" role="alert">{{ "schedule.no_schedules_on_this_direction" | trans }}</div>
  503. {% endif %}
  504. {% endif %}
  505. {% if lineTimetables.notes is defined or (isEntryOnly is defined and isEntryOnly == true) or (isExitOnly is defined and isExitOnly == true)%}
  506. <div class="is-Footnotes">
  507. {% if lineTimetables.notes is defined %}
  508. {% for note in lineTimetables.notes %}
  509. <dl class="is-Footnote-Item">
  510. {% if note.code != 'PHONE' %}
  511. <dt class="is-Footnote-Item-Picto"><span class="is-Footnote-Item-Picto-C1 is-Footnote-Item-Picto-C1_Note">{{ note.code }}</span></dt>
  512. <dd class="is-Footnote-Item-Description">{{ note.description }}</dd>
  513. {% else %}
  514. <dt class="is-Footnote-Item-Picto"><span class="is-Footnote-Item-Picto-C1 is-Footnote-Item-Picto-C1_TAD"><i class="is-Icon is-Icon-sim-TAD-PHONE"></i></span></dt>
  515. <dd class="is-Footnote-Item-Description">
  516. <em class="is-Footnote-Item-Description-Header">{{ 'journey.path.notes_tad_title'|trans }}</em>
  517. {{ note.description }}
  518. </dd>
  519. {% endif %}
  520. </dl>
  521. {% endfor %}
  522. {% endif %}
  523. {% if isEntryOnly == true %}
  524. <dl class="is-Footnote-Item">
  525. <dt class="is-Footnote-Item-Picto"><span class="is-Footnote-Item-Picto-C1"><i class="is-EntryOnly is-Icon is-Icon-sim-arrow-thin-right" title="{{ 'schedule.entry_only'|trans }}" aria-hidden="true"></i></span></dt>
  526. <dd class="is-Footnote-Item-Description">{{ 'schedule.entry_only'|trans }}</dd>
  527. </dl>
  528. {% endif %}
  529. {% if isExitOnly == true %}
  530. <dl class="is-Footnote-Item">
  531. <dt class="is-Footnote-Item-Picto"><span class="is-Footnote-Item-Picto-C1"><i class="is-ExitOnly is-Icon is-Icon-sim-arrow-thin-right" title="{{ 'schedule.exit_only'|trans }}" aria-hidden="true"></i></span></dt>
  532. <dd class="is-Footnote-Item-Description">{{ 'schedule.exit_only'|trans }}</dd>
  533. </dl>
  534. {% endif %}
  535. </div>
  536. {% endif %}
  537. </div>
  538. {% endif %}