merge master

This commit is contained in:
Arvind Tiwari 2018-03-29 01:04:26 +05:30
commit 368fe0d08f
19 changed files with 200 additions and 101 deletions

View file

@ -1,3 +1,5 @@
next
* bgfix: fix header slider interval issue
1.6: 2018-03-25 1.6: 2018-03-25
* #4266: [dcl cms] add promotional section plugin * #4266: [dcl cms] add promotional section plugin
* #3842: [dcl, hosting] change number formatting for all the numbers from german to english locale * #3842: [dcl, hosting] change number formatting for all the numbers from german to english locale

10
datacenterlight/admin.py Normal file
View file

@ -0,0 +1,10 @@
from django.contrib import admin
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from .cms_models import CMSIntegration
class CMSIntegrationAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
pass
admin.site.register(CMSIntegration, CMSIntegrationAdmin)

View file

@ -3,6 +3,27 @@ from django.db import models
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from djangocms_text_ckeditor.fields import HTMLField from djangocms_text_ckeditor.fields import HTMLField
from filer.fields.image import FilerImageField from filer.fields.image import FilerImageField
from cms.models.fields import PlaceholderField
class CMSIntegration(models.Model):
name = models.CharField(
max_length=100, unique=True, default='default',
help_text=(
'A unique name for the Integration. This name will be used to '
'fetch the Integration into pages'
)
)
footer_placeholder = PlaceholderField(
'datacenterlight_footer', related_name='dcl-footer-placeholder+'
)
navbar_placeholder = PlaceholderField(
'datacenterlight_navbar', related_name='dcl-navbar-placeholder+'
)
def __str__(self):
return self.name
# Models for CMS Plugins # Models for CMS Plugins

View file

@ -0,0 +1,13 @@
from django.core.management.base import BaseCommand
from datacenterlight.cms_models import CMSIntegration
class Command(BaseCommand):
help = '''Creates cms integration objects for datacenterlight'''
def handle(self, *args, **options):
obj, created = CMSIntegration.objects.get_or_create(name='default')
if created:
print('created the default CMSIntegration object')
else:
print('default CMSIntegration object already exists')

View file

@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-03-27 15:31
from __future__ import unicode_literals
import cms.models.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('datacenterlight', '0015_auto_20180323_0011'),
('cms', '0014_auto_20160404_1908'),
]
operations = [
migrations.CreateModel(
name='CMSIntegration',
fields=[
('id', models.AutoField(auto_created=True,
primary_key=True, serialize=False, verbose_name='ID')),
('navbar_placeholder', cms.models.fields.PlaceholderField(editable=False, null=True,
on_delete=django.db.models.deletion.CASCADE, slotname='datacenterlight_navbar', to='cms.Placeholder')),
('footer_placeholder', cms.models.fields.PlaceholderField(editable=False, null=True,
on_delete=django.db.models.deletion.CASCADE, slotname='datacenterlight_footer', to='cms.Placeholder')),
('name', models.CharField(default='default',
help_text='A unique name for the Integration. This name will be used to fetch the Integration into pages', max_length=100, unique=True)),
],
),
]

View file

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-03-28 19:26
from __future__ import unicode_literals
import cms.models.fields
from django.db import migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('datacenterlight', '0016_cmsintegration'),
]
operations = [
migrations.AlterField(
model_name='cmsintegration',
name='footer_placeholder',
field=cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dcl-footer-placeholder+', slotname='datacenterlight_footer', to='cms.Placeholder'),
),
migrations.AlterField(
model_name='cmsintegration',
name='navbar_placeholder',
field=cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dcl-navbar-placeholder+', slotname='datacenterlight_navbar', to='cms.Placeholder'),
),
]

View file

