account.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <div class="detail-meta">
  2. <span class="policy {{ account.policy_kind }}">{{ account.policy_kind }}</span>
  3. {% if account.floor %}
  4. <span class="muted">floor <span class="money neg">{{ account.floor.text }}</span></span>
  5. {% endif %}
  6. <span class="muted">version {{ account.version }}</span>
  7. {% if account.frozen %}<span class="flag frozen">frozen</span>{% endif %}
  8. {% if account.closed %}<span class="flag closed">closed</span>{% endif %}
  9. </div>
  10. <h3>Balances</h3>
  11. {% if account.balances %}
  12. <ul class="balance-list">
  13. {% for b in account.balances %}
  14. <li>
  15. <span class="asset-code">{{ b.code }}</span>
  16. <span class="money {% if b.money.negative %}neg{% else %}pos{% endif %}">{{ b.money.text }}</span>
  17. </li>
  18. {% endfor %}
  19. </ul>
  20. {% else %}
  21. <p class="muted">No balances.</p>
  22. {% endif %}
  23. {% if subaccounts | length > 1 %}
  24. <h3>Subaccounts ({{ subaccounts | length }})</h3>
  25. <table class="grid small">
  26. <thead>
  27. <tr>
  28. <th>Subaccount</th>
  29. <th>Policy</th>
  30. <th class="right">Balances</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. {% for s in subaccounts %}
  35. <tr onclick="window.location='{{ s.link }}'">
  36. <td>
  37. <div class="acct-id">{{ s.display_id }}{% if s.sub == 0 %} <span class="muted">(main)</span>{% endif %}</div>
  38. </td>
  39. <td><span class="policy {{ s.policy_kind }}">{{ s.policy_kind }}</span></td>
  40. <td class="right">
  41. {% if s.balances %}
  42. {% for b in s.balances %}
  43. <div><span class="money {% if b.money.negative %}neg{% else %}pos{% endif %}">{{ b.money.text }}</span></div>
  44. {% endfor %}
  45. {% else %}
  46. <span class="muted">&mdash;</span>
  47. {% endif %}
  48. </td>
  49. </tr>
  50. {% endfor %}
  51. </tbody>
  52. </table>
  53. {% endif %}
  54. <h3>Postings ({{ postings | length }})</h3>
  55. <table class="grid small">
  56. <thead>
  57. <tr>
  58. <th>Posting</th>
  59. <th>Status</th>
  60. <th class="right">Value</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. {% for p in postings %}
  65. <tr>
  66. <td><code class="hash" title="{{ p.short_id }}">{{ p.short_id }}</code></td>
  67. <td><span class="status {{ p.status }}">{{ p.status }}</span></td>
  68. <td class="right">
  69. <span class="money {% if p.money.negative %}neg{% else %}pos{% endif %}">{{ p.money.text }}</span>
  70. </td>
  71. </tr>
  72. {% endfor %}
  73. </tbody>
  74. </table>
  75. <h3>Transfers ({{ transfers | length }})</h3>
  76. <div class="feed">
  77. {% for t in transfers %}
  78. <div class="feed-item compact">
  79. <div class="feed-head">
  80. <code class="hash" title="{{ t.full_id }}">{{ t.short_id }}</code>
  81. <span class="muted">{{ t.time }}</span>
  82. </div>
  83. <div class="legs">
  84. {% for leg in t.legs %}
  85. <div class="leg {% if leg.is_change %}change{% endif %}">
  86. <span class="leg-dir">{{ leg.to_name }}</span>
  87. <span class="money {% if leg.money.negative %}neg{% else %}pos{% endif %}">{{ leg.money.text }}</span>
  88. </div>
  89. {% endfor %}
  90. </div>
  91. </div>
  92. {% endfor %}
  93. </div>