From 395fa371db6b7fc62d5eba6b2479a1e03f68906c Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Sun, 20 Aug 2017 21:40:17 +0530 Subject: [PATCH 1/7] my orders page redesigned --- hosting/locale/de/LC_MESSAGES/django.po | 97 +++++++----- .../static/hosting/css/virtual-machine.css | 41 ++++- hosting/static/hosting/img/shopping-cart.svg | 18 +++ hosting/static/hosting/js/initial.js | 8 + hosting/templates/hosting/orders.html | 146 +++++++----------- 5 files changed, 180 insertions(+), 130 deletions(-) create mode 100644 hosting/static/hosting/img/shopping-cart.svg diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 3cc30292..b53124bb 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/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-08-16 04:19+0530\n" +"POT-Creation-Date: 2017-08-20 21:37+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -245,31 +245,26 @@ msgstr "Gesamt" msgid "Finish Configuration" msgstr "Konfiguration beenden" +msgid "Order Nr." +msgstr "Bestellung Nr." + msgid "Amount" msgstr "Betrag" msgid "Status" msgstr "" -msgid "Approved" -msgstr "Akzeptiert" - -msgid "Declined" -msgstr "Abgelehnt" +msgid "See Invoice" +msgstr "Rechnung" msgid "View Detail" msgstr "Details anzeigen" -msgid "Cancel Order" -msgstr "Bestellung stornieren" +msgid "Page" +msgstr "" -#, fuzzy -#| msgid "Do You want to delete your order?" -msgid "Do you want to delete your order?" -msgstr "Willst du deine Bestellung löschen?" - -msgid "Delete" -msgstr "Löschen" +msgid "of" +msgstr "" msgid "Your Order" msgstr "Deine Bestellung" @@ -300,13 +295,21 @@ msgstr "" "\"https://stripe.com\" target=\"_blank\">Stripe für die Bezahlung und " "speichern keine Informationen in unserer Datenbank." +#, fuzzy +#| msgid "" +#| "\n" +#| " You are not making any " +#| "payment yet. After submitting your card\n" +#| " information, you will be " +#| "taken to the Confirm Order Page.\n" +#| " " msgid "" "\n" -" You are not making any payment yet. " -"After submitting your card\n" -" information, you will be taken to " -"the Confirm Order Page.\n" -" " +" You are not making any " +"payment yet. After submitting your card\n" +" information, you will be " +"taken to the Confirm Order Page.\n" +" " msgstr "" "\n" "Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " @@ -328,19 +331,6 @@ msgstr "" msgid "Card Type" msgstr "Kartentyp" -msgid "" -"\n" -" You are not making any payment " -"yet. After submitting your card\n" -" information, you will be taken " -"to the Confirm Order Page.\n" -" " -msgstr "" -"\n" -"Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " -"Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " -"weitergeleitet." - msgid "Processing" msgstr "Weiter" @@ -390,6 +380,9 @@ msgstr "" msgid "Private Key" msgstr "" +msgid "Delete" +msgstr "Löschen" + msgid "Delete SSH Key" msgstr "SSH Key löschen" @@ -441,12 +434,6 @@ msgstr "" msgid "CREATE VM" msgstr "NEUE VM" -msgid "Page" -msgstr "" - -msgid "of" -msgstr "" - msgid "login" msgstr "einloggen" @@ -474,6 +461,11 @@ msgstr "Du kannst dich nun" msgid "Sorry. Your request is invalid." msgstr "Entschuldigung, deine Anfrage ist ungültig." +#, fuzzy +#| msgid "Credit Card" +msgid "Invalid credit card" +msgstr "Invalid Kreditkarte" + msgid "Confirm Order" msgstr "Bestellung Bestätigen" @@ -482,6 +474,33 @@ msgid "" "contact Data Center Light Support." msgstr "" +#~ msgid "Approved" +#~ msgstr "Akzeptiert" + +#~ msgid "Declined" +#~ msgstr "Abgelehnt" + +#~ msgid "Cancel Order" +#~ msgstr "Bestellung stornieren" + +#, fuzzy +#~| msgid "Do You want to delete your order?" +#~ msgid "Do you want to delete your order?" +#~ msgstr "Willst du deine Bestellung löschen?" + +#~ msgid "" +#~ "\n" +#~ " You are not making any payment " +#~ "yet. After submitting your card\n" +#~ " information, you will be taken to " +#~ "the Confirm Order Page.\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " +#~ "Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " +#~ "weitergeleitet." + #~ msgid "Ipv4" #~ msgstr "IPv4" diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index 420a9452..ee7cb2a3 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -239,10 +239,10 @@ } .dashboard-title-thin .un-icon { - height: 34px; + height: 30px; margin-right: 5px; margin-top: -1px; - width: 20px; + width: 30px; } .dashboard-subtitle { @@ -287,6 +287,24 @@ color: #3770CC; } +.btn-order-detail { + background: #87B6EA; + color: #fff; + font-weight: 400; + letter-spacing: 0.6px; + font-size: 14px; + border-radius: 3px; + border: 2px solid #87B6EA; + padding: 4px 20px; + width: 125px; + /* padding-bottom: 7px; */ +} + +.btn-order-detail:hover, .btn-order-detail:focus, .btn-order-detail:active { + background: #fff; + color: #87B6EA; +} + .vm-status, .vm-status-active, .vm-status-failed { font-weight: 600; } @@ -373,11 +391,28 @@ font-weight: 600; position: absolute; top: 5px; - + left: 8px; } .table-switch .last-td { position: absolute; bottom: 20px; right: 0; } + .table-switch tbody tr .xs-td-inline { + text-align: right; + padding-top: 6px; + } + .table-switch tbody tr .xs-td-bighalf { + width: 52%; + display: inline-block; + } + .table-switch tbody tr .xs-td-smallhalf { + width: 47%; + text-align: right; + display: inline-block; + } + .table-switch tbody tr .xs-td-smallhalf:before { + left: auto; + right: 8px; + } } \ No newline at end of file diff --git a/hosting/static/hosting/img/shopping-cart.svg b/hosting/static/hosting/img/shopping-cart.svg new file mode 100644 index 00000000..19e70e1d --- /dev/null +++ b/hosting/static/hosting/img/shopping-cart.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/js/initial.js b/hosting/static/hosting/js/initial.js index da2887c6..ea391ce2 100644 --- a/hosting/static/hosting/js/initial.js +++ b/hosting/static/hosting/js/initial.js @@ -13,4 +13,12 @@ $( document ).ready(function() { }, 1000); }); + $('.alt-text').on('mouseenter mouseleave', function(e){ + var $this = $(this); + var txt = $this.text(); + var alt = $this.attr('data-alt'); + $this.text(alt); + $this.attr('data-alt', txt); + }); + }); \ No newline at end of file diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index 9699cbaa..97164dfe 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -3,95 +3,65 @@ {% load i18n %} {% block content %} - -
-
-
-
- -

