diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py index 4270fe2b..99216b8a 100644 --- a/digitalglarus/urls.py +++ b/digitalglarus/urls.py @@ -6,8 +6,8 @@ from .views import ContactView, IndexView, AboutView urlpatterns = [ # url(r'^$', IndexView.as_view(), name='home'), - url(_(r'home/?$'), IndexView.as_view(), name='home'), - url(_(r'about/?$'), AboutView.as_view(), name='about'), + # url(_(r'home/?$'), IndexView.as_view(), name='home'), + # url(_(r'about/?$'), AboutView.as_view(), name='about'), url(_(r'contact/?$'), ContactView.as_view(), name='contact'), url(_(r'supporters/?$'), views.supporters, name='supporters'), url(r'calendar_api/(?P\d+)/(?P\d+)?$',views.CalendarApi.as_view()), diff --git a/hosting/static/hosting/css/pricing.css b/hosting/static/hosting/css/pricing.css index 870b3cf9..7fb6f51f 100644 --- a/hosting/static/hosting/css/pricing.css +++ b/hosting/static/hosting/css/pricing.css @@ -1,3 +1,7 @@ +.pricing-container{ + margin-left: 5%; +} + .pricing { text-align: center; border: 1px solid #f0f0f0; @@ -7,6 +11,8 @@ margin-bottom: 30px; font-family: 'Lato'; } + + .pricing img { display: block; margin: auto; @@ -23,6 +29,13 @@ .pricing li + li { border-top: 1px solid #f0f0f0; } + +.pricing li.type { + list-style: none; + padding: 13px; + height: 200px; +} + .pricing big { font-size: 32px; } @@ -81,6 +94,7 @@ .pricing .short-input{ min-width: 0; width: 90px; + display: inline; } .p-red button { diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 3ffca138..fabfa030 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -55,20 +55,25 @@ @@ -93,20 +98,20 @@
  • - How it works
  • + How it works
  • - Your infrastructure
  • + Your infrastructure
  • - Our infrastructure
  • + Our infrastructure
  • - Pricing + Pricing
  • - Contact + Contact
  • diff --git a/hosting/templates/hosting/checkout.html b/hosting/templates/hosting/checkout.html deleted file mode 100644 index 90ff2bc7..00000000 --- a/hosting/templates/hosting/checkout.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - Rails Hosting.ch - Ruby on Rails as easy as possible - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
     
    -
    -

    Check Out

    -
    - -
      -
    • -

      OS : Ubuntu 14.04

      -
    • -
    • -

      RAM : 1GiB

    • -
    • CPU Cores : 4

    • -
    • Additional Disk: 20 GB -

    - -
    -
    -

     

    -
    - -

    -
      - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - diff --git a/hosting/templates/hosting/includes/_header.html b/hosting/templates/hosting/includes/_header.html index a75e797c..9e609816 100644 --- a/hosting/templates/hosting/includes/_header.html +++ b/hosting/templates/hosting/includes/_header.html @@ -13,7 +13,7 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html new file mode 100644 index 00000000..df5e6216 --- /dev/null +++ b/hosting/templates/hosting/orders.html @@ -0,0 +1,36 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 %} +{% block content %} +
    +
    +
    +
    + + + + + + + + + + + + {% for order in orders %} + + + + + + + {% endfor %} + +
    My orders.
    #DateAmountStatus
    {{order.id}}{{order.created_at}}{{order.VMPlan.price}}{{order.approved}}
    +
    + +
    +
    + +
    + +{%endblock%} \ No newline at end of file diff --git a/hosting/urls.py b/hosting/urls.py index f50b7a2f..9f18e836 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -2,15 +2,18 @@ from django.conf.urls import url from .views import DjangoHostingView, RailsHostingView, PaymentVMView, \ NodeJSHostingView, LoginView, SignupView, IndexView, \ - InvoiceVMView + InvoiceVMView, OrdersHostingView urlpatterns = [ url(r'index/?$', IndexView.as_view(), name='index'), url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'), url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'), url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'), - url(r'login/?$', LoginView.as_view(), name='login'), - url(r'signup/?$', SignupView.as_view(), name='signup'), url(r'payment/?$', PaymentVMView.as_view(), name='payment'), url(r'invoice/?$', InvoiceVMView.as_view(), name='invoice'), + url(r'orders/?$', OrdersHostingView.as_view(), name='orders'), + url(r'login/?$', LoginView.as_view(), name='login'), + url(r'signup/?$', SignupView.as_view(), name='signup'), + url(r'^logout/?$', 'django.contrib.auth.views.logout', + {'next_page': '/ungleich_page'}, name='logout') ] diff --git a/hosting/views.py b/hosting/views.py index 75ce03eb..ecebdd80 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1,6 +1,9 @@ from django.shortcuts import get_object_or_404, render from django.core.urlresolvers import reverse_lazy, reverse +from django.contrib.auth.mixins import LoginRequiredMixin +from django.contrib.auth.decorators import login_required +from django.utils.decorators import method_decorator from django.views.generic import View, CreateView, FormView from django.shortcuts import redirect @@ -214,9 +217,9 @@ class PaymentVMView(FormView): else: return self.form_invalid(form) - -class InvoiceVMView(View): +class InvoiceVMView(LoginRequiredMixin, View): template_name = "hosting/invoice.html" + login_url = reverse_lazy('hosting:login') def get_context_data(self, **kwargs): charge = self.request.session.get('charge') @@ -246,3 +249,24 @@ class InvoiceVMView(View): return render(request, self.template_name, context) + +class OrdersHostingView(LoginRequiredMixin, View): + template_name = "hosting/orders.html" + login_url = reverse_lazy('hosting:login') + + def get_context_data(self, **kwargs): + user = self.request.user + orders = HostingOrder.objects.filter(customer__user=user) + context = { + 'orders':orders + } + + return context + + def get(self, request, *args, **kwargs): + + context = self.get_context_data() + + return render(request, self.template_name, context) + + diff --git a/ungleich_page/locale/de/LC_MESSAGES/django.mo b/ungleich_page/locale/de/LC_MESSAGES/django.mo index 0b16e963..ef04e0da 100644 Binary files a/ungleich_page/locale/de/LC_MESSAGES/django.mo and b/ungleich_page/locale/de/LC_MESSAGES/django.mo differ diff --git a/ungleich_page/locale/de/LC_MESSAGES/django.po b/ungleich_page/locale/de/LC_MESSAGES/django.po index 3d564b18..a5cb93c7 100644 --- a/ungleich_page/locale/de/LC_MESSAGES/django.po +++ b/ungleich_page/locale/de/LC_MESSAGES/django.po @@ -20,105 +20,105 @@ msgstr "" #: templates/ungleich_page/includes/_about.html:8 msgid "ABOUT" -msgstr "" +msgstr "Über ungleich" #: templates/ungleich_page/includes/_about.html:9 msgid "The timeline of ungleich" -msgstr "" +msgstr "Die Chronik von ungleich" #: templates/ungleich_page/includes/_about.html:24 msgid "The first incarnation of ungleich" -msgstr "" +msgstr "Die erste Inkarnation von ungleich" #: templates/ungleich_page/includes/_about.html:25 msgid "in Germany" -msgstr "" +msgstr "in Deutschland" #: templates/ungleich_page/includes/_about.html:37 msgid "ungleich founded" -msgstr "" +msgstr "ungleich gegründet" #: templates/ungleich_page/includes/_about.html:38 msgid "in Switzerland" -msgstr "" +msgstr "in der Schweiz" #: templates/ungleich_page/includes/_about.html:51 msgid "ungleich present at various conferences" -msgstr "" +msgstr "ungleich präsent an mehreren Konferenzen" #: templates/ungleich_page/includes/_about.html:65 msgid "ungleich introduces HA-Hosting" -msgstr "" +msgstr "ungleich führt HA-Hosting ein" #: templates/ungleich_page/includes/_about.html:66 msgid "and introduces affordable 24X7 support." -msgstr "" +msgstr "und führt kostengünstigen 24X7 Support ein." #: templates/ungleich_page/includes/_about.html:67 msgid "ungleich launches" -msgstr "" +msgstr "ungleich lanciert" #: templates/ungleich_page/includes/_about.html:68 msgid "Digital Glarus project" -msgstr "" +msgstr "Digital Glarus Projekt" #: templates/ungleich_page/includes/_about.html:74 msgid "and" -msgstr "" +msgstr "und" #: templates/ungleich_page/includes/_about.html:74 msgid "the story continues!" -msgstr "" +msgstr "Die Geschichte geht weiter!" #: templates/ungleich_page/includes/_contact_us.html:14 #: templates/ungleich_page/includes/_contact_us.html:21 views.py:35 msgid "Contact Us" -msgstr "Kontaktiere Uns" +msgstr "Kontaktieren Sie uns" #: templates/ungleich_page/includes/_contact_us.html:16 msgid "Join us at" -msgstr "" +msgstr "Schliessen Sie sich uns an" #: templates/ungleich_page/includes/_contact_us.html:16 msgid "Digital Glarus" -msgstr "" +msgstr "Digital Glarus" #: templates/ungleich_page/includes/_contact_us.html:17 msgid "a great co-working space in the middle of Alps!" -msgstr "" +msgstr "ein wunderschöner Co-Working Space mitten in den Alpen" #: templates/ungleich_page/includes/_contact_us.html:17 msgid "You can contact us at" -msgstr "" +msgstr "Sie können uns kontaktieren unter" #: templates/ungleich_page/includes/_contact_us.html:20 msgid "or" -msgstr "" +msgstr "oder" #: templates/ungleich_page/includes/_contact_us.html:50 msgid "Submit" -msgstr "" +msgstr "Absenden" #: templates/ungleich_page/includes/_footer.html:8 msgid "Copyright © ungleich GmbH " -msgstr "" +msgstr "Copyright © ungleich GmbH" #: templates/ungleich_page/includes/_footer.html:22 msgid "ungleich Home" -msgstr "" +msgstr "ungleich Home" #: templates/ungleich_page/includes/_header.html:11 msgid "We Design, Configure & Maintain
    Your Linux Infrastructure " -msgstr "" +msgstr "Wir designen, erstellen und warten Ihre Linux-Infrastruktur" #: templates/ungleich_page/includes/_portfolio.html:8 #: templates/ungleich_page/includes/_portfolio.html:9 msgid "Hosting Products " -msgstr "" +msgstr "Hosting Produkte" #: templates/ungleich_page/includes/_portfolio.html:16 msgid "HA Hosting" -msgstr "" +msgstr "HA Hosting" #: templates/ungleich_page/includes/_portfolio.html:18 msgid "" @@ -151,11 +151,11 @@ msgstr "" #: templates/ungleich_page/includes/_services.html:8 msgid "our services" -msgstr "" +msgstr "Unsere Dienstleistungen" #: templates/ungleich_page/includes/_services.html:18 msgid "Hosting" -msgstr "" +msgstr "Hosting" #: templates/ungleich_page/includes/_services.html:20 msgid "" @@ -165,7 +165,7 @@ msgstr "" #: templates/ungleich_page/includes/_services.html:28 msgid "Configuration as a Service" -msgstr "" +msgstr "Konfiguration als Service" #: templates/ungleich_page/includes/_services.html:30 msgid "" @@ -186,7 +186,7 @@ msgstr "" #: templates/ungleich_page/includes/_team.html:8 msgid "Why ungleich?*" -msgstr "" +msgstr "Warum ungleich?" #: templates/ungleich_page/includes/_team.html:9 msgid "What our customers say" @@ -257,9 +257,8 @@ msgstr "" #: views.py:25 msgid "Message Successfully Sent" -msgstr "" +msgstr "Nachricht erfolgreich versendet" #: views.py:36 msgid "If you have any question, just send us an email." -msgstr "" -"Wenn Sie irgendwelche Fragen haben, schicken Sie uns einfach eine E-Mail." +msgstr "Wenn Sie irgendwelche Fragen haben, schicken Sie uns einfach eine E-Mail." diff --git a/ungleich_page/templates/ungleich_page/base_ungleich.html b/ungleich_page/templates/ungleich_page/base_ungleich.html deleted file mode 100644 index 49ceefe9..00000000 --- a/ungleich_page/templates/ungleich_page/base_ungleich.html +++ /dev/null @@ -1,78 +0,0 @@ -{% load cms_tags menu_tags sekizai_tags staticfiles bootstrap3 %} - - - - - {% block title %} - {% page_attribute "page_title" %} - {% endblock %} - - {% addtoblock "external-css" %} - {% bootstrap_css %} - - - - - - - - - {% endaddtoblock %} - - {% addtoblock "css" %} - - {% endaddtoblock %} - {% block meta %} - - - {% include 'meta.html' %} - {% endblock %} - {% render_block "external-css" %} - {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} - - - {% cms_toolbar %} - {% show_menu 0 0 0 1 "cms/ungleichch/_menu.html" %} - - - {% block base_header %} - {% include "ungleich_page/_header_base.html" %} - {% endblock %} -
    -
    -
    - {% block base_content %} - {% placeholder "default" %} - {% endblock %} -
    -
    -
    - - {% include "cms/ungleichch/_footer.html" %} - {% addtoblock "external-js" %} - {% bootstrap_javascript %} - {% endaddtoblock %} - {% addtoblock "js" %} - - -