account.html 2.8 KB

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