address.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {% from "macros.html" import make_short %}
  2. {% extends "layout.html" %}
  3. {% block body %}
  4. <div class=mycard>
  5. <div class="mycard-header"><h1>Address</h1></div>
  6. <table class=mycard-body>
  7. <tr>
  8. <th>Hash</th>
  9. <td>{{make_short(data.hash[142:])}}</td>
  10. </tr>
  11. <tr>
  12. <th>Credit</th>
  13. <td>{{data.credit}} CHaC</td>
  14. </tr>
  15. <tr>
  16. <td colspan=2>
  17. <div>
  18. {% for transaction in data.sent -%}
  19. <div class="mycard">
  20. <div class="mycard-header">
  21. <h3><a href="/transaction/{{transaction.hash}}">Sent</a></h3>
  22. </div>
  23. <table>
  24. {% if transaction.senders | length > 1%}
  25. <tr>
  26. <th>From:</th>
  27. <td>
  28. {% if transaction.senders %}
  29. {% for sender in transaction.senders -%}
  30. {{make_short(sender,"address")}}
  31. {%- endfor %}
  32. {% else %}
  33. Mining Reward
  34. {%endif %}
  35. </td>
  36. </tr>
  37. {% endif %}
  38. <tr>
  39. <th>Value:</th>
  40. <th>Address:</th>
  41. </tr>
  42. {% for target in transaction.targets -%}
  43. <tr>
  44. <td>{{target.amount}}</td>
  45. <td>{{make_short(target.recipient_pk,"address")}}</td>
  46. </tr>
  47. {%- endfor %}
  48. </table>
  49. </div>
  50. {%- endfor %}
  51. </div>
  52. <div>
  53. {% for transaction in data.received -%}
  54. <div class="mycard">
  55. <div class="mycard-header">
  56. <h3><a href="/transaction/{{transaction.hash}}">Received</a></h3>
  57. </div>
  58. <table class="mycard-body">
  59. <tr>
  60. <th>From:</th>
  61. <td>
  62. {% if transaction.senders %}
  63. {% for sender in transaction.senders -%}
  64. {{make_short(sender,"address")}}
  65. {%- endfor %}
  66. {% else %}
  67. Mining Reward
  68. {%endif %}
  69. </td>
  70. </tr>
  71. <tr>
  72. <th>Value:</th>
  73. <th>Address:</th>
  74. </tr>
  75. {% for target in transaction.targets -%}
  76. <tr>
  77. <td>
  78. {{target.amount}}
  79. </td>
  80. <td>
  81. {{make_short(target.recipient_pk,"address")}}
  82. </td>
  83. </tr>
  84. {%- endfor %}
  85. </table>
  86. </div>
  87. {%- endfor %}
  88. </div>
  89. </td>
  90. </tr>
  91. </table>
  92. </div>
  93. {% endblock %}