diff --git a/hosting/models.py b/hosting/models.py index edee580d..ea650ebb 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -90,6 +90,15 @@ class VirtualMachinePlan(models.Model): def hosting_company_name(self): return self.vm_type.get_hosting_company_display() + @cached_property + def name(self): + name = 'vm-%s' % self.id + return name + + @cached_property + def orders(self): + return [self.hostingorder] + @classmethod def create(cls, data, user): instance = cls.objects.create(**data) diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index e77ddfa2..f386cfd6 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -13,3 +13,8 @@ display: block; color: transparent; } + +.inline-headers h3, .inline-headers h4 { + display: inline-block; + vertical-align: baseline; +} diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css new file mode 100644 index 00000000..570d5118 --- /dev/null +++ b/hosting/static/hosting/css/virtual-machine.css @@ -0,0 +1,42 @@ +.virtual-machine-container .tabs-left, .virtual-machine-container .tabs-right { + border-bottom: none; + padding-top: 2px; +} +.virtual-machine-container .tabs-left { + border-right: 1px solid #ddd; +} +.virtual-machine-container .tabs-right { + border-left: 1px solid #ddd; +} +.virtual-machine-container .tabs-left>li, .virtual-machine-container .tabs-right>li { + float: none; + margin-bottom: 2px; +} +.virtual-machine-container .tabs-left>li { + margin-right: -1px; +} +.virtual-machine-container .tabs-right>li { + margin-left: -1px; +} +.virtual-machine-container .tabs-left>li.active>a, +.virtual-machine-container .tabs-left>li.active>a:hover, +.virtual-machine-container .tabs-left>li.active>a:focus { + border-bottom-color: #ddd; + border-right-color: transparent; +} + +.virtual-machine-container .tabs-right>li.active>a, +.virtual-machine-container .tabs-right>li.active>a:hover, +.virtual-machine-container .tabs-right>li.active>a:focus { + border-bottom: 1px solid #ddd; + border-left-color: transparent; +} +.virtual-machine-container .tabs-left>li>a { + border-radius: 4px 0 0 4px; + margin-right: 0; + display:block; +} +.virtual-machine-container .tabs-right>li>a { + border-radius: 0 4px 4px 0; + margin-right: 0; +} \ No newline at end of file diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 266ee484..339020de 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -18,9 +18,10 @@ - + + diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index 819dec4d..99c6464f 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -2,22 +2,6 @@ {% load staticfiles bootstrap3 %} {% block content %} - -
# | +Date | +Amount | +Status | ++ |
---|---|---|---|---|
{{order.id}} | +{{order.created_at}} | +{{order.VMPlan.price}} CHF | +{% if order.approved %} + Approved + {% else%} + Declined + {% endif%} + | ++ + | +