@ -1,7 +1,7 @@
body, body,
html { html {
width: 100%; width: 100%;
min-height: 100%; height: 100%;
} }
body, body,
@ -84,8 +84,24 @@ a.list-group-item-danger.active:focus {
} }
} }
.navbar .dcl-link {
display: block;
padding: 15px;
color: #777;
}
.navbar .dcl-link:focus,
.navbar .dcl-link:active,
.navbar .dcl-link:hover {
text-decoration: none;
}
.navbar .dropdown-menu .dcl-link {
padding: 1px 10px;
}
p.copyright { p.copyright {
margin: 15px 0 0; margin: 15px 0;
} }
footer { footer {
@ -96,3 +112,22 @@ footer {
footer a { footer a {
color: #777; color: #777;
} }
footer .dcl-link-separator {
position: relative;
padding-left: 10px;
}
footer .dcl-link-separator::before {
content: "";
position: absolute;
display: inline-block;
top: 9px;
bottom: 0;
left: -2px;
right: 0;
width: 2px;
height: 2px;
border-radius: 100%;
background: #777;
}

View file

@ -15,8 +15,8 @@
} }
@media(min-width: 768px) { @media(min-width: 768px) {
.navbar-default .navbar-nav>li>a, .navbar-default .navbar-nav>li a,
.navbar-right .highlights-dropdown .dropdown-menu>li>a { .navbar-right .highlights-dropdown .dropdown-menu>li a {
font-weight: 300; font-weight: 300;
} }
.navbar-right .highlights-dropdown .dropdown-menu { .navbar-right .highlights-dropdown .dropdown-menu {
@ -26,7 +26,7 @@
} }
} }
.navbar-right .highlights-dropdown .dropdown-menu>li>a { .navbar-right .highlights-dropdown .dropdown-menu>li a {
font-size: 13px; font-size: 13px;
font-family: 'Lato', sans-serif; font-family: 'Lato', sans-serif;
padding: 1px 10px 1px 18px !important; padding: 1px 10px 1px 18px !important;
@ -34,9 +34,9 @@
color: #333; color: #333;
} }
.navbar-right .highlights-dropdown .dropdown-menu>li>a:hover, .navbar-right .highlights-dropdown .dropdown-menu>li a:hover,
.navbar-right .highlights-dropdown .dropdown-menu>li>a:focus, .navbar-right .highlights-dropdown .dropdown-menu>li a:focus,
.navbar-right .highlights-dropdown .dropdown-menu>li>a:active { .navbar-right .highlights-dropdown .dropdown-menu>li a:active {
background: transparent; background: transparent;
text-decoration: underline !important; text-decoration: underline !important;
} }
@ -144,9 +144,9 @@
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu>.active>a, .navbar-default .navbar-nav .open .dropdown-menu>.active a,
.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus, .navbar-default .navbar-nav .open .dropdown-menu>.active a:focus,
.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover { .navbar-default .navbar-nav .open .dropdown-menu>.active a:hover {
background-color: transparent; background-color: transparent;
} }
} }
@ -163,7 +163,7 @@
} }
.content-dashboard { .content-dashboard {
min-height: calc(100vh - 60px); min-height: calc(100vh - 86px);
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
max-width: 1120px; max-width: 1120px;

View file

@ -99,15 +99,13 @@ textarea {
} }
} }
.navbar-transparent .navbar-nav>li a,
.navbar-transparent .navbar-nav>.open>a, .navbar-transparent .navbar-nav>.open>a,
.navbar-transparent .navbar-nav>.open>a:focus, .navbar-transparent .navbar-nav>.open>a:focus,
.navbar-transparent .navbar-nav>.open>a:hover { .navbar-transparent .navbar-nav>.open>a:hover {
color: #fff; color: #fff;
} }
.navbar-transparent .navbar-nav>li a {
color: #fff;
}
.navbar-transparent .navbar-nav>li a:focus, .navbar-transparent .navbar-nav>li a:focus,
.navbar-transparent .navbar-nav>li a:active, .navbar-transparent .navbar-nav>li a:active,
@ -123,22 +121,6 @@ textarea {
background: transparent; background: transparent;
} }
.navbar .dcl-link {
display: block;
padding: 15px;
color: #777;
}
.navbar .dcl-link:focus,
.navbar .dcl-link:active,
.navbar .dcl-link:hover {
text-decoration: none;
}
.navbar .dropdown-menu .dcl-link {
padding: 1px 10px;
}
.navbar-transparent .navbar-nav>li>.on-hover-border { .navbar-transparent .navbar-nav>li>.on-hover-border {
transition: all 0.3s linear; transition: all 0.3s linear;
box-shadow: none; box-shadow: none;
@ -1233,24 +1215,6 @@ footer {
transform: rotate(45deg); transform: rotate(45deg);
} }
footer .dcl-link-separator {
position: relative;
padding-left: 10px;
}
footer .dcl-link-separator::before {
content: "";
position: absolute;
display: inline-block;
top: 9px;
bottom: 0;
left: -2px;
right: 0;
width: 2px;
height: 2px;
border-radius: 100%;
background: #777;
}
/* new styles for whydcl section cms plugin (to replace older style) */ /* new styles for whydcl section cms plugin (to replace older style) */

View file

@ -1,4 +1,4 @@
{% load staticfiles i18n %} {% load staticfiles i18n cms_tags sekizai_tags %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html> <!DOCTYPE html>
@ -23,9 +23,15 @@
<!-- Custom CSS --> <!-- Custom CSS -->
<link href="{% static 'datacenterlight/css/common.css' %}" rel="stylesheet"> <link href="{% static 'datacenterlight/css/common.css' %}" rel="stylesheet">
<link href="{% static 'datacenterlight/css/hosting.css' %}" rel="stylesheet"> <link href="{% static 'datacenterlight/css/hosting.css' %}" rel="stylesheet">
{% if request.toolbar.edit_mode %}
<link href="{% static 'datacenterlight/css/cms.css' %}" rel="stylesheet">
{% endif %}
{% block css_extra %} {% block css_extra %}
{% endblock css_extra %} {% endblock css_extra %}
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}
<!-- External Fonts --> <!-- External Fonts -->
<link rel="shortcut icon" href="{% static 'datacenterlight/img/favicon.ico' %}" type="image/x-icon"> <link rel="shortcut icon" href="{% static 'datacenterlight/img/favicon.ico' %}" type="image/x-icon">
@ -43,28 +49,17 @@
</head> </head>
<body> <body>
{% cms_toolbar %}
{% block navbar %} {% render_placeholder cms_integration.navbar_placeholder %}
{% include "hosting/includes/_navbar_user.html" %}
{% endblock navbar %}
<div class="{% if request.user.is_authenticated %}content-dashboard{% endif %}"> <div class="{% if request.user.is_authenticated %}content-dashboard{% endif %}">
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div> </div>
<!-- Footer --> {% render_placeholder cms_integration.footer_placeholder %}
{% if request.user.is_authenticated %}
<footer class="footer-vm">
<div class="container">
<p class="copyright text-muted small">Copyright &copy; ungleich glarus ag {% now "Y" %}. {% trans "All Rights Reserved" %}</p>
</div>
</footer>
{% else %}
<div class="footer-vm">
{% include "datacenterlight/includes/_footer.html" %}
</div>
{% endif %}
<!-- Moment --> <!-- Moment -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>

View file

@ -1,5 +1,5 @@
{% extends "datacenterlight/base_hosting.html" %} {% extends "datacenterlight/base_hosting.html" %}
{% load staticfiles bootstrap3 i18n %} {% load staticfiles bootstrap3 i18n cms_tags humanize %}
{% block css_extra %} {% block css_extra %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
@ -78,7 +78,7 @@
<hr> <hr>
<p>{% trans "Configuration"%} <strong class="pull-right">{{request.session.template.name}}</strong></p> <p>{% trans "Configuration"%} <strong class="pull-right">{{request.session.template.name}}</strong></p>
<hr> <hr>
<p class="last-p"><strong>{%trans "Total" %}</strong>&nbsp;&nbsp;<small>({%trans "including VAT" %})</small> <strong class="pull-right">{{request.session.specs.price}} CHF/{% trans "Month" %}</strong></p> <p class="last-p"><strong>{%trans "Total" %}</strong>&nbsp;&nbsp;<small>({%trans "including VAT" %})</small> <strong class="pull-right">{{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}</strong></p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
{% extends "datacenterlight/base_hosting.html" %} {% extends "datacenterlight/base_hosting.html" %}
{% load staticfiles bootstrap3 i18n custom_tags %} {% load staticfiles bootstrap3 i18n custom_tags humanize %}
{% block content %} {% block content %}
<div id="order-detail{{order.pk}}" class="order-detail-container"> <div id="order-detail{{order.pk}}" class="order-detail-container">
@ -59,15 +59,15 @@
</p> </p>
<p> <p>
<span>{% trans "Memory" %}: </span> <span>{% trans "Memory" %}: </span>
<span class="pull-right">{{vm.memory}} GB</span> <span class="pull-right">{{vm.memory|intcomma}} GB</span>
</p> </p>
<p> <p>
<span>{% trans "Disk space" %}: </span> <span>{% trans "Disk space" %}: </span>
<span class="pull-right">{{vm.disk_size}} GB</span> <span class="pull-right">{{vm.disk_size|intcomma}} GB</span>
</p> </p>
<p> <p>
<span>{% trans "Total" %}</span> <span>{% trans "Total" %}</span>
<span class="pull-right">{{vm.price}} CHF</span> <span class="pull-right">{{vm.price|intcomma}} CHF</span>
</p> </p>
</div> </div>
</div> </div>

View file

@ -18,14 +18,13 @@ from hosting.forms import HostingUserLoginForm
from hosting.models import HostingOrder from hosting.models import HostingOrder
from membership.models import CustomUser, StripeCustomer from membership.models import CustomUser, StripeCustomer
from opennebula_api.serializers import VMTemplateSerializer from opennebula_api.serializers import VMTemplateSerializer
from utils.forms import ( from utils.forms import BillingAddressForm, BillingAddressFormSignup
BillingAddressForm, BillingAddressFormSignup
)
from utils.hosting_utils import get_vm_price from utils.hosting_utils import get_vm_price
from utils.stripe_utils import StripeUtils from utils.stripe_utils import StripeUtils
from utils.tasks import send_plain_email_task from utils.tasks import send_plain_email_task
from .forms import ContactForm from .forms import ContactForm
from .models import VMTemplate from .models import VMTemplate
from .cms_models import CMSIntegration
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -42,9 +41,10 @@ class ContactUsView(FormView):
return self.render_to_response( return self.render_to_response(
self.get_context_data(contact_form=form)) self.get_context_data(contact_form=form))
else: else:
return render(self.request, return render(
'datacenterlight/index.html', self.request, 'datacenterlight/index.html',
self.get_context_data(contact_form=form)) self.get_context_data(contact_form=form)
)
def form_valid(self, form): def form_valid(self, form):
form.save() form.save()
@ -68,10 +68,10 @@ class ContactUsView(FormView):
return self.render_to_response( return self.render_to_response(
self.get_context_data(success=True, contact_form=form)) self.get_context_data(success=True, contact_form=form))
else: else:
return render(self.request, return render(
'datacenterlight/index.html', self.request, 'datacenterlight/index.html',
self.get_context_data(success=True, self.get_context_data(success=True, contact_form=form)
contact_form=form)) )
class IndexView(CreateView): class IndexView(CreateView):
@ -219,7 +219,8 @@ class PaymentOrderView(FormView):
'stripe_key': settings.STRIPE_API_PUBLIC_KEY, 'stripe_key': settings.STRIPE_API_PUBLIC_KEY,
'site_url': reverse('datacenterlight:index'), 'site_url': reverse('datacenterlight:index'),
'login_form': HostingUserLoginForm(prefix='login_form'), 'login_form': HostingUserLoginForm(prefix='login_form'),
'billing_address_form': billing_address_form 'billing_address_form': billing_address_form,
'cms_integration': CMSIntegration.objects.get(name='default')
}) })
return context return context
@ -354,7 +355,10 @@ class OrderConfirmationView(DetailView):
'cc_brand': card_details.get('response_object').get('brand'), 'cc_brand': card_details.get('response_object').get('brand'),
'vm': request.session.get('specs'), 'vm': request.session.get('specs'),
'page_header_text': _('Confirm Order'), 'page_header_text': _('Confirm Order'),
'billing_address_data': request.session.get('billing_address_data') 'billing_address_data': (
request.session.get('billing_address_data')
),
'cms_integration': CMSIntegration.objects.get(name='default')
} }
return render(request, self.template_name, context) return render(request, self.template_name, context)

