<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
	<head>
		{include file="{$smarty.const.APP_REAL_PATH}_templates/engine/head.tpl"}

		<style type="text/css">
			@import url('_css/orderForm.css');
		</style>

		<script language="javascript" src="_js/orderForm.js"></script>

	</head>

	<body
		onLoad="

			{if $disableAddOrderButton}
				disableAddOrderButton();
			{else}
				enableAddOrderButton();
			{/if}
		"
	>

		{showMessage}

		{if $servicesList}

			<table class="list" width="100%" style="margin:0px;">

			{********************************* TABLE HEAD *******************************************}

			<tr>
				<th width="1%" style="font-size: 12px;">#</th>
				<th style="font-size: 12px;">{$_LANG.orderForm.servicesList.th.service}</th>
				<th style="font-size: 12px;">{$_LANG.orderForm.servicesList.th.products}</th>
				<th style="font-size: 12px;">{$_LANG.orderForm.servicesList.th.date}</th>
				<th style="font-size: 12px;">{$_LANG.orderForm.servicesList.th.location}</th>
				<th class="right nowrap" width="1%" style="font-size: 12px;">{$_LANG.orderForm.servicesList.th.options}</th>
			</tr>


			{foreach $servicesList as $idService=>$thisService}

				{if !$thisService['packageServiceIndex']}

					<tr class="{cycle values="odd,even"}">
						<td class="nowrap" width="1%">{counter name=resultsCount}.</td>

						<td class="nowrap">
							<div style="float:right">
								{$_LANG['orderForm']['servicesList']['pax']}:
								{if $thisService['definedPaxCount']}
									<span class="bold help" tooltip="{$_LANG['orderForm']['servicesList']['paxDef']}">{$thisService['definedPaxCount']}</span>
								{/if}
								{if $thisService['definedPaxCount'] and $thisService['undefinedPaxCount']}+{/if}
								{if $thisService['undefinedPaxCount']}
									<span class="italic help" tooltip="{$_LANG['orderForm']['servicesList']['paxUndef']}">{$thisService['undefinedPaxCount']}</span>
								{/if}
								{if !$thisService['definedPaxCount'] and !$thisService['undefinedPaxCount']}0{/if}
							</div>
							{$thisService.serviceName} {if $thisService.categoryReadable}<i>({$thisService.categoryReadable})</i>{/if}
							{if $thisService['isPackage']}
								<span class="red italic">[{$_LANG['orderForm']['servicesList']['package']}]</span>
							{/if}
						</td>

						<td>
							{* product name *}
							{supplierProductLabel ref=$thisService.idSupplierProduct}
							{* product type *}
							{if $thisService.productTypeReadable}{$thisService.productTypeReadable}{/if}
							{* product multiplier *}
							{if $thisService.productMultiplierReadable}({$thisService.productMultiplierReadable}){/if}
						</td>

						<td>
							<span class="nowrap">{$thisService.startDate|dateTimeFormat}</span>
							{if $thisService.endDate}&raquo;{/if}
							<span class="nowrap">{$thisService.endDate|dateTimeFormat}</span>
						</td>

						<td>
							<a
								class="icon-infoBlue help" style="float:right"
								href="#;"
								tooltip="
									<div>&bull; <b>{$_LANG.orderForm.servicesList.details.departure}</b>: {countryLabel ref=$thisService['departureCountryCode']} {if $thisService['departureCityId']}({cityLabel hideLink=1 ref=$thisService['departureCityId']}){/if}</div>
									{if $thisService['departureStationCode']}<div>&bull; <b>{$_LANG.orderForm.servicesList.details.departureAirport}</b>: {stationLabel ref=$thisService['departureStationCode']} ({$thisService['departureStationCode']})</div>{/if}
									<div>&bull; <b>{$_LANG.orderForm.servicesList.details.destination}</b>: {countryLabel ref=$thisService['destinationCountryCode']} {if $thisService['destinationCityId']}({cityLabel hideLink=1 ref=$thisService['destinationCityId']}){/if}</div>
									{if $thisService['destinationStationCode']}<div>&bull; <b>{$_LANG.orderForm.servicesList.details.destinationAirport}</b>: {stationLabel ref=$thisService['destinationStationCode']} ({$thisService['destinationStationCode']})</div>{/if}
								"
								data-tooltip-contentType='TINA2-list'
							></a>
							{countryLabel ref=$thisService.destinationCountryCode} {if $thisService['destinationCityId']}({cityLabel ref=$thisService.destinationCityId}){/if}
						</td>

						{* ---- OPTIONS ---- *}
						<td>

							<table class="options">

								<td>
									{** form of payment/cashing **}
									<a href="#;"
										{if $thisService['serviceExtraInfoEnabled']}
											class="icon-cashing"
											tooltip="{$_LANG['orderForm']['servicesList']['details']['offExtraDetTooltip']}"
											onClick="orderServiceFopAndFoc('{$idService}', 1)"
										{else}
											class="icon-cashing-disabled"
											tooltip="{$_LANG['orderForm']['servicesList']['details']['offExtraDetDisableTooltip']}" 
										{/if}
									></a>
								</td>

								<td>
									{** edit service **}
									<a href="#;"
										{if !$thisService['idImportedService']}
											class="icon-edit"
											tooltip="{$_LANG.orderForm.servicesList.details.editServiceTooltip}"
											onClick="orderServiceUpdate('{$idService}', 1)"
										{else}
											class="icon-edit-disabled"
											tooltip="{$_LANG.orderForm.servicesList.details.editImportedServiceTooltip}"
										{/if}
									></a>
								</td>

								<td>
									{** delete service **}
									<a href="#;"
										onClick="window.parent.messageBox.showQuestion('{$_LANG.confirm}','{$_LANG.orderForm.servicesList.details.delServiceMessage}',[ ['{$_LANG.yes}', 'window.parent.$(\'iframe2\').src=\'servicesList.php?deleteServiceId={$idService}\''], '{$_LANG.no}'])"
										class="icon-delete"
										tooltip="{$_LANG.orderForm.servicesList.details.delServiceTooltip}"
									></a>
								</td>
							</table>

						</td>

					</tr>

				{/if}

			{/foreach}

		{/if}


	</body>
</html>