diff --git a/Changelog b/Changelog index 1eaa55e5..d39dbd4f 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,16 @@ -Next release: +1.2.8: 2017-10-21 + * Remove ALLOWED_HOST alplora.ch + * Add ALLOWED_HOST hack4glarus.ch + * Fetch page_title and meta_description dynamically in glasfaser CMS template +1.2.7: 2017-10-20 * Bugfix: [dcl, hosting] Fix Stripe js error in confirm payment page * #3847: [ungleich] change text 'hosting products' -> 'our products' * #3829: [dcl] Handle landing login fail in payment page itself + * #3794: [dcl, hosting] Update email styles + * #3828: [dcl, hosting] invoice period set to show monthly subscription + * #3838: [hosting] restyle signup/login/password reset/password pages + * Bugfix: [dg] Remove validate email link in the registration email + * Feature: [ungleich_page] Add new glasfaser CMS template 1.2.6: 2017-10-10 * Bugfix: [dcl] Refactor and optimize images, links in glasfaser page * Bugfix: [dcl] Fix email not being sent issue diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index d5035912..ac796b95 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-10-10 21:35+0530\n" +"POT-Creation-Date: 2017-10-16 00:57+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -126,56 +126,57 @@ msgstr "" msgid "Thank you!" msgstr "Vielen Dank!" -msgid "Account Activation" -msgstr "Account Aktivierung" +msgid "Data Center Light Account Activation" +msgstr "Data Center Light Account Aktivierung" #, python-format msgid "" -"\n" -"You can activate your Data Center Light account by clicking here.
\n" +"You can activate your Data Center Light account by clicking here." +msgstr "" +"Klicke here um deinen Data Center " +"Light Account zu aktivieren." + +msgid "" "You can also copy and paste the following link into the address bar of your " -"browser
\n" -"to activate your Data Center Light account.
\n" -"%(base_url)s%(activation_link)s\n" -msgstr "" -"\n" -"Klicke hier um deinen Data " -"Center Light Account zu aktivieren oder kopiere den folgenden Link in die " -"Adressleiste deines Browsers.
\n" -"%(base_url)s%(activation_link)s\n" +"browser to activate your Data Center Light account." +msgstr "Kopiere den folgenden Link in die Adressleiste deines Browsers." -#, python-format -msgid "" -"Your account details are as follows:

\n" -"Username : Your email address
\n" -"Password : %(account_details)s