View file

@ -82,6 +82,7 @@ INSTALLED_APPS = (
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
@ -255,8 +256,6 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
USE_THOUSAND_SEPARATOR = True
FORMAT_MODULE_PATH = [ FORMAT_MODULE_PATH = [
'dynamicweb.formats' 'dynamicweb.formats'
] ]

View file

@ -1,7 +1,6 @@
{% extends "hosting/base_short.html" %} {% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %} {% load staticfiles bootstrap3 humanize i18n custom_tags %}
{% load i18n %}
{% load custom_tags %}
{% block content %} {% block content %}
<div id="order-detail{{order.pk}}" class="order-detail-container"> <div id="order-detail{{order.pk}}" class="order-detail-container">
@ -130,7 +129,7 @@
</p> </p>
<p> <p>
<span>{% trans "Total" %}</span> <span>{% trans "Total" %}</span>
<span class="pull-right">{{vm.price}} CHF</span> <span class="pull-right">{{vm.price|intcomma}} CHF</span>
</p> </p>
</div> </div>
</div> </div>
@ -143,7 +142,7 @@
{% csrf_token %} {% csrf_token %}
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-sm-8">
<div class="dcl-place-order-text">{% 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 %}.</div> <div class="dcl-place-order-text">{% 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|intcomma }}CHF/month{% endblocktrans %}.</div>
</div> </div>
<div class="col-sm-4 order-confirm-btn text-right"> <div class="col-sm-4 order-confirm-btn text-right">
<button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal"> <button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal">