{% trans "My Orders"%}

-
- - - - - - - - - - - {% for order in orders %} - - - - - - - - - {% endfor %} - -
#{% trans "Date"%}{% trans "Amount"%}{% trans "Status"%}
{{ order.id }}{{ order.created_at | date:"M d, Y" }}{{ order.price }} CHF{% if order.approved %} - {% trans "Approved"%} - {% else %} - {% trans "Declined"%} - {% endif %} - - {% trans "View Detail"%} - -
- - {% if is_paginated %} - - {% endif %} - -
- +
+
+

{% trans "My Orders" %}

+ {% if messages %} +
+ {% for message in messages %} + {{ message }} + {% endfor %}
-
- + {% endif %} +
+ + + + + + + + + + + + + + + + + + + {% for order in orders %} + + {% endfor %} + +
{% trans "Order Nr." %}{% trans "Date" %}{% trans "Amount" %}{% trans "Status" %}
{{ order.id }}{{ order.created_at | date:"M d, Y" }}{{ order.price }} + {% if order.approved %} + Approved + {% else %} + Declined + {% endif %} + + {% trans "View Detail" %} +
+ + {% if is_paginated %} + + {% endif %} +
{% endblock %} From d8b76abda2e9e5c6faea07eff7462e7d1d6a1758 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Mon, 21 Aug 2017 23:41:38 +0530 Subject: [PATCH 2/7] translations fixed --- hosting/locale/de/LC_MESSAGES/django.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index b53124bb..94a6c028 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -435,7 +435,7 @@ msgid "CREATE VM" msgstr "NEUE VM" msgid "login" -msgstr "einloggen" +msgstr "Einloggen" msgid "" "Thank you for signing up. We have sent an email to you. Please follow the " @@ -464,7 +464,7 @@ msgstr "Entschuldigung, deine Anfrage ist ungültig." #, fuzzy #| msgid "Credit Card" msgid "Invalid credit card" -msgstr "Invalid Kreditkarte" +msgstr "Ungültige Kreditkarte" msgid "Confirm Order" msgstr "Bestellung Bestätigen" From 788621bd2bde8ca1dc1468b42ac18ac9c52127ca Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 23 Aug 2017 23:07:40 +0530 Subject: [PATCH 3/7] test markup removed --- .../static/hosting/css/virtual-machine.css | 2 +- hosting/templates/hosting/orders.html | 31 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index ee7cb2a3..d527cff4 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -296,7 +296,7 @@ border-radius: 3px; border: 2px solid #87B6EA; padding: 4px 20px; - width: 125px; + min-width: 155px; /* padding-bottom: 7px; */ } diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index 97164dfe..584babab 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -27,23 +27,22 @@ - - {{ order.id }} - {{ order.created_at | date:"M d, Y" }} - {{ order.price }} - - {% if order.approved %} - Approved - {% else %} - Declined - {% endif %} - - - {% trans "View Detail" %} - - {% for order in orders %} - + + {{ order.id }} + {{ order.created_at | date:"M d, Y" }} + {{ order.price }} + + {% if order.approved %} + Approved + {% else %} + Declined + {% endif %} + + + {% trans "View Detail" %} + + {% endfor %} From 78c99310022f714076df44ffef3811d2ad693d4c Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 23 Aug 2017 23:31:06 +0530 Subject: [PATCH 4/7] mobile view buttons shifted below --- hosting/static/hosting/css/virtual-machine.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index d527cff4..0ccdc589 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -395,7 +395,7 @@ } .table-switch .last-td { position: absolute; - bottom: 20px; + bottom: 18px; right: 0; } .table-switch tbody tr .xs-td-inline { From a2dd55cf16ebd7f8ecfddc251d9424c54de6528d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 23 Aug 2017 23:49:29 +0530 Subject: [PATCH 5/7] padding adjusted --- hosting/static/hosting/css/virtual-machine.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index 0ccdc589..be5addf1 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -373,8 +373,8 @@ position: relative; border-top: 1px solid #ddd; /* margin-top: 15px; */ - padding-top: 5px; - padding-bottom: 15px; + padding-top: 10px; + padding-bottom: 13px; } .table-switch tbody tr:last-child { border-bottom: 1px solid #ddd; @@ -395,7 +395,7 @@ } .table-switch .last-td { position: absolute; - bottom: 18px; + bottom: 13px; right: 0; } .table-switch tbody tr .xs-td-inline { From 4cf6df64a8cc2a6c23f66966536fc224a7ae8db6 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 23 Aug 2017 23:59:18 +0530 Subject: [PATCH 6/7] btn link fixed --- hosting/templates/hosting/orders.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index 584babab..ea4ded94 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -40,7 +40,7 @@ {% endif %} - {% trans "View Detail" %} + {% trans "View Detail" %} {% endfor %} From 04d7a2b076f30866136763119463041ec254cfd8 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 00:48:07 +0530 Subject: [PATCH 7/7] removed fuzzy --- hosting/locale/de/LC_MESSAGES/django.po | 2 -- 1 file changed, 2 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 94a6c028..49a05548 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -461,8 +461,6 @@ msgstr "Du kannst dich nun" msgid "Sorry. Your request is invalid." msgstr "Entschuldigung, deine Anfrage ist ungültig." -#, fuzzy -#| msgid "Credit Card" msgid "Invalid credit card" msgstr "Ungültige Kreditkarte"