bouffeatulm/tpl/default/see_paybacks.html

59 lines
2.5 KiB
HTML
Raw Normal View History

{include="header"}
{if condition="empty($id)"}
2014-08-31 14:27:57 +02:00
<h2>{$i18n['global_paybacks_list']}</h2>
{if condition="$global_paybacks !== FALSE"}
<dl>
{loop="$global_paybacks"}
<dt>{$value->getDate()}</dt>
<dd>
{if condition="$value->getClosed() === false"}
2014-08-31 14:27:57 +02:00
<a href="?do=see_paybacks&id={$value->getId()}">{$i18n['payback']} {$i18n['number']}{$value->getId()}</a>
{else}
2014-08-31 14:27:57 +02:00
[{$i18n['closed']}] {$i18n['payback']} {$i18n['number']}{$value->getId()}
{/if}
</dd>
{/loop}
</dl>
{else}
2014-08-31 14:27:57 +02:00
<p>{$i18n['no_global_payback']}.</p>
{/if}
{else}
{if condition="$global_paybacks === false"}
2014-08-31 14:27:57 +02:00
{$i18n['payback']} {$i18n['doesnt_exist']}.
{else}
2014-08-31 14:27:57 +02:00
<h2>{$i18n['payback']} {$i18n['number']}{$global_paybacks->getId()}</h2>
{$table=$global_paybacks->getUsersIn()->get()}
<table id="global_paybacks_table">
<tr>
2014-08-31 14:27:57 +02:00
<th>{$i18n['owes']} / {$i18n['to']}</th>
{loop="$global_paybacks->getUsersIn()->get()"}
2014-08-31 14:27:57 +02:00
<th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}{$i18n['deleted_user']}{/if}</th>
{/loop}
</tr>
{loop="$global_paybacks->getUsersIn()->get()"}
<tr>
2014-08-31 14:27:57 +02:00
<th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}{$i18n['deleted_user']}{/if}</th>
{loop="$global_paybacks->getUsersIn()->get()"}
{if condition="$key1 == $key2"}
<td class="cell-disabled"></td>
{else}
<td>
{if condition="$table[$key1][$key2] != 0"}
2014-08-31 14:27:57 +02:00
<a href="?do=confirm_global_paybacks&amp;from={$key1}&amp;to={$key2}&amp;payback_id={$global_paybacks->getId()}&amp;token={$token}" title="Confirm payback" onclick="return confirm("{$i18n['confirm_payback']}");">{$table[$key1][$key2]}</a>
{else}
-
{/if}
</td>
{/if}
{/loop}
</tr>
{/loop}
</table>
{/if}
2014-08-31 14:27:57 +02:00
<p class="center"><a href="?do=see_paybacks">{$i18n['go_back_list_global_paybacks']}</a></p>
{/if}
{include="footer"}