add templates for anonymous user dashboard and login

This commit is contained in:
Jan Dittberner 2015-01-17 14:04:10 +01:00
parent 8a29e4001c
commit 1deed46d34
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Welcome" %}{% endblock title %}
{% block page_title %}{% trans "Welcome to our customer self service" %}{% endblock page_title %}
{% block content %}
{% if user.is_authenticated %}
<p>{% url 'customer_dashboard' slug=user.username as dashboard_url %}{% blocktrans with full_name=user.get_full_name %}Hello {{ full_name }},<br />
You can visit your <a href="{{ dashboard_url }}">Dashboard</a> to view and modify your hosting options.
{% endblocktrans %}</p>
{% else %}
<p>{% trans "This is your entry to our customer self service sytem." %}</p>
<p>{% url 'login' as login_url %}{% url 'dashboard' as dashboard_url %}{% blocktrans %}If you are already a customer you can <a href="{{ login_url }}?next={{ dashboard_url }}">Sign in</a> to view and modify your hosting options.{% endblocktrans %}</p>
{% endif %}
{% endblock content %}

View file

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Sign in" %}{% endblock title %}
{% block page_title %}{% trans "Sign In" %}{% endblock %}
{% block content %}
<form action="" method="post">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
{{ form|crispy }}
<input type="submit" name="submit" value="{% trans 'Sign in' %}" class="btn btn-primary" />
</form>
{% endblock %}