From f4a81e909699b4dcafa1281bf127a2c509183e79 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 6 Jun 2017 03:43:50 +0530 Subject: [PATCH] Fixed getting template name from template id --- .../locale/de/LC_MESSAGES/django.mo | Bin 4037 -> 4165 bytes .../locale/de/LC_MESSAGES/django.po | 37 ++- .../datacenterlight/css/landing-page.css | 32 ++- .../templates/datacenterlight/order.html | 253 +++++++++++------- .../templates/datacenterlight/pricing.html | 14 +- .../templates/datacenterlight/success.html | 134 ++++++++++ datacenterlight/urls.py | 1 + datacenterlight/views.py | 8 +- 8 files changed, 361 insertions(+), 118 deletions(-) create mode 100644 datacenterlight/templates/datacenterlight/success.html diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.mo b/datacenterlight/locale/de/LC_MESSAGES/django.mo index 8f4d30cd34bb8896e79ae7ba48b8cf312815cf33..60da107cbaf6e3917d7c2ab95d50e9e88cd3b6aa 100644 GIT binary patch delta 931 zcmX}qO=uHA6u|LG(~qPzwZ@Mc+uDh>mujQ^l130E+CoJM1#3OnLq3Ld>1HFzMp1+y zc<4z5Pxa`>P3R$Fy(vmO^y)O|9v@;me!>p?f?c?U7x5>KVX{@J9$Z2G)LkCC@E&&J19Wf=!x(Dw_oHp9 zrqY{EhO0X{wS0DV)YM_Tef@!sj@S>v#gU@Hj?E@&eDI zeC|g_&F|rHRen5?pKANON~wszwXe!~f*comKKiDKBxI*#)BBo;7@Wk>;1 zTnll8h!Jv)GUR$>9Q5&uXKJYfJh|5YLylF3bUozF{09f&{YYg+t!j{RW zh>)Y!L_aY=aGR>$A6y8Il*)Nij_Y)_tX-2S>RXm=>s-lkGdWk^E>-nSE2B*@W7+j= z`=3DPsnL^DdTi?S_(Z)B>J9`_k9)d?>+9jZ)}_2%4Y05d5kW8cwMk%uV}e?ZrL%8mu+VBGU>GC=&PojwVb@Xt^OtwY54~k Ci*(@t delta 836 zcmZwFOGs346vy#%XPj|n)N!)3d|x%go-$*jASmS&0H! z$tDx(U<;o*JUkI5d_$I2=HKH@T*gQE4=1sMr*LbZP=$X(?Z6^Fz*W41akfkId8Bz8 zLNzqzo!(60J0@OXB_3lrR?yxyHY3HGQx+yl;AOsNQ0v=p4ttTD_7hdm3O3*`)K2}y z9^ApZ=(VKH?s4-Nf8zp@+os7bpW!&ZMK&g=UhjyGrHRnPFAy49e}&++ux6r$P?s7y z9*yb{s|xjkF4WoCQ1u$Bz9qN|FBBYf8bR$$BSEdf(AIKdL5G^)H8Gc{BkBnqk!ADl zaGzUv{o>`5xmmZZP#Cyw_x)6~5cR*t_ncJzcCN$Cc6H}E{f~*XQ+eL{zRyi1t^Rtl Kw#Xk%A2}!T$V_nn diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 45629dab..014a31d9 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-05-23 17:26-0500\n" +"POT-Creation-Date: 2017-06-05 15:23-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -67,6 +67,7 @@ msgstr "Vielen Dank!" #: templates/datacenterlight/index.html:62 #: templates/datacenterlight/pricing.html:62 +#: templates/datacenterlight/success.html:62 msgid "What is it" msgstr "Was ist es?" @@ -74,7 +75,8 @@ msgstr "Was ist es?" #: templates/datacenterlight/index.html:171 #: templates/datacenterlight/index.html:331 #: templates/datacenterlight/pricing.html:65 -#: templates/datacenterlight/pricing.html:188 +#: templates/datacenterlight/pricing.html:198 +#: templates/datacenterlight/success.html:65 msgid "Scale out" msgstr "Skalierung" @@ -82,19 +84,22 @@ msgstr "Skalierung" #: templates/datacenterlight/index.html:197 #: templates/datacenterlight/index.html:334 #: templates/datacenterlight/pricing.html:68 -#: templates/datacenterlight/pricing.html:191 +#: templates/datacenterlight/pricing.html:201 +#: templates/datacenterlight/success.html:68 msgid "Reliable and light" msgstr "Zuverlässig und leicht" #: templates/datacenterlight/index.html:71 #: templates/datacenterlight/pricing.html:71 +#: templates/datacenterlight/success.html:71 msgid "Buy VM" msgstr "VM Kaufen" #: templates/datacenterlight/index.html:74 #: templates/datacenterlight/index.html:341 #: templates/datacenterlight/pricing.html:74 -#: templates/datacenterlight/pricing.html:198 +#: templates/datacenterlight/pricing.html:208 +#: templates/datacenterlight/success.html:74 msgid "Contact" msgstr "Kontakt" @@ -112,7 +117,7 @@ msgstr "Das will ich haben!" #: templates/datacenterlight/index.html:142 #: templates/datacenterlight/index.html:328 -#: templates/datacenterlight/pricing.html:185 +#: templates/datacenterlight/pricing.html:195 msgid "How it works" msgstr "Wie es funktioniert" @@ -177,11 +182,13 @@ msgid "Based in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" #: templates/datacenterlight/index.html:243 -msgid "15 GB Storage (SSD)" +#, fuzzy +#| msgid "15 GB Storage (SSD)" +msgid "10 GB Storage (SSD)" msgstr "15 GB Storage (SSD)" #: templates/datacenterlight/index.html:246 -#: templates/datacenterlight/pricing.html:156 +#: templates/datacenterlight/pricing.html:166 msgid "Order Now!" msgstr "Bestelle jetzt!" @@ -202,12 +209,12 @@ msgid "Contact us!" msgstr "Kontaktiere uns!" #: templates/datacenterlight/index.html:324 -#: templates/datacenterlight/pricing.html:181 +#: templates/datacenterlight/pricing.html:191 msgid "Home" msgstr "Home" #: templates/datacenterlight/index.html:337 -#: templates/datacenterlight/pricing.html:194 +#: templates/datacenterlight/pricing.html:204 msgid "Pricing" msgstr "Preise" @@ -217,14 +224,22 @@ msgstr "Preise" msgid "Hosted in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" -#: templates/datacenterlight/pricing.html:136 +#: templates/datacenterlight/pricing.html:139 msgid "GB Storage (SSD)" msgstr "GB Storage (SSD)" -#: templates/datacenterlight/pricing.html:163 +#: templates/datacenterlight/pricing.html:173 msgid "Simple and affordable: Try our virtual machine with featherlight price." msgstr "" +#: templates/datacenterlight/success.html:101 +msgid "Thank you for order! Our team will contact you via email" +msgstr "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit Ihnen via E-Mail in Verbindung." + +#: templates/datacenterlight/success.html:102 +msgid "as soon as possible!" +msgstr "" + #~ msgid "Buy Now!" #~ msgstr "Kaufe jetzt!" diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 74671e1a..5c878fc7 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -243,6 +243,10 @@ h6 { align-items: center; position: relative; } +.intro-pricing.success-pricing{ + height: 100vh; + max-height: 100vh; +} .intro-pricing::before{ content: ""; position: absolute; @@ -631,12 +635,32 @@ h6 { height: 40px; width: 200px; text-align: center; - font-size: 18px; + font-size: 16px; + margin-left: 10px; } .price-calc-section .card .check-ip{ font-size: 18px; } - +.price-calc-section .card .description.input{ + justify-content: center; +} +.price-calc-section .card .description.input label{ + font-size: 15px; + font-weight: 800; + font-family: 'Montserrat-Regular'; + margin-bottom: 0; + width: 40px; +} +.price-calc-section .card .description.input input{ + width: 200px; + font-size: 14px; + text-align: left; + padding: 5px 10px; + border-radius: 4px; + border: 1px solid #d0d0d0; + background: #fff; + margin-left: 10px; +} .price-calc-section .card .check-ip input[type=checkbox]{ font-size: 17px; margin: 0 8px; @@ -735,6 +759,10 @@ h6 { left: 50%; transform: translate(-50%, 0); } + + .intro-pricing .intro-message .section-heading { + font-size: 30px; + } } diff --git a/datacenterlight/templates/datacenterlight/order.html b/datacenterlight/templates/datacenterlight/order.html index ab224172..61ab149a 100644 --- a/datacenterlight/templates/datacenterlight/order.html +++ b/datacenterlight/templates/datacenterlight/order.html @@ -1,5 +1,7 @@ +{% load staticfiles i18n%} +{% get_current_language as LANGUAGE_CODE %} - + @@ -9,19 +11,24 @@ - Rails Hosting.ch - Ruby on Rails as easy as possible + datacenterlight.ch - Featherlight Swiss VM - + - - + + - - - - + + + + + + + + + @@ -36,7 +43,7 @@ +
- - - -
-
-
 
- -
-

-

Order Now

-

 

- -
-   -
- - - -
- -

 

- -
-
-   -
- - - -
-

VM size sliders to be inserted

- - -
- - -
-
- - -
- - -

-
    - -
 
-
-
-
- +
+

{% trans "We are cutting down the costs significantly!" %}

- - +
- + +
+
+ +
+
+ {% csrf_token %} + +
+

{% trans "VM hosting" %}

+
+
+ 15 + CHF +
+
+
+

{% trans "Hosted in Switzerland" %}

+
+
+ + + Core + +
+
+ + + GB RAM + +
+
+ + + {% trans "GB Storage (SSD)" %} + +
+ + +
+ + +
+ + + +
+ + +
+
+ + +
+
+ + +
+
+
+ +
+

{% trans "Simple and affordable: Try our virtual machine with featherlight price." %}

+ +
+

Our VMs are hosted in Glarus, Switzerland. WARNING: We are currently running in BETA mode, especially our website We hope you will not encounter any hiccups, but if you, please let us know at support@datacenterlight.ch

+
+
+
+ + +
- + + + + + - + + diff --git a/datacenterlight/templates/datacenterlight/pricing.html b/datacenterlight/templates/datacenterlight/pricing.html index 1674f82e..da13d5e1 100644 --- a/datacenterlight/templates/datacenterlight/pricing.html +++ b/datacenterlight/templates/datacenterlight/pricing.html @@ -1,7 +1,7 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} - + @@ -141,7 +141,8 @@ -
+
+ +
+
+ + +
diff --git a/datacenterlight/templates/datacenterlight/success.html b/datacenterlight/templates/datacenterlight/success.html new file mode 100644 index 00000000..bf7f982a --- /dev/null +++ b/datacenterlight/templates/datacenterlight/success.html @@ -0,0 +1,134 @@ +{% load staticfiles i18n%} +{% get_current_language as LANGUAGE_CODE %} + + + + + + + + + + + + datacenterlight.ch - Featherlight Swiss VM + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

