<div class="content-add01">
	<div class="heading01"><h1>Liste des dépôts (<?php echo $pager->getNbResults() ?>)</h1></div>
</div>

<div class="filter">
	<div class="filter-left">&nbsp;</div>
	<div class="filter-middle">
		<?php echo form_tag('@katao_member_deposit_filter') ?>
			<?php echo select_tag('filter_member', options_for_select(KataoMemberPeer::getAllGroupedByNode(), $filter_member, array('include_custom' => '&mdash;&nbsp;Adhérent&nbsp;&mdash;'))) ?>
			<?php echo image_tag('separator02.gif', array('alt' => '')) ?>&nbsp;<?php echo select_tag('filter_currency', options_for_select(KataoMemberDepositPeer::getAllCurrencies(), $filter_currency, array('include_custom' => '&mdash;&nbsp;Monnaie&nbsp;&mdash;'))) ?>
			<?php echo image_tag('separator02.gif', array('alt' => '')) ?>&nbsp;<?php echo select_tag('filter_payment_mode', options_for_select(KataoMemberDepositPeer::getAllPaymentModes(true), $filter_payment_mode, array('include_custom' => '&mdash;&nbsp;Règlement&nbsp;&mdash;'))) ?>
			<?php echo image_tag('separator02.gif', array('alt' => '')) ?>&nbsp;<?php echo select_tag('filter_status', options_for_select(KataoMemberDepositPeer::getAllStatuses(), $filter_status, array('include_custom' => '&mdash;&nbsp;Etat&nbsp;&mdash;'))) ?>
			<?php echo submit_tag('', array('class' => 'btn-search', 'title' => 'Filtrer')) ?><div style="float:right"><a href="<?php echo url_for('@katao_member_deposit_filter_reset') ?>">[annuler]</a></div>
		</form>
	</div>
	<div class="filter-right">&nbsp;</div>
</div>

<?php if (empty($katao_member_depositList)): ?>
	<p>Aucun dépôt.</p>
	  <?php if ($sf_user->hasCredential('admin')): ?>
	<p>
		<?php echo link_to('Ajouter un dépôt', '@katao_member_deposit_add', array('class' => 'add')) ?>
	<?php if (!$sf_user->isJustDelegate()): ?>
		<?php echo link_to('Répartir des ' . wpConfig::getAdditionalCurrencyName(), '@katao_member_deposit_dispatch_sols', array('class' => 'dispatch')) ?>
	<?php endif ?>
	</p>
	  <?php endif ?>
<?php else : ?>
	<?php if ($sf_user->hasCredential('admin')): ?>
  <?php echo link_to('Ajouter un dépôt', '@katao_member_deposit_add', array('class' => 'add')) ?>
  <?php if (!$sf_user->isJustDelegate()): ?>
  	<?php echo link_to('Répartir des ' . wpConfig::getAdditionalCurrencyName(), '@katao_member_deposit_dispatch_sols', array('class' => 'dispatch')) ?>
  <?php endif ?>
  <?php echo link_to('Imprimer la remise de chèques (' . multiple_action_info_selected('katao_member_deposit') . ')', '@katao_member_deposit_print_checks', array('class' => 'print')) ?>
  <?php echo link_to('Supprimer les dépôts sélectionnés (' . multiple_action_info_selected('katao_member_deposit') . ')', '@katao_member_deposit_delete_multiple', array('class' => 'delete', 'confirm' => 'Êtes-vous sûr de vouloir supprimer les dépôts sélectionnés ?')) ?>
    <?php endif ?>
  <table class="admin-list">
    <tr>
	  <th nowrap="nowrap" width="1%"><?php echo multiple_action_checkbox_all('katao_member_deposit') ?></th>
	  <th nowrap="nowrap">Date <?php echo sort_links($sf_request, 'date', 'kataoMemberDeposit/index') ?></th>
	  <th nowrap="nowrap">Adhérent <?php echo sort_links($sf_request, 'member', 'kataoMemberDeposit/index') ?></th>
	  <th nowrap="nowrap">Montant <?php echo sort_links($sf_request, 'amount', 'kataoMemberDeposit/index') ?></th>
	  <th nowrap="nowrap">Etat <?php echo sort_links($sf_request, 'status', 'kataoMemberDeposit/index') ?></th>
	  <th nowrap="nowrap">Règlement <?php echo sort_links($sf_request, 'payment-mode', 'kataoMemberDeposit/index') ?></th>
	  <th nowrap="nowrap" width="1%">Actions</th>
	</tr>
	<?php foreach ($katao_member_depositList as/*(KataoMemberDeposit)*/ $katao_member_deposit): ?>
    <tr valign="top" class="line">
		  <td class="center"><?php echo multiple_action_checkbox_line('katao_member_deposit', $katao_member_deposit->getId()) ?></td>
		  <td nowrap="nowrap"><?php echo $katao_member_deposit->getValuedAtStr() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_member_deposit->getMemberName() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_member_deposit->getAmountStr() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_member_deposit->getStatusStr() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_member_deposit->getPaymentModeStr() ?></td>
		  <td nowrap="nowrap">
		  <?php if ($sf_user->hasCredential('admin')): ?>
		  	<?php if (KataoMemberDeposit::PAYMENT_MODE_TRANSFER_SOL != $katao_member_deposit->getPaymentMode()): ?>
	    	<?php echo catalyz_link_to_image_tag('@katao_member_deposit_edit?id=' . $katao_member_deposit->getId(), 'actions/edit.png', array('title' => 'Modifier'), array('alt' => 'Modifier')) ?>
	    	<?php endif ?>
			<?php echo catalyz_link_to_image_tag('@katao_member_deposit_delete?id=' . $katao_member_deposit->getId(), 'actions/delete.png', array('title' => 'Supprimer', 'confirm' => 'Êtes-vous sûr de vouloir supprimer ce dépôt ?'), array('alt' => 'Supprimer')) ?>
	  	  <?php endif ?>
		  </td>
	</tr>
  <?php endforeach ?>
  </table>
  <?php echo pager($pager, sprintf('kataoMemberDeposit/index?sort=%s%s', $sf_request->getParameter('sort', 'date'), $sf_request->hasParameter('desc')?'&desc=on':''), 'katao_member_deposit') ?>
<?php endif ?>