\n" -"You can reset your password here:\n" -"%(base_url)s%(reset_password_url)s\n" -msgstr "" +msgid "Your account details are as follows" +msgstr "Deine Account Details sind unten aufgelistet" -#, python-format -msgid "" -"You can activate your Data Center Light account by clicking here.\n" -"You can also copy and paste the following link into the address bar of your " -"browser\n" -"to activate your Data Center Light account.\n" -"%(base_url)s%(activation_link)s\n" -msgstr "" -"Klicke hier, um deinen Data Center Light Account zu aktivieren oder kopiere " -"den folgenden Link in die Adressleiste deines Browsers.\n" -"%(base_url)s%(activation_link)s\n" +msgid "Username" +msgstr "Username" + +msgid "Your email address" +msgstr "Deine E-Mail-Adresse" + +msgid "Password" +msgstr "Passwort" + +msgid "You can reset your password here" +msgstr "Du kannst dein Passwort hier zurück setzen" -#, python-format msgid "" -"Your account details are as follows:\n" -"\n" -"Username : Your email address\n" -"Password : %(account_details)s\n" -"\n" -"You can reset your password here:\n" -"%(base_url)s%(reset_password_url)s\n" -msgstr "" +"You can copy and paste the following link into the address bar of your " +"browser to activate your Data Center Light account." +msgstr "Kopiere den folgenden Link in die Adressleiste deines Browsers." + +msgid "Welcome to Data Center Light!" +msgstr "Willkommen beim Data Center Light!" + +msgid "" +"Thanks for joining us! We provide the most affordable virtual machines from " +"the heart of Switzerland." +msgstr "Bei uns findest Du die günstiges VMs aus der Schweiz." + +msgid "Try now, order a VM. VM price starts from only 15CHF per month." +msgstr "Unser Angebot beginnt bei 15 CHF pro Monat. Probier's jetzt aus!" + +msgid "ORDER VM" +msgstr "VM BESTELLEN" msgid "Home" msgstr "Home" @@ -512,6 +513,15 @@ msgstr "" "Deine VM ist gleich bereit. Wir senden Dir eine Bestätigungsemail, sobald Du " "auf sie zugreifen kannst." +#~ msgid "Processing..." +#~ msgstr "Abarbeitung..." + +#~ msgid "Hold tight, we are processing your request" +#~ msgstr "Bitte warten - wir verbeiten Deine Anfrage gerade" + +#~ msgid "Some problem encountered. Please try again later." +#~ msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." + #~ msgid "Submit" #~ msgstr "Absenden" @@ -530,15 +540,6 @@ msgstr "" #~ msgid "Order summary" #~ msgstr "Bestellungsübersicht" -#~ msgid "Processing..." -#~ msgstr "Abarbeitung..." - -#~ msgid "Hold tight, we are processing your request" -#~ msgstr "Bitte warten - wir verbeiten Deine Anfrage gerade" - -#~ msgid "Some problem encountered. Please try again later." -#~ msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." - #~ msgid "We are cutting down the costs significantly!" #~ msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" @@ -560,9 +561,6 @@ msgstr "" #~ "kontaktiere uns unter support@datacenterlight.ch. Unser Team wird sich " #~ "umgehend um dein Anliegen kümmern!" -#~ msgid "Email Address" -#~ msgstr "E-Mail-Adresse" - #~ msgid "is not a proper name" #~ msgstr "ist kein gültiger Name" diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 97599738..9b02420c 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -182,7 +182,11 @@ button, input, optgroup, select, textarea { .navbar-brand { padding: 10px 15px; - cursor: pointer; +} +@media (max-width: 767px) { + .navbar-brand { + padding: 10px 10px; + } } .navbar-right { @@ -1544,7 +1548,7 @@ tech-sub-sec h2 { } footer { - padding: 50px 0; + padding: 50px 20px; background-color: #f8f8f8; } diff --git a/datacenterlight/static/datacenterlight/img/logo_black.png b/datacenterlight/static/datacenterlight/img/logo_black.png new file mode 100644 index 00000000..5dfd0eaa Binary files /dev/null and b/datacenterlight/static/datacenterlight/img/logo_black.png differ diff --git a/datacenterlight/static/datacenterlight/img/pattern.jpg b/datacenterlight/static/datacenterlight/img/pattern.jpg index 8ae4c0f2..7c66e007 100755 Binary files a/datacenterlight/static/datacenterlight/img/pattern.jpg and b/datacenterlight/static/datacenterlight/img/pattern.jpg differ diff --git a/datacenterlight/tasks.py b/datacenterlight/tasks.py index 1f34c3fe..3db6eb54 100644 --- a/datacenterlight/tasks.py +++ b/datacenterlight/tasks.py @@ -5,6 +5,7 @@ from celery.utils.log import get_task_logger from celery import current_task from django.conf import settings from django.core.mail import EmailMessage +from django.core.urlresolvers import reverse from django.utils import translation from django.utils.translation import ugettext_lazy as _ @@ -131,9 +132,9 @@ def create_vm_task(self, vm_template_id, user, specs, template, 'storage': specs.get('disk_size'), 'price': specs.get('price'), 'template': template.get('name'), - 'vm.name': vm['name'], - 'vm.id': vm['vm_id'], - 'order.id': order.id + 'vm_name': vm.get('name'), + 'vm_id': vm['vm_id'], + 'order_id': order.id } email_data = { 'subject': settings.DCL_TEXT + " Order from %s" % context['email'], @@ -155,13 +156,14 @@ def create_vm_task(self, vm_template_id, user, specs, template, translation.activate(lang) # Send notification to the user as soon as VM has been booked context = { - 'vm': vm, - 'order': order, 'base_url': "{0}://{1}".format(user.get('request_scheme'), user.get('request_host')), + 'order_url': reverse('hosting:orders', + kwargs={'pk': order.id}), 'page_header': _( 'Your New VM %(vm_name)s at Data Center Light') % { - 'vm_name': vm.get('name')} + 'vm_name': vm.get('name')}, + 'vm_name': vm.get('name') } email_data = { 'subject': context.get('page_header'), diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index 3c7fae74..8f270a3f 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -1,24 +1,58 @@ -{% extends "datacenterlight/emails/base_email_datacenterlight.html" %} -{% load static from staticfiles %} -{% load i18n %} -{% block email_head %} -{{dcl_text}} {% trans 'Account Activation' %} -{% endblock %} -{% block email_body %} -{% blocktrans %} -You can activate your Data Center Light account by clicking here.
-You can also copy and paste the following link into the address bar of your browser
-to activate your Data Center Light account.
-{{base_url}}{{activation_link}} -{% endblocktrans %} -{% if account_details %} -{% url 'hosting:reset_password' as reset_password_url %} -

-{% blocktrans %}Your account details are as follows:

-Username : Your email address
-Password : {{account_details}}

