diff --git a/funding/templates/proposal/macros/transaction.html b/funding/templates/proposal/macros/transaction.html new file mode 100644 index 0000000..3b2866e --- /dev/null +++ b/funding/templates/proposal/macros/transaction.html @@ -0,0 +1,28 @@ +{% macro tx_item(tx) %} +
  • + + {{tx['datetime'].strftime('%Y-%m-%d %H:%M')}} + + + + Blockheight: {{tx['height']}} +
    + + {{tx['txid'][:32]}}... + + {% if tx['type'] == 'in' %} + + + {% else %} + - + {% endif %} + + {{tx['amount_human']|round(3)}} WOW + + {% if 'amount_usd' in tx %} + + ➞ $ {{tx['amount_usd']}} + + {% endif %} + +
  • +{% endmacro %} diff --git a/funding/templates/proposal/proposal.html b/funding/templates/proposal/proposal.html index bcd7cec..bff2ed4 100644 --- a/funding/templates/proposal/proposal.html +++ b/funding/templates/proposal/proposal.html @@ -165,12 +165,7 @@ {% include 'comments.html' %} - + {% from 'proposal/macros/transaction.html' import tx_item %} {% if proposal.balance['txs'] %}
    @@ -180,20 +175,7 @@
    @@ -203,7 +185,6 @@ {% endif %} - {% if proposal.spends['txs'] %}
    @@ -212,20 +193,7 @@
      {% for tx in proposal.spends['txs'] %} -
    • - {{tx['datetime'].strftime('%Y-%m-%d %H:%M')}} - Blockheight: {{tx['height']}} -
      - {{tx['txid'][:32]}}... - - - {{tx['amount_human']|round(3)}} WOW - {% if 'amount_usd' in tx %} - - ➞ $ {{tx['amount_usd']}} - - {% endif %} - -
    • + {{ tx_item(tx) }} {% endfor %}