<?php $confirm_delete = __('Supprimer les fichiers sélectionnés ?'); ?>
<div id="page_albums" class="page_content">
	<div>
		<div id="page_subsection">
			<div id="content_subsection">
<?php include('category_browse.tpl.php'); ?>
				<nav id="section_nav">
<?php include('breadcrumb.tpl.php'); ?>
				</nav>

<?php if (isset($_POST['action']) && $_POST['action'] == 'delete_confirm') : ?>
<?php include('delete_selection.tpl.php'); ?>
<?php else : ?>
				<div id="tools_display">
					<div class="tools">
<?php if ($tpl['options']['display'] == 'list' && $tpl['objects_count']) : ?>
						<div><span class="icon icon_options show_tool"><a data-id="options" class="js<?php if ($_GET['section_1'] == 'items-pending-display') : ?> show<?php endif; ?>" href="<?php echo $tpl['link']('items-pending' . (strstr($_GET['section_1'], 'display') ? '' : '-display') . '/' . $_GET['items_id'] . '/page/' . $_GET['page']); ?>"><?php echo __('Options d\'affichage'); ?></a></span></div>
<?php endif; ?>
					</div>
					<div id="display">
						<a id="display_list" class="display_link<?php if ($tpl['options']['display'] == 'list') : ?> current<?php endif; ?>" href="javascript:;" title="<?php echo __('Liste'); ?>"><img src="<?php echo $tpl['admin']['style']['path']; ?>/icons/20x20/display-list.png"></a>
						<a id="display_grid" class="display_link<?php if ($tpl['options']['display'] == 'grid') : ?> current<?php endif; ?>" href="javascript:;" title="<?php echo __('Grille'); ?>"><img src="<?php echo $tpl['admin']['style']['path']; ?>/icons/20x20/display-grid.png"></a>
						<form action="<?php echo $tpl['current_url_pageless']; ?>" method="post">
							<input name="options" type="hidden" value="">
							<input name="display" type="hidden" value="">
							<input name="anticsrf" type="hidden" value="<?php echo $tpl['anticsrf'](); ?>">
						</form>
					</div>
				</div>

<?php if ($tpl['options']['display'] == 'list' && $tpl['objects_count']) : ?>
				<form action="<?php echo $tpl['current_url_pageless']; ?>" method="post" class="tool<?php if ($_GET['section_1'] == 'items-pending-display') : ?> show<?php endif; ?>" id="options">
					<fieldset>
						<p class="field">
							<label for="nb_per_page"><?php echo __('Nombre de fichiers par page :'); ?></label>
							<input<?php if ($_GET['section_1'] == 'items-pending-display') : ?> autofocus<?php endif; ?> required maxlength="3" size="3" value="<?php echo $tpl['options']['nb_per_page']; ?>" name="nb_per_page" id="nb_per_page" type="text" class="focus">
						</p>
						<p class="field">
							<label for="order_by_column"><?php echo __('Trier par :'); ?></label>
							<select name="order_by_column" id="order_by_column">
<?php foreach ($tpl['options']['order_by_column'] as &$i) : ?>
								<option<?php if ($i['selected']) : ?> selected<?php endif; ?> value="<?php echo $i['value']; ?>"><?php echo $i['text']; ?></option>
<?php endforeach; ?>
							</select>
							<select name="order_by_order">
<?php foreach ($tpl['options']['order_by_order'] as &$i) : ?>
								<option<?php if ($i['selected']) : ?> selected<?php endif; ?> value="<?php echo $i['value']; ?>"><?php echo $i['text']; ?></option>
<?php endforeach; ?>
							</select>
						</p>
						<p class="field">
							<label for="thumbs_size"><?php echo __('Taille des vignettes :'); ?></label>
							<select name="thumbs_size" id="thumbs_size">
<?php foreach ($tpl['options']['thumbs_size'] as &$i) : ?>
								<option<?php if ($i['selected']) : ?> selected<?php endif; ?> value="<?php echo $i['value']; ?>"><?php echo $i['text']; ?></option>
<?php endforeach; ?>
							</select>
						</p>
						<input name="anticsrf" type="hidden" value="<?php echo $tpl['anticsrf'](); ?>">
						<input name="options" type="submit" value="<?php echo __('Valider'); ?>">
					</fieldset>
				</form>
<?php endif; ?>

<?php if ($tpl['objects_count'] > 0) : ?>
<?php include('items_pending_' . $tpl['options']['display'] . '.tpl.php'); ?>

<?php else : ?>
				<br>
				<div class="report_classic">
					<div class="report_msg report_info">
						<p><?php echo __('Aucun fichier en attente.'); ?></p>
					</div>
				</div>
<?php endif; ?>
<?php endif; ?>
			</div>
		</div>
	</div>
</div>