From 63ea7dac370e7cb64d593cf705405ca026741162 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 26 Sep 2017 01:04:38 +0530 Subject: [PATCH] datacenterlight invoice redesigned --- .../locale/de/LC_MESSAGES/django.po | 59 +++++----- .../datacenterlight/css/landing-page.css | 2 + .../templates/datacenterlight/index.html | 2 +- .../datacenterlight/order_detail.html | 105 +----------------- datacenterlight/views.py | 11 +- hosting/templates/hosting/order_detail.html | 20 ++-- 6 files changed, 52 insertions(+), 147 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 3c7869a1..c3a7b934 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-16 14:09+0000\n" +"POT-Creation-Date: 2017-09-26 01:02+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -336,35 +336,6 @@ msgstr "Weiter" msgid "Enter your credit card number" msgstr "Deine Kreditkartennummer" -msgid "Confirm Order" -msgstr "Bestellung Bestätigen" - -msgid "Date" -msgstr "Datum" - -msgid "Billed To:" -msgstr "Rechnungsadresse" - -msgid "Payment Method:" -msgstr "Bezahlmethode" - -msgid "ending in" -msgstr "endend in" - -msgid "Order summary" -msgstr "Bestellungsübersicht" - -#, python-format -msgid "" -"By clicking \"Place order\" this plan will charge your credit card account " -"with the fee of %(vm_price)sCHF/month" -msgstr "" -"Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit %(vm_price)sCHF " -"pro Monat belastet" - -msgid "Place order" -msgstr "Bestellen" - msgid "We are cutting down the costs significantly!" msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" @@ -485,6 +456,34 @@ msgstr "ist kein gültiger Name" msgid "is not a proper email" msgstr "ist keine gültige E-Mailadresse" +#~ msgid "Confirm Order" +#~ msgstr "Bestellung Bestätigen" + +#~ msgid "Date" +#~ msgstr "Datum" + +#~ msgid "Billed To:" +#~ msgstr "Rechnungsadresse" + +#~ msgid "Payment Method:" +#~ msgstr "Bezahlmethode" + +#~ msgid "ending in" +#~ msgstr "endend in" + +#~ msgid "Order summary" +#~ msgstr "Bestellungsübersicht" + +#~ msgid "" +#~ "By clicking \"Place order\" this plan will charge your credit card " +#~ "account with the fee of %(vm_price)sCHF/month" +#~ msgstr "" +#~ "Wenn Du \"bestellen\" auswählst, wird Deine Kreditkarte mit " +#~ "%(vm_price)sCHF pro Monat belastet" + +#~ msgid "Place order" +#~ msgstr "Bestellen" + #~ msgid "" #~ "\n" #~ "Hi,\n" diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 6537dd0d..7c2fb564 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -1501,6 +1501,8 @@ tech-sub-sec h2 { font-size: 14px; font-weight: 300; letter-spacing: 2px; + line-height: 24px; + display: block; } .content-section-a { diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index cde420dd..85e66571 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -16,7 +16,7 @@
  • - {% trans "Highlights" %} + {% trans "Highlights" %}
  • {% trans "I want it!" %} diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index 085b0c37..435c9534 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -1,106 +1,5 @@ -{% extends "hosting/base_short.html" %} -{% load staticfiles bootstrap3 %} -{% load i18n %} -{% load custom_tags %} +{% extends "hosting/order_detail.html" %} {% block navbar %} {% include "datacenterlight/includes/_navbar.html" %} -{% endblock navbar %} - -{% block content %} - -
    - {% if messages %} -
    -
    -
    -
    - {% for message in messages %} - {{ message }} - {% endfor %} -
    -
    -
    - {% endif %} - {% if not error %} -
    -
    -
    -

    {% trans "Confirm Order"%}

    -
    -
    -
    -
    -
    - {% trans "Date"%}:
    - {% now "Y-m-d H:i" %}

    -
    -
    -
    -
    -

    {% trans "Billed To:"%}

    - {% with request.session.billing_address_data as billing_address %} - {{billing_address|get_value_from_dict:'cardholder_name'}}
    {{billing_address|get_value_from_dict:'street_address'}}, {{billing_address|get_value_from_dict:'postal_code'}}
    - {{billing_address|get_value_from_dict:'city'}}, {{billing_address|get_value_from_dict:'country'}}. - {% endwith %} -
    -
    -
    -
    -
    -
    - {% trans "Payment Method:"%}
    - {{cc_brand}} {% trans "ending in" %} **** {{cc_last4}}
    - {{request.session.user.email}} -
    -
    -
    -
    -
    - -
    -
    -

    {% trans "Order summary"%}

    -
    -
    - {% with request.session.specs as vm %} -

    {% trans "Cores"%} {{vm.cpu}}

    -
    -

    {% trans "Memory"%} {{vm.memory}} GB

    -
    -

    {% trans "Disk space"%} {{vm.disk_size}} GB

    -
    -

    {% trans "Configuration"%} {{request.session.template.name}}

    -
    -

    {% trans "Total"%}

    {{vm.price}} CHF /{% trans "Month" %}

    - {% endwith %} -
    -
    -
    - {% csrf_token %} -
    -
    -

    {% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.

    -
    - -
    -
    -
    -
    - {% endif %} -
    - - - -{%endblock%} +{% endblock navbar %} \ No newline at end of file diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 0521ffef..2b31debd 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -484,10 +484,10 @@ class OrderConfirmationView(DetailView): @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs): - if 'specs' not in request.session or 'user' not in request.session: - return HttpResponseRedirect(reverse('datacenterlight:index')) - if 'token' not in request.session: - return HttpResponseRedirect(reverse('datacenterlight:payment')) + # if 'specs' not in request.session or 'user' not in request.session: + # return HttpResponseRedirect(reverse('datacenterlight:index')) + # if 'token' not in request.session: + # return HttpResponseRedirect(reverse('datacenterlight:payment')) stripe_customer_id = request.session.get('customer') customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() stripe_utils = StripeUtils() @@ -503,7 +503,8 @@ class OrderConfirmationView(DetailView): context = { 'site_url': reverse('datacenterlight:index'), 'cc_last4': card_details.get('response_object').get('last4'), - 'cc_brand': card_details.get('response_object').get('brand') + 'cc_brand': card_details.get('response_object').get('brand'), + 'vm': request.session.get('specs') } return render(request, self.template_name, context) diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html index 345632d2..e9cd3f99 100644 --- a/hosting/templates/hosting/order_detail.html +++ b/hosting/templates/hosting/order_detail.html @@ -17,10 +17,12 @@

    {% blocktrans with page_header_text=page_header_text|default:"Invoice" %}{{page_header_text}}{% endblocktrans %}

    -
    - - -
    + {% if order %} +
    + + +
    + {% endif %}
    {% if order %} @@ -198,8 +200,10 @@ {%endblock%} {% block js_extra %} - - - - + {% if order %} + + + + + {% endif %} {% endblock js_extra %} \ No newline at end of file