{% trans "Thank you for order! Our team will contact you via email" %}

+ {% if LANGUAGE_CODE == 'en-us'%} +

{% trans "as soon as possible!" %}

+ {% endif %} +
+ +
+ + + + + + + + + + + + + diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 60dfcb82..9545a8cf 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -8,5 +8,6 @@ urlpatterns = [ url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^/order/?$', PricingView.as_view(), name='pricing'), + url(r'^/order-success/?$', SuccessView.as_view(), name='success'), url(r'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 6a7f366c..bdc4a2e7 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -16,6 +16,9 @@ from opennebula_api.serializers import VirtualMachineTemplateSerializer class LandingProgramView(TemplateView): template_name = "datacenterlight/landing.html" +class SuccessView(TemplateView): + template_name = "datacenterlight/success.html" + class PricingView(TemplateView): template_name = "datacenterlight/pricing.html" @@ -47,7 +50,8 @@ class PricingView(TemplateView): price = request.POST.get('total') template_id = int(request.POST.get('config')) manager = OpenNebulaManager() - vm_template_name = (manager.get_template(template_id)).get_name() + template = manager.get_template(template_id) + template_data = VirtualMachineTemplateSerializer(template).data name = request.POST.get('name') email = request.POST.get('email') @@ -85,7 +89,7 @@ class PricingView(TemplateView): 'memory': memory, 'storage': storage, 'price': price, - 'template': vm_template_name, + 'template': template_data['name'], } email_data = { 'subject': 'New Order Received',