-You can reset your password here: -{{base_url}}{{reset_password_url}} -{% endblocktrans %} -{% endif %} -{% endblock %} +{% load static i18n %} + + + + + + + {% trans "Data Center Light Account Activation" %} + + + + + + + + + + + + + + + + + + +
+ +
+

{% trans "Data Center Light Account Activation" %}

+
+

+ {% blocktrans %}You can activate your Data Center Light account by clicking here.{% endblocktrans %} +

+

+ {% blocktrans %}You can also copy and paste the following link into the address bar of your browser to activate your Data Center Light account.{% endblocktrans %} +

+

+ {{base_url}}{{activation_link}} +

+

+ {% if account_details %} + {% url 'hosting:reset_password' as reset_password_url %} + {% trans "Your account details are as follows" %}: + + {% trans "Username" %} : {% trans "Your email address" %} + {% trans "Password" %} : {{account_details}} + + {% trans "You can reset your password here" %}: + {{base_url}}{{reset_password_url}} + {% endif %} +

+
+

{% trans "Your Data Center Light Team" %}

+
+ + + diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.txt b/datacenterlight/templates/datacenterlight/emails/user_activation.txt index 7c833256..4f66e239 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.txt +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.txt @@ -1,21 +1,20 @@ -{% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} {% load i18n %} -{% block email_head %}{{dcl_text}} {% trans 'Account Activation' %}{% endblock %} -{% block email_body %} -{% blocktrans %}You can activate your Data Center Light account by clicking here. -You can also copy and paste the following link into the address bar of your browser -to activate your Data Center Light account. + +{% trans "Data Center Light Account Activation" %} + +{% blocktrans %}You can copy and paste the following link into the address bar of your browser to activate your Data Center Light account.{% endblocktrans %} + {{base_url}}{{activation_link}} -{% endblocktrans %} + {% if account_details %} -{% url 'hosting:reset_password' as reset_password_url %} -{% blocktrans %}Your account details are as follows: + {% url 'hosting:reset_password' as reset_password_url %} + {% trans "Your account details are as follows" %}: -Username : Your email address -Password : {{account_details}} + {% trans "Username" %} : {% trans "Your email address" %} + {% trans "Password" %} : {{account_details}} -You can reset your password here: -{{base_url}}{{reset_password_url}} -{% endblocktrans %} + {% trans "You can reset your password here" %}: + {{base_url}}{{reset_password_url}} {% endif %} -{% endblock %} + +{% trans "Your Data Center Light Team" %} \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/emails/welcome_user.html b/datacenterlight/templates/datacenterlight/emails/welcome_user.html new file mode 100644 index 00000000..e947ac97 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/welcome_user.html @@ -0,0 +1,48 @@ +{% load static i18n %} + + + + + + + {% trans "Welcome to Data Center Light!" %} + + + + + + + + + + + + + + + + + + + + + +
+ +
+

{% trans "Welcome to Data Center Light!" %}

+
+

+ {% blocktrans %}Thanks for joining us! We provide the most affordable virtual machines from the heart of Switzerland.{% endblocktrans %} +

+

+ {% blocktrans %}Try now, order a VM. VM price starts from only 15CHF per month.{% endblocktrans %} +

+
+ {% trans "ORDER VM" %} +
+

{% trans "Your Data Center Light Team" %}

