Created generic view for vm pricing widget, Added VM configuration info on VM detail view, Fixed template bugs. Fixed Blog urls bugs

This commit is contained in:
Levi 2016-06-30 01:23:14 -05:00
commit e90c5fece0
7 changed files with 99 additions and 14 deletions

View file

@ -0,0 +1,44 @@
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet" />
<title>Hosting</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'hosting/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="{% static 'hosting/css/landing-page.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href="{% static 'hosting/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="{% static 'hosting/img/favicon.ico' %}" type="image/x-icon" />
</head>
<body>
{% include "hosting/includes/_pricing.html" with select_configuration=True%}
<!-- Pricing data -->
{% if vm_types %}
<script type="text/javascript">
(function () {window.VMTypesData = "{{vm_types|safe}}";})();
</script>
{%endif%}
<!-- Lodash -->
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.11.1/lodash.min.js"></script>
<!-- jQuery -->
<script src="{% static 'hosting/js/jquery.js' %}"></script>
<!-- Pricing -->
<script src="{% static 'hosting/js/pricing.js' %}"></script>
</body>
</html>

View file

@ -24,8 +24,7 @@
{% csrf_token %}
<input type="hidden" name="hosting_company" value="{{vm.hosting_company}}">
<input type="hidden" name="location_code" value="{{vm.location_code}}">
<input type="hidden" name="configuration_detail" value="{{configuration_detail}}">
<input type="hidden" name="configuration" value="{{hosting}}">
<ul class="pricing {% cycle 'p-red' 'p-black' 'p-red' 'p-yel' %}">
@ -46,13 +45,24 @@
</div>
</li>
<li>
<!-- Single button -->
<div class="btn-group">
<div class="form-group">
<label for="cores">Configuration: </label>
{{configuration_detail}}
<label for="configuration">Configuration: </label>
{% if select_configuration %}
<select class="form-control" name="configuration" id="{{vm.hosting_company}}-configuration" data-vm-type="{{vm.hosting_company}}">
{% for key,value in configuration_options.items %}
<option value="{{key}}">{{ value }}</option>
{% endfor %}
</select>
{% else %}
<input type="hidden" name="configuration_detail" value="{{configuration_detail}}">
<input type="hidden" name="configuration" value="{{hosting}}">
<!-- Single button -->
<div class="btn-group">
<div class="form-group">
<label>Configuration: </label>
{{configuration_detail}}
</div>
</div>
</div>
{% endif %}
</li>
<li>
<!-- Single button -->

View file

@ -89,6 +89,11 @@
</div><!--/row-->
</div><!--/col-12-->
</div><!--/row-->
<div class="row">
<div class="col-md-12">
Configuration: {{virtual_machine.get_configuration_display}}
</div>
</div>
</div>