/templates/tiki-accounting_account_list.tpl

https://gitlab.com/ElvisAns/tiki · Smarty Template · 92 lines · 91 code · 0 blank · 1 comment · 0 complexity · b13edf22a7df3198ebddff9f4a7eb3d7 MD5 · raw file

  1. {* $Id$ *}
  2. <table class="table">
  3. <tr>
  4. <th>{tr}Account{/tr}</th>
  5. <th>{tr}Account name{/tr}</th>
  6. <th>{tr}Notes{/tr}</a></th>
  7. <th>{tr}Budget{/tr}</th>
  8. <th>{tr}Locked{/tr}</th>
  9. <th>{tr}Debit{/tr}</th>
  10. <th>{tr}Credit{/tr}</th>
  11. <th>{tr}Tax{/tr}</th>
  12. {if $tiki_p_acct_manage_accounts=='y'}
  13. <th></th>
  14. {/if}
  15. </tr>
  16. {foreach from=$accounts item=a}{cycle values="odd,even" assign="style"}
  17. <tr class="{$style}">
  18. <td class="text-end"><a href="tiki-accounting_account.php?bookId={$bookId}&accountId={$a.accountId}">{$a.accountId}</a></td>
  19. <td><a href="tiki-accounting_account.php?bookId={$bookId}&accountId={$a.accountId}">{$a.accountName|escape}</a></td>
  20. <td>{$a.accountNotes|escape}</td>
  21. <td class="text-end">
  22. {if $book.bookCurrencyPos==-1}{$book.bookCurrency}{/if}
  23. {$a.accountBudget|number_format:$book.bookDecimals:$book.bookDecPoint:$book.bookThousand}
  24. {if $book.bookCurrencyPos==1}{$book.bookCurrency}{/if}
  25. </td>
  26. <td>{if $a.accountLocked==1}{tr}Yes{/tr}{else}{tr}No{/tr}{/if}</td>
  27. <td class="text-end">
  28. {if $book.bookCurrencyPos==-1}{$book.bookCurrency}{/if}
  29. {$a.debit|number_format:$book.bookDecimals:$book.bookDecPoint:$book.bookThousand}
  30. {if $book.bookCurrencyPos==1}{$book.bookCurrency}{/if}
  31. </td>
  32. <td class="text-end">
  33. {if $book.bookCurrencyPos==-1}{$book.bookCurrency}{/if}
  34. {$a.credit|number_format:$book.bookDecimals:$book.bookDecPoint:$book.bookThousand}
  35. {if $book.bookCurrencyPos==1}{$book.bookCurrency}{/if}
  36. </td>
  37. <td>{$a.accountTax}</td>
  38. {if $tiki_p_acct_manage_accounts=='y'}
  39. <td class="action">
  40. {actions}
  41. {strip}
  42. <action>
  43. <a href="tiki-accounting_account.php?bookId={$bookId|escape:'attr'}&accountId={$a.accountId|escape:'attr'}&action=edit" class="iconmenu">
  44. {icon name="edit" _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"}
  45. </a>
  46. </action>
  47. {if $a.accountLocked==1}
  48. {$iconName = 'unlock'}
  49. {$iconLabel = "{tr}Unlock{/tr}"}
  50. {$confirmMsg = "{tr}Unlock account?{/tr}"}
  51. {else}
  52. {$iconName = 'lock'}
  53. {$iconLabel = "{tr}Lock{/tr}"}
  54. {$confirmMsg = "{tr}Lock account?{/tr}"}
  55. {/if}
  56. <action>
  57. <form action="tiki-accounting_account.php" method="post">
  58. {ticket}
  59. <input type="hidden" name="bookId" value="{$bookId|escape:'attr'}">
  60. <input type="hidden" name="accountId" value="{$a.accountId|escape:'attr'}">
  61. <button
  62. type="submit"
  63. name="action"
  64. value="lock"
  65. class="btn btn-link link-list"
  66. >
  67. {icon name="$iconName"} {$iconLabel}
  68. </button>
  69. </form>
  70. </action>
  71. <action>
  72. <a href="tiki-accounting_account.php?bookId={$bookId|escape:'attr'}&accountId={$a.accountId|escape:'attr'}&action=delete"
  73. class="iconmenu"
  74. onclick="confirmPopup('{tr}Remove account?{/tr}', '{ticket mode=get}')"
  75. >
  76. {icon name="remove" _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
  77. </a>
  78. </action>
  79. {/strip}
  80. {/actions}
  81. </td>
  82. {/if}
  83. </tr>
  84. {/foreach}
  85. </table>
  86. {button href="tiki-accounting_account.php?action=new&bookId={$bookId|escape:'attr'}" _text="{tr}Create a new account{/tr}"}
  87. <a class="icon" href="tiki-accounting_export.php?action=print&bookId={$bookId|escape:'attr'}&what=accounts" target="new">
  88. {icon name="print" alt="{tr}printable version{/tr}"}
  89. </a>
  90. <a class="icon" href="tiki-accounting_export.php?action=settings&bookId={$bookId|escape:'attr'}&what=accounts">
  91. {icon name="export" alt="{tr}export table{/tr}"}
  92. </a>