+
+ + + \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/emails/welcome_user.txt b/datacenterlight/templates/datacenterlight/emails/welcome_user.txt new file mode 100644 index 00000000..0e7820e6 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/welcome_user.txt @@ -0,0 +1,10 @@ +{% load i18n %} + +{% trans "Welcome to Data Center Light!" %} + +{% blocktrans %}Thanks for joining us! We provide the most affordable virtual machines from the heart of Switzerland.{% endblocktrans %} +{% blocktrans %}Try now, order a VM. VM price starts from only 15CHF per month.{% endblocktrans %} + +{{ base_url }}{% url 'hosting:create_virtual_machine' %} + +{% trans "Your Data Center Light Team" %} \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/includes/_footer.html b/datacenterlight/templates/datacenterlight/includes/_footer.html index 76c2c16e..edb7f8aa 100644 --- a/datacenterlight/templates/datacenterlight/includes/_footer.html +++ b/datacenterlight/templates/datacenterlight/includes/_footer.html @@ -1,38 +1,39 @@ - {% load staticfiles i18n%} +{% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} - + diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 5af1a6ca..48a2399f 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -218,6 +218,7 @@ CMS_TEMPLATES = ( ('page.html', gettext('Page')), # dcl ('datacenterlight/cms_page.html', gettext('Data Center Light')), + ('ungleich_page/glasfaser_cms_page.html', gettext('Glasfaser')), ) DATABASES = { @@ -347,8 +348,6 @@ MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') MEDIA_URL = APP_ROOT_ENDPOINT + 'media/' FILE_UPLOAD_PERMISSIONS = 0o644 -META_SITE_PROTOCOL = 'http' -META_USE_SITES = True MIGRATION_MODULES = { 'cms': 'cms.migrations', # 'filer': 'filer.migrations_django', @@ -359,9 +358,6 @@ MIGRATION_MODULES = { 'djangocms_link': 'djangocms_link.migrations_django', 'djangocms_teaser': 'djangocms_teaser.migrations_django', 'djangocms_column': 'djangocms_column.migrations_django', - 'djangocms_flash': 'djangocms_flash.migrations_django', - 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - 'djangocms_inherit': 'djangocms_inherit.migrations_django', 'djangocms_style': 'djangocms_style.migrations_django', 'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django', 'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django', @@ -495,11 +491,10 @@ AUTH_USER_MODEL = 'membership.CustomUser' STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services" # EMAIL MESSAGES -REGISTRATION_MESSAGE = {'subject': "Validation mail", - 'message': 'Thank You for registering for account on Digital Glarus.\n' - 'Please verify Your account under following link ' - 'http://{host}/en-us/digitalglarus/login/validate/{slug}', - } +REGISTRATION_MESSAGE = { + 'subject': "Digital Glarus registration", + 'message': 'Thank You for registering for account on Digital Glarus.' +} STRIPE_API_PRIVATE_KEY = env('STRIPE_API_PRIVATE_KEY') STRIPE_API_PUBLIC_KEY = env('STRIPE_API_PUBLIC_KEY') STRIPE_API_PRIVATE_KEY_TEST = env('STRIPE_API_PRIVATE_KEY_TEST') diff --git a/dynamicweb/settings/prod.py b/dynamicweb/settings/prod.py index e8cfc64c..6cc872d5 100644 --- a/dynamicweb/settings/prod.py +++ b/dynamicweb/settings/prod.py @@ -31,5 +31,5 @@ ALLOWED_HOSTS = [ ".ipv6onlyhosting.com", ".ipv6onlyhosting.net", ".digitalglarus.ch", - ".alplora.ch" + ".hack4glarus.ch" ] diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 20100308..fa24637a 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-10-10 21:35+0530\n" +"POT-Creation-Date: 2017-10-16 01:06+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -155,9 +155,6 @@ msgstr "Ich möchte einen existierenden SSH-Key nutzen" msgid "Upload" msgstr "Hochladen" -msgid "Your VM hosted in Switzerland" -msgstr "Deine VM in der Schweiz" - msgid "Set your new password" msgstr "Setze Dein neues Passwort" @@ -195,101 +192,78 @@ msgid "Support / Contact" msgstr "Support / Kontakt" #, python-format -msgid "" -"You have ordered a new virtual machine!\n" -"
\n" -"Your order of [%(vm_name)s] has been charged.

\n" -"You can view your invoice by clicking the button below.

\n" -msgstr "" -"Du hast eine neue virtuelle Maschine bestellt!
\n" -"Deine Bestellung von [%(vm_name)s] wurde erhoben.

\n" -"Um die Rechnung zu sehen, klicke auf den Button unten.

\n" +msgid "Your New VM %(vm_name)s" +msgstr "Deine Neue VM %(vm_name)s" -msgid "View Invoice" -msgstr "Zur Rechnung" +msgid "You have ordered a new virtual machine!" +msgstr "Du hast eine neue virtuelle Maschine bestellt!" #, python-format -msgid "" -"You have ordered a new virtual machine!\n" -"Your order of [%(vm_name)s] has been charged.\n" -"You can view your invoice here.\n" -msgstr "" -"Du hast eine neue virtuelle Maschine bestellt!\n" -"Deine Bestellung von [%(vm_name)s] wurde erhoben.\n" -"Um die Rechnung zu sehen, klicke hier.\n" +msgid "Your order of %(vm_name)s has been charged." +msgstr "Deine Bestellung von %(vm_name)s wurde erhoben." + +msgid "You can view your VM detail by clicking the button below." +msgstr "Um die Rechnung zu sehen, klicke auf den Button unten." + +msgid "View Detail" +msgstr "Details anzeigen" + +msgid "Your Data Center Light Team" +msgstr "Dein Data Center Light Team" + +#, python-format +msgid "Your order of %(vm_name)s has been charged." +msgstr "Deine Bestellung von %(vm_name)s wurde erhoben." + +msgid "You can view your VM detail by following the link below." +msgstr "Um die Rechnung zu sehen, klicke auf den Link unten." msgid "Password Reset" msgstr "Passwort zurücksetzen" -#, python-format -msgid "" -"\n" -"You're receiving this email because you requested a password reset for your " -"user account at %(site_name)s.
\n" -"Please go to the following page and choose a new password: %(base_url)s" -"%(password_reset_url)s
\n" -"If you didn't request a new password, ignore this e-mail.
\n" -"Thank you!\n" +msgid "We received a request to reset your password." +msgstr "Wir haben eine Anfrage erhalten, um Dein Passwort zurückzusetzen." + +msgid "If you didn't make this request you can safely ignore this email." msgstr "" -"\n" -"Du erhälst diese E-Mail da Du Dein Passwort für Deinen Account bei " -"%(site_name)s zurücksetzen möchtest.
\n" -"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s" -"%(password_reset_url)s Solltest Du kein neues Passwort angefordert haben, " -"dann ignoriere diese E-Mail.
\n" -"Dankeschön!\n" +"Falls Du kein neues Passwort angefragt hast, kannst Du diese E-mail " +"ignorieren." + +msgid "Otherwise, click here to reset your password." +msgstr "Andernfalls klicke hier, um Dein Passwort zurückzusetzen." + +msgid "Thank you!" +msgstr "Dankeschön!" + +msgid "Virtual Machine Cancellation" +msgstr "VM Kündigung" #, python-format msgid "" -"You're receiving this email because you requested a password reset for your " -"user account at %(site_name)s.\n" -"Please go to the following page and choose a new password: %(base_url)s" -"%(password_reset_url)s\n" -"If you didn't request a new password, ignore this e-mail.\n" -"Thank you!\n" +"You are receiving this email because your virutal machine " +"%(vm_name)s has been cancelled." msgstr "" -"Du erhälst diese E-Mail da Du Dein Passwort für Deinen Account bei " -"%(site_name)s zurücksetzen möchtest.\n" -"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s" -"%(password_reset_url)s Solltest Du kein neues Passwort angefordert haben, " -"dann ignoriere diese E-Mail.\n" -"Dankeschön!\n" +"Du erhälst diese E-Mail, da deine virtuelle Maschine %(vm_name)s gekündigt wurde." + +msgid "You can always order a new VM by clicking the button below." +msgstr "" +"Du kannst einfach eine neue VM bestellen, indem Du den Knopf weiter unten " +"drückst." + +msgid "CREATE VM" +msgstr "NEUE VM" #, python-format msgid "" -"You're receiving this mail because your virtual machine [%(vm_name)s] has " -"been cancelled.
\n" -"You can see your order status by clicking [my VM page] below.
\n" -"If you want to order a new virtual machine, you can do it by clicking this link.
\n" +"You are receiving this email because your virutal machine %(vm_name)s has " +"been cancelled." msgstr "" -"Du erhälst diese E-Mail, Da Deine virtuelle Maschine [%(vm_name)s] gekündigt " -"wurde.
\n" -"Um Deinen Auftragsstatus zu sehen, klicke auf die [my VM page] unten.
\n" -"Falls Du eine neue virtuelle Maschine bestellen möchtest, kannst Du dies " -"tun, indem Du diesen " -"Link klickst.
\n" +"Du erhälst diese E-Mail, da deine virtuelle Maschine %(vm_name)s gekündigt " +"wurde." -msgid "My VM page" -msgstr "Meine VM page" - -#, python-format -msgid "" -"You're receiving this mail because your virtual machine [%(vm_name)s] has " -"been cancelled.\n" -"You can see your order status by clicking here\n" -"%(base_url)s%(vm_order_url)s\n" -"If you want to order a new virtual machine, you can do it by clicking this " -"link.\n" -"%(base_url)s%(my_virtual_machines_url)s\n" +msgid "You can always order a new VM by following the link below." msgstr "" -"Du erhälst diese E-Mail, da Deine virtuelle Maschine [%(vm_name)s] gekündigt " -"wurde.\n" -"Um Deinen Auftragsstatus zu sehen, klicke hier.\n" -"%(base_url)s%(vm_order_url)s\n" -"Falls Du eine neue virtuelle Maschine bestellen möchtest, kannst Du dies " -"tun, indem Du diesen Link klickst.\n" -"%(base_url)s%(my_virtual_machines_url)s\n" msgid "Toggle navigation" msgstr "Umschalten" @@ -300,13 +274,16 @@ msgstr "Dashboard" msgid "Logout" msgstr "Abmelden" -msgid "Don't have an account yet ? " +msgid "Log in" +msgstr "Anmelden" + +msgid "Don't have an account yet ?" msgstr "Besitzt du kein Benutzerkonto?" msgid "Sign up" msgstr "Registrieren" -msgid "Forgot your password ? " +msgid "Forgot your password ?" msgstr "Passwort vergessen?" msgid "Resend activation link" @@ -478,7 +455,7 @@ msgstr "Deine Kreditkartennummer" msgid "Submit" msgstr "Absenden" -msgid "Reset your password" +msgid "Password reset" msgstr "Passwort zurücksetzen" msgid "UPDATE" @@ -630,12 +607,6 @@ msgstr "" "Um auf Deine VM zuzugreifen, füge Deinen SSH-" "Key hinzu" -msgid "CREATE VM" -msgstr "NEUE VM" - -msgid "View Detail" -msgstr "Details anzeigen" - msgid "login" msgstr "anmelden" @@ -660,6 +631,9 @@ msgstr "Dein Account wurde aktiviert." msgid "You can now" msgstr "Du kannst dich nun" +msgid "Welcome to Data Center Light!" +msgstr "Willkommen beim Data Center Light!" + msgid "Sorry. Your request is invalid." msgstr "Entschuldigung, deine Anfrage ist ungültig." @@ -730,14 +704,21 @@ msgstr "" msgid "Error terminating VM" msgstr "Fehler beenden VM" -msgid "Virtual Machine Cancellation" -msgstr "VM Kündigung" +#, python-format +msgid "Virtual Machine %(vm_name)s Cancelled" +msgstr "Virtuelle Maschine %(vm_name)s Kündigung" msgid "There was an error processing your request. Please try again." msgstr "" "Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte versuche es " "noch einmal." +#~ msgid "Reset your password" +#~ msgstr "Passwort zurücksetzen" + +#~ msgid "My VM page" +#~ msgstr "Meine VM page" + #~ msgid "Invoice Date" #~ msgstr "Rechnung Datum" @@ -765,12 +746,27 @@ msgstr "" #~ msgid "Start VM" #~ msgstr "VM jetzt starten" +#~ msgid "View Invoice" +#~ msgstr "Zur Rechnung" + +#~ msgid "" +#~ "You're receiving this mail because your virtual machine [%(vm_name)s] has " +#~ "been cancelled.
\n" +#~ "You can see your order status by clicking [my VM page] below.
\n" +#~ "If you want to order a new virtual machine, you can do it by clicking this link.
\n" +#~ msgstr "" +#~ "Du erhälst diese E-Mail, da deine virtuelle Maschine [%(vm_name)s] " +#~ "gekündigt wurde.
\n" +#~ "Um deinen Auftragsstatus zu sehen, klicke auf die [my VM page] unten.
\n" +#~ "Falls du eine neue virtuelle Maschine bestellen möchtest, kannst du dies " +#~ "tun, indem du diesen " +#~ "Link klickst.
\n" + #~ msgid "Finish Configuration" #~ msgstr "Konfiguration beenden" -#~ msgid "Your New VM %(vm_name)s at Data Center Light" -#~ msgstr "Deine neue VM %(vm_name)s bei Data Center Light" - #~ msgid "My Virtual Machines" #~ msgstr "Meine virtuellen Maschinen" @@ -828,9 +824,6 @@ msgstr "" #~ msgid "Keys" #~ msgstr "Keys" -#~ msgid "Log in" -#~ msgstr "Anmelden" - #~ msgid "You haven been logged out" #~ msgstr "Du wurdest abgemeldet" diff --git a/hosting/models.py b/hosting/models.py index 49932f69..04f3ae30 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -1,7 +1,9 @@ import os import logging +from dateutil.relativedelta import relativedelta from django.db import models +from django.utils import timezone from django.utils.functional import cached_property from Crypto.PublicKey import RSA from membership.models import StripeCustomer, CustomUser @@ -172,3 +174,9 @@ class VMDetail(models.Model): ipv6 = models.TextField(default='') created_at = models.DateTimeField(auto_now_add=True) terminated_at = models.DateTimeField(null=True) + + def end_date(self): + end_date = self.terminated_at if self.terminated_at else timezone.now() + months = relativedelta(end_date, self.created_at).months or 1 + end_date = self.created_at + relativedelta(months=months, days=-1) + return end_date diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 317caabc..74896a4b 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -18,7 +18,7 @@ } .content-dashboard{ - min-height: calc(100vh - 70px); + min-height: calc(100vh - 60px); width: 80%; margin: 0 auto; max-width: 1120px; @@ -66,7 +66,9 @@ width: 280px; } .content-dashboard { - width: 90%; + padding-left: 15px; + padding-right: 15px; + width: 100%; } } .btn:focus, .btn:active:focus { @@ -296,10 +298,6 @@ max-width: 360px; } -.btn-wide { - min-width: 100px; -} - .caps-link { font-weight: 600; color: #8da4c0; @@ -375,4 +373,12 @@ outline: none; color: #999; fill: #999; +} + +.locale_date { + opacity: 0; +} + +.locale_date.done{ + opacity: 1; } \ No newline at end of file diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index acc488ac..f989d479 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -17,9 +17,11 @@ h3, h4, h5, h6 { - /*font-family: 'Lato-Regular', sans-serif;*/ font-family: 'Lato', sans-serif; - /*font-weight: 300;*/ +} + +.allcaps { + text-transform: uppercase; } .topnav { @@ -31,6 +33,11 @@ h6 { .navbar-brand { padding: 10px 15px; } +@media (max-width: 767px) { + .navbar-brand { + padding: 10px 0; + } +} .navbar-default { background: #fff; @@ -46,7 +53,7 @@ h6 { .navbar-transparent { background: transparent; border: none; - padding: 20px; + padding: 20px 0; box-shadow: none; } @@ -72,7 +79,6 @@ h6 { .navbar-transparent #logoWhite{ display: block; width: 220px; - /* color: #fff; */ } .navbar-right .highlights-dropdown .dropdown-menu { @@ -92,16 +98,6 @@ h6 { border-color: #e7e7e7; box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); } -/* .navbar-right .highlights-dropdown .dropdown-menu:before { - content: ''; - display: block; - height: 1px; - background: #e7e7e7; - position: absolute; - top: -1px; - left: -1px; - right: -1px; - } */ } .navbar-right .highlights-dropdown .dropdown-menu > li > a{ font-size: 13px; @@ -274,16 +270,15 @@ h6 { /*------Auth section---------*/ .auth-container { - min-height: calc(100vh - 120px); + min-height: calc(100vh - 180px); position: relative; - /* flex-grow: 1; */ display: flex; flex-direction: column; justify-content: center; } .auth-bg { - background: url(../img/auth-bg-sm.jpg); + background: url(../img/pattern.jpg) no-repeat center center; position: fixed; left: 0; top: 0; @@ -293,7 +288,6 @@ h6 { background-position: center center; background-size: cover; background-attachment: fixed; - } .auth-bg::before { @@ -303,7 +297,7 @@ h6 { bottom: 0; left: 0; right: 0; - background: rgba(75, 75, 101, 0.55); + background: rgba(90, 116, 175, 0.7); z-index: 1; } @@ -313,69 +307,38 @@ h6 { .auth-container .auth-content { width: 100%; - margin: 0 auto; - max-width: 390px; + margin: 0 auto 15px; + max-width: 400px; + padding: 0 15px; } -.auth-container .auth-center { - /* position: absolute; */ - /* left: 50%; */ - /* top: 50%; */ - /* transform: translate(-50%, -50%); */ - /* width: 100%; */ -} - -.auth-container .auth-title { - margin-bottom: 50px; -} - -.auth-container .auth-title h2 { - color: #fff; - font-size: 44px; - text-align: center; - width: 425px; - margin: 0 auto; - margin-bottom: 30px; - position: relative; -} - -.auth-container .auth-title h2::after { - content: ""; - position: absolute; - bottom: -20px; - background: #fff; - height: 7px; - width: 70px; - left: 50%; - transform: translate(-50%, 0); +.auth-container .auth-content.wide { + max-width: 480px; } .auth-box { + position: relative; background: #fff; - padding: 0; - padding-bottom: 30px; + padding: 40px 20px 20px; box-sizing: border-box; - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - border-radius: 4px; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.09), 0 5px 5px rgba(0, 0, 0, 0.23); z-index: 10; } .auth-box .section-heading { color: #5a5a5a; - padding-top: 30px; - padding-bottom: 5px; + font-weight: 300; text-align: center; - text-transform: uppercase; - letter-spacing: 3px; - font-size: 20px; + letter-spacing: 1px; + font-size: 36px; border-radius: 3px 3px 0px 0px; - margin: 0 auto; + margin: 0 auto 10px; } .auth-box .form { padding: 20px; - width: 80%; margin: 0 auto; + max-width: 360px; } .auth-box .form .red { @@ -383,27 +346,56 @@ h6 { } .auth-box .form .btn { - box-shadow: 0 0px 9px rgba(0, 0, 0, 0.19), 0 3px 5px rgba(0, 0, 0, 0.23); - letter-spacing: 3px; - font-size: 17px; + letter-spacing: 2px; + font-size: 16px; + padding: 6px 12px; + min-width: 140px; + margin-top: 15px; text-transform: uppercase; } .auth-box .form .form-control { - height: 44px; - font-size: 16px; + height: 48px; + font-size: 14px; + padding: 10px 17px; + line-height: 30px; + border-color: #aaa; +} + +.auth-box .form .form-control:focus, +.auth-box .form .form-control:active { + box-shadow: none; + border-radius: 0; +} + +.auth-box .form-control::-webkit-input-placeholder { + color: #aaa; +} + +.auth-box .form-control:-moz-placeholder{ + /* Firefox 18- */ + color: #aaa; +} + +.auth-box .form-control::-moz-placeholder{ + /* Firefox 19+ */ + color: #aaa; +} + +.auth-box .form-control:-ms-input-placeholder { + color: #aaa; } .auth-box .auth-footer { text-align: center; - padding: 10px; + padding: 5px; } -.auth-box .auth-footer .text { +.auth-box .auth-footer { color: #777; } -.auth-box .auth-footer .links a { +.auth-box .auth-footer a { color: #1e94cc; } @@ -411,20 +403,11 @@ h6 { color: #1e94cc; } -.auth-box.sign-up { - padding-bottom: 5px; -} - -.auth-box.sign-up .form { - padding: 15px 20px 0 20px; -} - .sign-up-message { padding: 25px 30px 25px 30px; text-align: center; font-size: 18px; line-height: 30px; - /*font-family: 'Lato' !important;*/ font-weight: 300 !important; } @@ -458,16 +441,7 @@ h6 { } .auth-box .form { - padding: 15px 0px 0 0; - } - - .auth-box.sign-up .form { - padding: 15px 0px 0 0; - } - - .auth-box .form .form-control { - height: 44px; - font-size: 13px; + padding: 15px 0 15px 0; } .auth-container .auth-title { @@ -476,7 +450,7 @@ h6 { } .auth-box .msg-list { - padding: 15px 25px 5px; + padding: 20px 25px 0; text-align: center; } @@ -493,19 +467,14 @@ h6 { margin-bottom: 50px; } - .auth-box .form { - width: 90%; - } - .auth-box .section-heading { - font-size: 15px; + font-size: 32px; } } footer { - padding: 20px; + padding: 20px 0; background-color: #f8f8f8; -/* position: absolute */ right: 0; bottom: 0; left: 0; @@ -537,7 +506,6 @@ a.unlink:hover { /***** DCL payment page **********/ .dcl-order-container { - /*font-family: Lato;*/ font-weight: 300; } @@ -580,9 +548,7 @@ a.unlink:hover { } .dcl-place-order-text{ - /* font-size: 13px; */ color: #808080; - /* margin-bottom: 15px; */ } .dcl-order-table-total .tbl-total { @@ -610,7 +576,6 @@ a.unlink:hover { } .card-warning-content { - /*font-family: Lato;*/ font-weight: 300; border: 1px solid #a1a1a1; border-radius: 3px; @@ -638,18 +603,6 @@ a.unlink:hover { right: 0; } -.brand { -} - -.brand #brand-icon { -} - -.card-number-element { -} - -.card-expiry-element { -} - .card-cvc-element label { padding-left: 10px; } @@ -735,9 +688,6 @@ a.unlink:hover { margin-bottom: 30px; } - .brand { - } - .card-expiry-element { padding-right: 10px; } @@ -802,10 +752,23 @@ a.unlink:hover { } } - -.footer-light a:hover, .footer-light a:focus, .footer-light a:active { +.footer-light { + position: relative; +} +.footer-light footer { + background: transparent; + color: #eee; +} +.footer-light a, +.footer-light .text-muted { color: #ddd; } +.footer-light a:hover, .footer-light a:focus, .footer-light a:active { + color: #fff; +} +.footer-vm p.copyright { + margin-top: 4px; +} .visible-mobile { display: none !important; diff --git a/hosting/static/hosting/img/pattern.jpg b/hosting/static/hosting/img/pattern.jpg new file mode 100644 index 00000000..7c66e007 Binary files /dev/null and b/hosting/static/hosting/img/pattern.jpg differ diff --git a/hosting/static/hosting/img/pattern_original.jpg b/hosting/static/hosting/img/pattern_original.jpg new file mode 100644 index 00000000..8ae4c0f2 Binary files /dev/null and b/hosting/static/hosting/img/pattern_original.jpg differ diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index ee4a82eb..613d67a9 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -54,19 +54,18 @@ {% include "hosting/includes/_navbar_user.html" %} {% endblock navbar %} - -
+
{% block content %} {% endblock %}
{% if request.user.is_authenticated %} -
-
- -
-
+
+
+ +
+
{% else %}