design fixes

This commit is contained in:
Arvind Tiwari 2017-09-21 19:17:10 +05:30
parent db3955ab94
commit a16dbb50d8
4 changed files with 32 additions and 16 deletions

View file

@ -2,6 +2,10 @@
max-width: 600px;
margin: 100px auto 40px;
border: 1px solid #ccc;
padding: 15px;
}
@media(min-width: 768px) {
padding: 30px;
}
@ -42,9 +46,8 @@
right: 0;
}
.order-detail-container .dashboard-container-options .svg-img {
height: 20px;
/* margin-right: 5px; */
width: 20px;
height: 22px;
width: 22px;
}
.order-detail-container .order-details {
@ -52,7 +55,7 @@
}
.order-detail-container .order-details strong {
color: #777;
color: #595959;
}
.order-detail-container h4 {
@ -75,4 +78,13 @@
text-align: center;
margin-top: 10px;
}
}
.order-detail-container .dashboard-container-options {
position: absolute;
top: 4px;
right: -4px;
}
.order-detail-container .dashboard-container-options .svg-img {
height: 16px;
width: 16px;
}
}

View file

@ -81,7 +81,11 @@
{% else %}
{{cc_brand}} {% trans "ending in" %} ****
{{cc_last4}}<br>
{{request.session.user.email}}
{% if request.user.is_authenticated %}
{{request.user.email}}
{% else %}
{{request.session.user.email}}
{% endif %}
{% endif %}
</p>
</div>
@ -101,7 +105,7 @@
{% endcomment %}
<p>
<span>{% trans "Cores" %}</span>
<span class="pull-right">{{vm.cores}}</span>
<span class="pull-right">{{vm.cores|floatformat}}</span>
</p>
<p>
<span>{% trans "Memory" %}</span>
@ -140,10 +144,10 @@
{% endif %}
</div>
{% if order %}
<div class="text-center" style="margin-bottom: 50px;">
<a class="btn btn-vm-back" href="{% url 'hosting:orders' %}">{% trans "BACK TO LIST" %}</a>
</div>
{% if order %}
{% endif %}
{% if not order %}

View file

@ -12,7 +12,7 @@ from .views import (
from django.views.generic import TemplateView
urlpatterns = [
url(r'test/?$', TemplateView.as_view(template_name='hosting/order_detail.html')),
url(r'test/?$', TemplateView.as_view(template_name='hosting/order_detail.html'), name='test'),
url(r'index/?$', IndexView.as_view(), name='index'),
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
url(r'dashboard/?$', DashboardView.as_view(), name='dashboard'),

View file

@ -661,7 +661,7 @@ class OrdersHostingDetailView(LoginRequiredMixin,
self.request.session.get('token')
)
else:
card_details = None
card_details = {}
if self.request.GET.get('page') == 'payment':
context['page_header_text'] = _('Confirm Order')
@ -704,12 +704,12 @@ class OrdersHostingDetailView(LoginRequiredMixin,
return context
def get(self, request, *args, **kwargs):
# if 'specs' not in self.request.session:
# return HttpResponseRedirect(
# reverse('hosting:create_virtual_machine')
# )
# if 'token' not in self.request.session:
# return HttpResponseRedirect(reverse('hosting:payment'))
if 'specs' not in self.request.session:
return HttpResponseRedirect(
reverse('hosting:create_virtual_machine')
)
if 'token' not in self.request.session:
return HttpResponseRedirect(reverse('hosting:payment'))
self.object = self.get_object()
context = self.get_context_data(object=self.object)
if 'failed_payment' in context: