2013-09-24 14:50:05 +02:00
{include="header"}
{if condition="empty($id)"}
< h2 > Liste des remboursements globaux< / h2 >
{if condition="$global_paybacks !== FALSE"}
< dl >
{loop="$global_paybacks"}
< dt > {$value->getDate()}< / dt >
2013-09-25 20:28:09 +02:00
< dd >
2013-09-26 18:34:29 +02:00
{if condition="$value->getClosed() === false"}
2013-09-25 22:09:25 +02:00
< a href = "?do=see_paybacks&id={$value->getId()}" > Remboursement n°{$value->getId()}< / a >
2013-09-25 20:28:09 +02:00
{else}
[Terminé] Remboursement n°{$value->getId()}
{/if}
< / dd >
2013-09-24 14:50:05 +02:00
{/loop}
< / dl >
{else}
< p > Aucun remboursement global disponible pour l'instant.< / p >
{/if}
{else}
2013-09-25 20:28:09 +02:00
{if condition="$global_paybacks === false"}
Remboursement inexistant.
{else}
< h2 > Remboursement n°{$global_paybacks->getId()}< / h2 >
{$table=$global_paybacks->getUsersIn()->get()}
< table id = "global_paybacks_table" >
2013-09-24 14:50:05 +02:00
< tr >
2013-09-25 20:28:09 +02:00
< th > Doit / À< / th >
2013-09-24 14:50:05 +02:00
{loop="$global_paybacks->getUsersIn()->get()"}
2013-09-26 18:40:43 +02:00
< th > {if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}Utilisateur supprimé{/if}< / th >
2013-09-24 14:50:05 +02:00
{/loop}
< / tr >
2013-09-25 20:28:09 +02:00
{loop="$global_paybacks->getUsersIn()->get()"}
< tr >
2013-09-26 18:40:43 +02:00
< th > {if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}Utilisateur supprimé{/if}< / th >
2013-09-25 20:28:09 +02:00
{loop="$global_paybacks->getUsersIn()->get()"}
{if condition="$key1 == $key2"}
< td class = "cell-disabled" > < / td >
{else}
< td >
{if condition="$table[$key1][$key2] != 0"}
2013-09-25 22:09:25 +02:00
< a href = "?do=confirm_global_paybacks&from={$key1}&to={$key2}&payback_id={$global_paybacks->getId()}&token={$token}" title = "Confirmer le remboursement" onclick = "return confirm('Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action est irréversible.');" > {$table[$key1][$key2]}< / a >
2013-09-25 20:28:09 +02:00
{else}
-
{/if}
< / td >
{/if}
{/loop}
< / tr >
{/loop}
< / table >
{/if}
2013-09-24 14:50:05 +02:00
< p class = "center" > < a href = "?do=see_paybacks" > Retour à la liste des remboursements< / a > < / p >
{/if}
{include="footer"}