{% extends "common/index.twig" %}

{% import 'lightbox/thumbnail_basket.twig' as thumbnail_basket %}

{% block javascript %}
		<script type="text/javascript" src="/include/minify/g=lightbox"></script>
		<script type="text/javascript" src="/include/minify/f=include/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
{% endblock %}

{% block stylesheet %}
	<link type="text/css" rel="stylesheet" 
		href="/include/minify/f=include/jslibs/yui2.8/build/reset/reset.css,skins/lightbox/ui-lightness/jquery-ui-1.8.4.custom.css,lightbox/lightbox.css" media="screen"/>
{% endblock %}



{% block content %}
	{% set basket_element = basket.get_first_element%}

	<div class="PNB10">
		<div class="PNB" id="top_container">
			<div id="record_wrapper" class="PNB single" style="right:250px;">
				<div id="record_main" class="PNB record_display_box" style="bottom:auto;right:auto;">
					<div class="header PNB ui-widget-header ui-corner-all unselectable">
						<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;">
							<tr valign="middle">
								<td style="width:10px;"></td>
								<td style="width:35px;text-align:center;">
									<div class="display_id">{% if basket_element %}{{basket_element.display_id}}{% endif %}</div>
								</td>
								<td style="text-align:left;width:auto;">
									<div class="title title15" title="{% if basket_element %}{{basket_element.get_title|e}}{% endif %}">
										{% if basket_element %}{{basket_element.get_title}}{% endif %}
									</div>
								</td>
								<td style="text-align:right;width:230px;">
									<div class="options">
										{% include 'lightbox/sc_options_box.twig' %}
									</div>
								</td>
							</tr>
						</table>
					</div>
					<div class="container PNB">
						{% if basket_element %}{{basket_element.get_preview.html}}{% endif %}
						{% include 'lightbox/selector_box.twig' %}
						{% include 'lightbox/sc_note.twig' %}
					</div>
				</div>
				<div id="record_compare" class="PNB record_display_box">
					<div class="header PNB ui-widget-header ui-corner-all unselectable">
						<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;">
							<tr valign="middle">
								<td style="width:10px;"></td>
								<td style="width:35px;text-align:center;">
									<div class="display_id"></div>
								</td>
								<td style="text-align:left;width:auto;">
									<div class="title title15" title="{% if basket_element %}{{basket_element.get_title|e}}{% endif %}">
										{% if basket_element %}{{basket_element.get_title}}{% endif %}
									</div>
								</td>
								<td style="text-align:right;width:230px;">
									<div class="options"></div>
								</td>
							</tr>
						</table>
					</div>
					<div class="container PNB">
					</div>
				</div>
			</div>
			<div id="right_column" class="PNB">
				<div class="right_column_title title15 unselectable">
				{% if basket.valid %}
					<img class="collapsed" src="/skins/lightbox/collapsed.png"/>
					<img class="expanded" src="/skins/lightbox/expanded.png"/>
				{% endif %}
					{% trans 'notice'%}
				</div>
				<div class="right_column_wrapper caption right_column_wrapper_caption PNB" style="{% if basket.valid %}display:none;{% endif %}">
					<div id="record_infos" class="PNB">
						<div class="container PNB">{% if basket_element %}{{basket_element.get_caption}}{% endif %}</div>
					</div>
				</div>
				{% if basket.valid %}
				<div class="right_column_wrapper unselectable right_column_wrapper_user PNB">
					<div id="basket_infos" class="PNB ui-corner-all">
							{% include 'lightbox/agreement_box.twig' %}
					</div>
				</div>
				<div id="right_column_validation_toggle" class="PNB ui-corner-all title15">
					<img src="/skins/lightbox/toexpand.png"/>
					{% trans 'VALIDATION' %}
				</div>
				<div id="basket_options" class="PNB ui-corner-all unselectable">
					{% include 'lightbox/basket_options.twig' %}
				</div>
				{% endif %}
			</div>
		</div>
		<div class="PNB unselectable" id="bottom_container">
			<div class="PNB" style="height:30px;bottom:auto;">
				<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
					<tr>
						<td style="width:20px;">
						</td>
						<td style="width:310px;">
							{% if basket.valid %}
							<img title="{% trans 'lightbox::recaptitulatif' %}" class="report" src="/skins/lightbox/retour.png"/>
							{% endif %}
							<select id="navigation">
								<optgroup label="{% trans 'Validations'%}">
								{% for key,baskets in baskets_collection.baskets %}
									{% if key == 'baskets' %}
										{% for item in baskets %}
											{% if item.valid %}
												<option {% if basket.ssel_id == item.ssel_id %} selected="selected" {% endif %} 
													value="{{item.ssel_id}}">{{item.name}}</option>
											{% endif %}
										{% endfor %}
									{% endif %}
								{% endfor %}
								</optgroup>
								<optgroup label="{% trans 'Paniers'%}">
								{% for key,baskets in baskets_collection.baskets %}
									{% if key == 'baskets' or key == 'recept' %}
										{% for item in baskets %}
											{% if item.valid == false %}
												<option {% if basket.ssel_id == item.ssel_id %} selected="selected" {% endif %} 
													value="{{item.ssel_id}}">{{item.name}}</option>
											{% endif %}
										{% endfor %}
									{% endif %}
								{% endfor %}
								</optgroup>
							</select>
							<button class="ui-corner-all basket_downloader" title="{% trans 'boutton::telecharger tous les documents' %}">
								<img src="/skins/lightbox/save.png"/>
							</button>
						</td>
						<td>
							<hr/>
						</td>
						<td style="width:20px;">
						</td>
					</tr>
				</table>
			</div>
			<div class="PNB" style="top:30px;">
				<div id="left_scroller" class="PNB clickable">
				</div>
				<div class="PNB" id="sc_wrapper">
					{% include 'lightbox/sc_container.twig' %}
				</div>
				<div id="right_scroller" class="PNB clickable">
				</div>
			</div>
		</div>
	</div>
	{% if basket.valid %}
	<div id="report" style="display:none;">
	</div>
	{% endif %}
	<div id="dialog_dwnl" title="{% trans 'action : exporter' %}" style="display:none;"></div>
{% endblock %}