View file

@ -1,6 +1,5 @@
{% extends "hosting/base_short.html" %} {% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %} {% load staticfiles bootstrap3 humanize i18n %}
{% load i18n l10n %}
{% block content %} {% block content %}
<div class="dashboard-container"> <div class="dashboard-container">
@ -30,7 +29,7 @@
<tr> <tr>
<td class="xs-td-inline" data-header="{% trans 'Order Nr.' %}">{{ order.id }}</td> <td class="xs-td-inline" data-header="{% trans 'Order Nr.' %}">{{ order.id }}</td>
<td class="xs-td-bighalf" data-header="{% trans 'Date' %}">{{ order.created_at | date:"M d, Y H:i" }}</td> <td class="xs-td-bighalf" data-header="{% trans 'Date' %}">{{ order.created_at | date:"M d, Y H:i" }}</td>
<td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price }}</td> <td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price|intcomma }}</td>
<td class="text-right last-td"> <td class="text-right last-td">
<a class="btn btn-order-detail" href="{% url 'hosting:orders' order.pk %}">{% trans 'See Invoice' %}</a> <a class="btn btn-order-detail" href="{% url 'hosting:orders' order.pk %}">{% trans 'See Invoice' %}</a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %} {% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %} {% load staticfiles bootstrap3 i18n humanize %}
{% block css_extra %} {% block css_extra %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
@ -34,7 +34,7 @@
{{request.session.specs.memory|floatformat}} GB {{request.session.specs.memory|floatformat}} GB
</div> </div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-content"> <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-content">
{{request.session.specs.disk_size|floatformat}} GB {{request.session.specs.disk_size|floatformat|intcomma}} GB
</div> </div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
{{request.session.template.name}} {{request.session.template.name}}
@ -46,7 +46,7 @@
</div> </div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding"> <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding">
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"></div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"></div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 tbl-total">{{request.session.specs.price}} <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 tbl-total">{{request.session.specs.price|intcomma}}
CHF<span class="dcl-price-month">/{% trans "Month" %}</span> CHF<span class="dcl-price-month">/{% trans "Month" %}</span>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %} {% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %} {% load staticfiles bootstrap3 humanize %}
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
@ -37,7 +37,7 @@
<div class="vm-detail-config"> <div class="vm-detail-config">
<p><span>{% trans "Cores" %}:</span><span class="value">{{virtual_machine.cores}}</span></p> <p><span>{% trans "Cores" %}:</span><span class="value">{{virtual_machine.cores}}</span></p>
<p><span>{% trans "Memory" %}:</span><span class="value">{{virtual_machine.memory}} GB</span></p> <p><span>{% trans "Memory" %}:</span><span class="value">{{virtual_machine.memory}} GB</span></p>
<p><span>{% trans "Disk" %}:</span><span class="value">{{virtual_machine.disk_size|floatformat:2}} GB</span></p> <p><span>{% trans "Disk" %}:</span><span class="value">{{virtual_machine.disk_size|floatformat:2|intcomma}} GB</span></p>
<p><span>{% trans "Configuration" %}:</span><span class="value">{{virtual_machine.configuration}}</span></p> <p><span>{% trans "Configuration" %}:</span><span class="value">{{virtual_machine.configuration}}</span></p>
</div> </div>
</div> </div>
@ -45,7 +45,7 @@
<h2 class="vm-detail-title">{% trans "Billing" %} <img src="{% static 'hosting/img/billing.svg' %}" class="un-icon"></h2> <h2 class="vm-detail-title">{% trans "Billing" %} <img src="{% static 'hosting/img/billing.svg' %}" class="un-icon"></h2>
<div class="vm-vmid"> <div class="vm-vmid">
<div class="vm-item-subtitle">{% trans "Current Pricing" %}</div> <div class="vm-item-subtitle">{% trans "Current Pricing" %}</div>
<div class="vm-item-lg">{{virtual_machine.price|floatformat}} CHF/{% trans "Month" %}</div> <div class="vm-item-lg">{{virtual_machine.price|floatformat|intcomma}} CHF/{% trans "Month" %}</div>
<a class="btn btn-vm-invoice" href="{% url 'hosting:orders' order.pk %}">{% trans "See Invoice" %}</a> <a class="btn btn-vm-invoice" href="{% url 'hosting:orders' order.pk %}">{% trans "See Invoice" %}</a>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %} {% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n l10n %} {% load staticfiles bootstrap3 i18n %}
{% block content %} {% block content %}
<div class="dashboard-container"> <div class="dashboard-container">
<div class="dashboard-container-head"> <div class="dashboard-container-head">
@ -40,7 +40,7 @@
<tbody> <tbody>
{% for vm in vms %} {% for vm in vms %}
<tr> <tr>
<td data-header="ID">{{vm.vm_id|unlocalize}}</td> <td data-header="ID">{{vm.vm_id}}</td>
<td data-header="IPv4">{% if vm.ipv4 %}{{vm.ipv4}}{% endif %}</td> <td data-header="IPv4">{% if vm.ipv4 %}{{vm.ipv4}}{% endif %}</td>
<td data-header="IPv6">{% if vm.ipv6 %}{{vm.ipv6}}{% endif %}</td> <td data-header="IPv6">{% if vm.ipv6 %}{{vm.ipv6}}{% endif %}</td>
<td data-header="{% trans 'Status' %}"> <td data-header="{% trans 'Status' %}">