{extends file="{$mvcView->getModulePath()}/View/_tpl/humanReadableFile/base.tpl"}

{block name="itinerary-data"}
	<tbody>
		<tr>
			<td colspan="2">
				<table class="itinerary">
					<thead>
						<tr class="header">
							<td colspan="2">date</td>
							<td colspan="2">location</td>
						</tr>
						<tr class="subheader">
							<td>pickUp</td>
							<td>dropOff</td>
							<td>pickUp</td>
							<td>dropOff</td>
						</tr>
					</thead>
					{$segments=$transaction->itinerary->getSegments()}
					{$segment=$segments[0]}
					<tbody class="departure">
						<tr>
							<td>{if $segment->departure->date}{$segment->departure->date|dateTimeFormat} {$segment->departure->time}{/if}</td>
							<td>{if $segment->destination->date}{$segment->destination->date|dateTimeFormat} {$segment->destination->time}{/if}</td>

							{strip}
							<td>
								<span class="text-autoSelectable note">{if $segment->departure->airportCode}{$segment->departure->airportCode}{/if}</span>

								{$s=""}
								{if $segment->departure->airportCode}
									{$s} {stationLabel ref={$segment->departure->airportCode}}
									{$s=","}
								{/if}

								{if $segment->departure->cityId}
									{$s} {cityLabel ref={$segment->departure->cityId} hideLink=1}
									{$s=","}
								{/if}

								{if (string)$segment->departure->countryCode}
									{$s} {countryLabel ref={$segment->departure->countryCode}}
									{$s=","}
								{/if}
							</td>
							{/strip}

							{strip}
							<td>
								<span class="text-autoSelectable note">{if $segment->destination->airportCode}{$segment->destination->airportCode}{/if}</span>

								{$s=""}
								{if (string)$segment->destination->airportCode}
									{$s} {stationLabel ref={$segment->destination->airportCode}}
									{$s=","}
								{/if}

								{if (string)$segment->destination->cityId}
									{$s} {cityLabel ref={$segment->destination->cityId} hideLink=1}
									{$s=","}
								{/if}

								{if (string)$segment->destination->countryCode}
									{$s} {countryLabel ref={$segment->destination->countryCode}}
									{$s=","}
								{/if}
							</td>
							{/strip}
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
	</tbody>

{/block}