From d0455fbafb52024b790d8c3c13b1fc9506c57806 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 4 Feb 2020 17:10:11 +0530 Subject: [PATCH 1/2] Remove unused import --- datacenterlight/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index abd17964..3c9be6db 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -29,7 +29,7 @@ from utils.forms import ( ) from utils.hosting_utils import ( get_vm_price_with_vat, get_all_public_keys, get_vat_rate_for_country, - get_vm_price_for_given_vat, round_up + get_vm_price_for_given_vat ) from utils.stripe_utils import StripeUtils from utils.tasks import send_plain_email_task From 246292135dc1783a94073ddae25b66c1aff68a02 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 6 Feb 2020 14:45:40 +0530 Subject: [PATCH 2/2] Introduce tabs in the invoice list --- hosting/templates/hosting/invoices.html | 140 +++++++++++++----------- 1 file changed, 77 insertions(+), 63 deletions(-) diff --git a/hosting/templates/hosting/invoices.html b/hosting/templates/hosting/invoices.html index 1a97fd1f..9cf59e36 100644 --- a/hosting/templates/hosting/invoices.html +++ b/hosting/templates/hosting/invoices.html @@ -2,70 +2,84 @@ {% load staticfiles bootstrap3 humanize i18n custom_tags %} {% block content %} -
-
-

{% trans "My Bills" %}

- {% if messages %} -
- {% for message in messages %} - {{ message }} - {% endfor %} -
- {% endif %} -
-
- - - - - - - - - - - - - {% for inv_data in invs %} - - {{ inv_data | get_line_item_from_stripe_invoice }} - - {% endfor %} - -
{% trans "VM ID" %}{% trans "IP Address" %}/{% trans "Product" %}{% trans "Period" %}{% trans "Amount" %}
-{% if invs.has_other_pages %} -
    - {% if invs.has_previous %} - {% if user_email %} -
  • «
  • - {% else %} -
  • «
  • - {% endif %} - {% else %} -
  • «
  • - {% endif %} - {% for i in invs.paginator.page_range %} - {% if invs.number == i %} -
  • {{ i }} (current)
  • - {% else %} - {% if user_email %} -
  • {{ i }}
  • - {% else %} -
  • {{ i }}
  • - {% endif %} - {% endif %} - {% endfor %} - {% if invs.has_next %} - {% if user_email %} -
  • »
  • - {% else %} -
  • »
  • - {% endif %} - {% else %} -
  • »
  • - {% endif %} +
    + -{% endif %} +
    +
    +
    +
    +

    {% trans "My Bills" %}

    + {% if messages %} +
    + {% for message in messages %} + {{ message }} + {% endfor %} +
    + {% endif %} +
    +
    + + + + + + + + + + + + + {% for inv_data in invs %} + + {{ inv_data | get_line_item_from_stripe_invoice }} + + {% endfor %} + +
    {% trans "VM ID" %}{% trans "IP Address" %}/{% trans "Product" %}{% trans "Period" %}{% trans "Amount" %}
    + {% if invs.has_other_pages %} +
      + {% if invs.has_previous %} + {% if user_email %} +
    • «
    • + {% else %} +
    • «
    • + {% endif %} + {% else %} +
    • «
    • + {% endif %} + {% for i in invs.paginator.page_range %} + {% if invs.number == i %} +
    • {{ i }} (current)
    • + {% else %} + {% if user_email %} +
    • {{ i }}
    • + {% else %} +
    • {{ i }}
    • + {% endif %} + {% endif %} + {% endfor %} + {% if invs.has_next %} + {% if user_email %} +
    • »
    • + {% else %} +
    • »
    • + {% endif %} + {% else %} +
    • »
    • + {% endif %} +
    + {% endif %} + +
    +
    +
    +

    One-off payments

    +
    +
    {% endblock %}