<!-- BEGIN {$smarty.template} -->

{if (isset($bmtlist) && (count($bmtlist) > 0))}

<table class="stdtable" cellspacing="0">
  <tr>
    <td class="header" colspan="6"> {t}Installed billing method plugins{/t} </td>
  </tr>

  <tr>
    <th> {t}File{/t} </th>
    <th> {t}Description{/t} </th>
    <th> {t}Country{/t} </th>
    <th class="number"> {t}Used{/t} </th>
    <th> {t}Status{/t} </th>
    <th> {t}Action{/t} </th>
  </tr>

  {foreach item=bmt from=$bmtlist.installed}
  <tr class="{cycle values="odd,even"}">
    <td> {$bmt.bmt_filename|wash} </td>
    <td> {$bmt.bmt_description|wash} </td>
    <td> <img src="img/flags/{$bmt.ctr_code|strtolower|wash}.png" alt="{$bmt.ctr_name|wash|default:"&nbsp;"}" title="{$bmt.ctr_name|wash|default:"&nbsp;"}" /> {$bmt.ctr_name|wash} </td>
    <td class="number"> {$bmt.nr_used} </td>
    <td> {if !strlen($bmt.bmt_status) || ($bmt.bmt_status == 0)}{t}enabled{/t}{else}{t}disabled{/t}{/if} </td>
    <td>
      {if !strlen($bmt.bmt_status) || ($bmt.bmt_status == 0)}<a href="bmt_plugins.php?id={$bmt.bmt_id}&amp;action={$smarty.const.ACTION_DISABLE}">{t}Disable{/t}</a>
      {else}<a href="bmt_plugins.php?id={$bmt.bmt_id}&amp;action={$smarty.const.ACTION_ENABLE}">{t}Enable{/t}</a>{/if}
      {if ($bmt.nr_used < 1)}<a href="bmt_plugins.php?id={$bmt.bmt_id}&amp;action={$smarty.const.ACTION_DELETE}">{t}Uninstall{/t}</a>{/if}
    </td>
  </tr>
  {/foreach}

</table>

<table class="stdtable" cellspacing="0">
  <tr>
    <td class="header" colspan="4"> {t}Not installed billing method plugins{/t} </td>
  </tr>

  <tr>
    <th> {t}File{/t} </th>
    <th> {t}Author{/t} </th>
    <th> {t}Action{/t} </th>
  </tr>

  {foreach item=bmt from=$bmtlist.notinstalled}
  <tr class="{cycle values="odd,even"}">
    <td> {$bmt.bmt_filename|wash} </td>
    <td> {$bmt.bmt_author|wash} </td>
    <td> <a href="add_bmt_plugin.php?file={$bmt.bmt_filename|rawurlencode}">{t}Install{/t}</a> </td>
  </tr>
  {/foreach}

</table>

{/if}

<!-- END {$smarty.template} -->
