trans_carried.html 1.0 KB

1234567891011121314151617181920212223242526
  1. {% extends 'sharix_admin/index.html' %}
  2. {% load i18n %}
  3. {% block contenthome %}
  4. <h1 >{{ title }}</h1>
  5. <h3 >{% trans 'User: ' %}{{ request.user.username }}</h3>
  6. <h3 >{% trans 'Balance: ' %}{{ wallet.balance }} р.</h3>
  7. {% if balance_err %}
  8. <div class="alert alert-danger" role="alert">
  9. {{ balance_err }}
  10. </div>
  11. {% endif %}
  12. <ul class="list-group">
  13. <li class="list-group-item active">{{ model.name_operation }}</li>
  14. <li class="list-group-item">{% trans 'Price: ' %}{{ model.price }}</li>
  15. <li class="list-group-item">{% trans 'Owner: ' %}{{ model.wallet.user.username }}</li>
  16. <li class="list-group-item">{% trans 'Date of service: ' %}{{ model.date_operation }}</li>
  17. <li class="list-group-item">{% trans 'Conducted: ' %}{{ model.is_carried_out }}</li>
  18. </ul>
  19. {% if not model.is_carried_out %}
  20. <form method="post">
  21. {% csrf_token %}
  22. <button class="btn btn-success my-3" type="submit">{% trans 'Spend' %}</button>
  23. </form>
  24. {% endif %}
  25. {% endblock contenthome %}