rearranging text

This commit is contained in:
Arvind Tiwari 2017-09-21 02:50:07 +05:30
parent dd77f40707
commit 6dfbf67d7d
2 changed files with 79 additions and 70 deletions

View file

@ -23,81 +23,88 @@
<button class="btn-plain"><img src="{% static 'hosting/img/icon-print.svg' %}" class="svg-img"></button> <button class="btn-plain"><img src="{% static 'hosting/img/icon-print.svg' %}" class="svg-img"></button>
</div> </div>
</div> </div>
<div class="invoice-title"> <div class="order-details">
<h3> {% if order %}
{% trans "Order #"%} {{order.id}} <div>
</h3> <strong>{% trans "Order #"%} {{order.id}}</strong>
</div> </div>
<div class="row"> {% endif %}
<div class="col-xs-12 col-md-6 pull-right order-confirm-date"> <div>
<address> <strong>{% trans "Invoice Date"%}:</strong>
<strong>{% trans "Date"%}:</strong><br> <span id="order-created_at">
<span id="order-created_at">
{% if order %}
{{order.created_at|date:'Y-m-d H:i'}}
{% else %}
{% now "Y-m-d H:i" %}
{% endif %}
</span><br><br>
{% if order %} {% if order %}
<strong>{% trans "Status:"%}</strong><br> {{order.created_at|date:'Y-m-d H:i'}}
{% else %}
{% now "Y-m-d H:i" %}
{% endif %}
</span>
</div>
{% if order %}
{% endif %}
<div>
<strong>{% trans "Status" %}: </strong>
<strong>
{% if order.status == 'Approved' %} {% if order.status == 'Approved' %}
<strong class="text-success"> <span class="vm-status-active">{% trans "Approved" %}</span>
{% trans "Approved" %}
</strong>
{% else %} {% else %}
<strong class="text-danger"> <span class="vm-status-failed">{% trans "Declined" %}</span>
{% trans "Declined" %}
</strong>
{% endif %} {% endif %}
<br><br> </strong>
{% endif %}
</address>
</div> </div>
<div class="col-xs-12 col-md-6"> <hr>
<div>
<address> <address>
<h3><b>{% trans "Billed To:"%}</b></h3> <h4>{% trans "Billed to" %}:</h4>
{% if order %} <div>
{{user.name}}<br> {% if order %}
{{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br> {{user.name}}<br>
{{order.billing_address.city}}, {{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br>
{{order.billing_address.country}}. {{order.billing_address.city}},
{% else %} {{order.billing_address.country}}.
{% with request.session.billing_address_data as billing_address %} {% else %}
{{billing_address.cardholder_name}}<br> {% with request.session.billing_address_data as billing_address %}
{{billing_address.street_address}}, {{billing_address.cardholder_name}}<br>
{{billing_address.postal_code}}<br> {{billing_address.street_address}},
{{billing_address.city}}, {{billing_address.postal_code}}<br>
{{billing_address.country}}. {{billing_address.city}},
{% endwith %} {{billing_address.country}}.
{% endif %} {% endwith %}
{% endif %}
</div>
</address> </address>
</div> </div>
<hr>
<div>
<h4>{% trans "Payment method" %}:</h4>
<div>
{% if order %}
{{order.cc_brand}} {% trans "ending in" %} ****
{{order.last4}}<br>
{{user.email}}
{% else %}
{{cc_brand}} {% trans "ending in" %} ****
{{cc_last4}}<br>
{{request.session.user.email}}
{% endif %}
</div>
</div>
<div>
<h4>{% trans "Order summary"%}</h4>
<div>
{% if request.session.specs %}
{% request.session.specs as vm %}
{% endif %}
<strong>{% trans "Product" %}:</strong> {{request.session.template.name}}
</div>
</div>
</div> </div>
<div class="row">
<div class="col-xs-6">
<address>
<strong>{% trans "Payment Method:"%}</strong><br>
{% if order %}
{{order.cc_brand}} {% trans "ending in" %} ****
{{order.last4}}<br>
{{user.email}}
{% else %}
{{cc_brand}} {% trans "ending in" %} ****
{{cc_last4}}<br>
{{request.session.user.email}}
{% endif %}
</address>
</div>
</div>
<h3><b>{% trans "Order summary"%}</b></h3> <h3><b></b></h3>
<hr> <hr>
<div class="content"> <div class="content">
{% if request.session.specs %}
{% with request.session.specs as vm %}
<p><b>{% trans "Cores"%}</b> <p><b>{% trans "Cores"%}</b>
<span class="pull-right">{{vm.cpu}}</span> <span class="pull-right">{{vm.cpu}}</span>
</p> </p>
@ -195,7 +202,7 @@
<script type="text/javascript"> <script type="text/javascript">
{% trans "Some problem encountered. Please try again later." as err_msg %} {% trans "Some problem encountered. Please try again later." as err_msg %}
var create_vm_error_message = '{{err_msg|safe}}.'; var create_vm_error_message = '{{err_msg|safe}}';
window.onload = function () { window.onload = function () {
var locale_date = moment.utc(document.getElementById("order-created_at").textContent, 'YYYY-MM-DD HH:mm').toDate(); var locale_date = moment.utc(document.getElementById("order-created_at").textContent, 'YYYY-MM-DD HH:mm').toDate();

View file

@ -41,13 +41,15 @@
<td data-header="IPv6">{{vm.ipv6}}</td> <td data-header="IPv6">{{vm.ipv6}}</td>
{% endif %} {% endif %}
<td data-header="{% trans 'Status' %}"> <td data-header="{% trans 'Status' %}">
{% if vm.state == 'ACTIVE' %} <strong>
<span class="vm-status-active"><strong>{{vm.state|title}}</strong></span> {% if vm.state == 'ACTIVE' %}
{% elif vm.state == 'FAILED' %} <span class="vm-status-active">{{vm.state|title}}</span>
<span class="vm-status-failed"><strong>{{vm.state|title}}</strong></span> {% elif vm.state == 'FAILED' %}
{% else %} <span class="vm-status-failed">{{vm.state|title}}</span>
<span class="vm-status"><strong>{{vm.state|title}}</strong></span> {% else %}
{% endif %} <span class="vm-status">{{vm.state|title}}</span>
{% endif %}
</strong>
</td> </td>
<td class="text-right last-td"> <td class="text-right last-td">
<a class="btn btn-vm-detail" href="{% url 'hosting:virtual_machines' vm.vm_id %}">{% trans "View Detail" %}</a> <a class="btn btn-vm-detail" href="{% url 'hosting:virtual_machines' vm.vm_id %}">{% trans "View Detail" %}</a>