diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 2 | ||||
-rw-r--r-- | templates/errors/generic.html | 25 | ||||
-rw-r--r-- | templates/frontpage.html | 16 | ||||
-rw-r--r-- | templates/login/index.html | 53 | ||||
-rw-r--r-- | templates/login/logout.html | 51 | ||||
-rw-r--r-- | templates/registration/activate.html | 25 | ||||
-rw-r--r-- | templates/registration/activation_email.html | 10 | ||||
-rw-r--r-- | templates/registration/activation_email.txt | 10 | ||||
-rw-r--r-- | templates/registration/activation_email_subject.txt | 1 | ||||
-rw-r--r-- | templates/registration/logged_out.html | 55 | ||||
-rw-r--r-- | templates/registration/login.html | 27 | ||||
-rw-r--r-- | templates/registration/logout.html | 4 | ||||
-rw-r--r-- | templates/registration/registration_activate.html | 6 | ||||
-rw-r--r-- | templates/registration/registration_complete.html | 13 | ||||
-rw-r--r-- | templates/registration/registration_form.html | 50 |
15 files changed, 193 insertions, 155 deletions
diff --git a/templates/base.html b/templates/base.html index 971152d..1fe8029 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,7 +20,7 @@ You are logged in as {{ user.username }} {% if user.person %}(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>) {% endif %}. - | <a href="{% url "auth_logout" %}">Log out</a> {% else %} <a href='/accounts/logout'>Sign up</a> | <a href='{% url "auth_login" %}'>Log in</a> {% endif %} + | <a <a href='/accounts/logout/'>Log out</a> {% else %} <a href='/accounts/register/'>Register</a> | <a href='/accounts/login/'>Log in</a> {% endif %} {% endblock%} {% block editLink %} diff --git a/templates/errors/generic.html b/templates/errors/generic.html new file mode 100644 index 0000000..a626a5a --- /dev/null +++ b/templates/errors/generic.html @@ -0,0 +1,25 @@ +{% extends 'base.html' %} + +{% block title %}Website Error - {% endblock %} +{% block content %} + +<div class='middle'> + <h2>Website Error</h2> +</div> +<div style='width: 300px;' class='middle3 login'> + <div class='align-center'> + <div class='space'></div> + <div class='align-center'> + <h3>There has been an error.</h3> + <p>We are terribly sorry but an unknown fault has occurred. </p> + + + </div> +</div> +</div> + + + + + +{% endblock %}
\ No newline at end of file diff --git a/templates/frontpage.html b/templates/frontpage.html index eca67cb..4405d10 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -33,25 +33,25 @@ {% block content %} - - <div id="col1"> <h3>Welcome</h3> <p class="indent"> -This is Troggle, the online system for Cambridge University Caving Club's Expeditions to Austria. +This is <b>Troggle</b>, the online system for Cambridge University Caving Club's Expeditions to Austria. </p> <p class="indent"> -Here you will find information about the {{expedition.objects.count}} expeditions the club has undertaken since 1976. Browse survey information, photos, and description wikis for {{Cave.objects.count}} caves, {{subcave.objects.count}} areas within those caves, and {{extantqms.count}} going leads yet to be explored. We have {{Photo.objects.count}} photos and {{Logbookentry.objects.count}} logbook entries. +Here you will find information about the {{expedition.objects.count}} expeditions the club has undertaken since 1976. Browse survey information, photos, and description pages for {{Cave.objects.count}} caves and {{extantqms.count}} going leads yet to be explored. We have {{Photo.objects.count}} photos and {{Logbookentry.objects.count}} logbook entries. </p> <p class="indent"> -You are not logged-in, so not all the pages will be visible and you will not be able to edit anything. +<!-- logged in users are directed to 'tasks.html' not this 'frontpage.html' --> +You are not logged-in, so a few of the unpublished cave survey pages will not be visible to you. And of course you will not be able to edit anything. </p> - +<!-- <img src="/expofiles/photos/2007/selected/eishoehle5nial.jpg">--> +<img src="/expofiles/photos/2007/selected/eishoehle4nial.jpg"> +<p>Nial in <a href="/expofiles/photos/2007/selected/">Eishohle in 2007</a>. {% endblock content %} {% block margins %} -<img src="{{ settings.MEDIA_URL }}eieshole.jpg"> -<img src="{{ settings.MEDIA_URL }}goesser.jpg"> + {% endblock margins %}
\ No newline at end of file diff --git a/templates/login/index.html b/templates/login/index.html new file mode 100644 index 0000000..6db786e --- /dev/null +++ b/templates/login/index.html @@ -0,0 +1,53 @@ +{% extends 'base.html' %} + +{% block content %} +<!-- To understand how this all works, with invisible default behaviour, see + +troggle/templates/login/logout.html +troggle/templates/registration/ + +because magic +This is because Django is Opinionated and does lots of Invisible Defaults +--> +<div class='middle'> +<h2>Troggle user login</h2> +</div> + +{% if message %} + <div style='width: 350px;' class='middle3 login'> + {% if title %} + <div class='align-center'> + <h3>{{title}}</h3> + <div class='space'></div> + {% endif %} + <p>{{message }}</p> + </div> +{% endif %} +<h3>Troggle ordinary user login - no access to Django control panel</h3> +<p>(This is using template login/index.html) +<div style='width: 250px;' class='middle3 login'> +<div class='align-center'> + +<div class='space'></div> +{% if invalid %} + <p class='error'>The username and password you provided don't match. Please try again.</p> + <p>Have you <a href='/accounts/forgottenpassword/'>forgotten your password</a>?<br/> + Or perhaps <a href='/accounts/forgottenusername/'>your username</a>?</p> + + <p>Neither of those links work yet, by the way, I'm only trying to *appear* helpful. + + <div class='space'></div> +{% endif %} +<div class='align-center'> + <form action="" method="post" accept-charset="utf-8">{% csrf_token %} + <table class='form'> + <tr><th><label for="id_username">Username:</label></th><td><input id="id_username" type="text" name="username" maxlength="30" /></td></tr> + <tr><th><label for="id_password">Password:</label></th><td><input type="password" name="password" id="id_password" /></td></tr> + </table> + <div class='space'></div> + + <br/> + <p><input type="submit" value="Login →"></p> + </form> +</div> +{% endblock %} diff --git a/templates/login/logout.html b/templates/login/logout.html new file mode 100644 index 0000000..12094c2 --- /dev/null +++ b/templates/login/logout.html @@ -0,0 +1,51 @@ +{% extends 'base.html' %} + +{% block content %} +<!-- this overrides the django.contrib.auth default logout form +and it must be placed in +troggle/templates/login/logout.html +because magic + +Note that we need to have TWO DIFFERENT logout templates to make this work, +the other one is in +troggle/templates/registration/ +That one is for logging out of the Django Admin system. +This one is for logging out of the normal system whereas this one + +Not forgetting the template in +troggle/templates/login/index +which also has a login form. + +This is because Django is Opinionated and does lots of Invisible Defaults +--> +<div class='middle'> +<h2>You have been logged out</h2> +</div> +<h3>Troggle ordinary user login - no access to Django control panel</h3> +<p>(using template login/logout.html) +<div style='width: 250px;' class='middle3 login'> + <div class='align-center'> + <div class='space'></div> + <div class='align-center'> + <form action="/login/" method="post" accept-charset="utf-8">{% csrf_token %} + <table class='form'> + {{form.as_table}} + </table> + <div class='space'></div> + <span class='indent'> + <br /><input type="submit" value="Login →"> + </form> + </div> + + + + </form> + </div> +</div> + + + + + + +{% endblock %} diff --git a/templates/registration/activate.html b/templates/registration/activate.html deleted file mode 100644 index cf8e79a..0000000 --- a/templates/registration/activate.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -New troggle account registered -{% endblock %} - -{% block header %} -<h1>activate.html</h1> -{% endblock %} - -{% block content %} - -{% if account %} -<p> -Hello, {{ account }}! Your account is now activated. Now you can <a href="{%url "auth_login"%}">log in</a> with the password you chose. Use the links in the upper right to control this in the future. -</p> - -<p> -If you have been on the expedition in the past, you already have a profile in the system; <a href={% url "profiles_select_profile" %}>click here </a> to find it and link it to your account. Otherwise, please <a href={% url "profiles_create_profile" %}> create yourself a new profile</a>. -</p> -{% else %} - -The activation key you entered has already been used or was invalid. -{% endif %} -{% endblock %} diff --git a/templates/registration/activation_email.html b/templates/registration/activation_email.html deleted file mode 100644 index 3b82c60..0000000 --- a/templates/registration/activation_email.html +++ /dev/null @@ -1,10 +0,0 @@ -<P>Hello {{ form.user }},</P> - -<P>Glad you're joining the CUCC EXPO team! Please go to</P> - -<P><a href="{{ site }}{% url "registration_activate" activation_key %}">{{ site }}{% url "registration_activate" activation_key %}</a></P> - -<P>to activate your account. Do this within {{ expiration_days }} days, or else you'll have to sign up again.</P> - -<P>Yours,<BR> -The magical troggle</P> diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt deleted file mode 100644 index bce7fbe..0000000 --- a/templates/registration/activation_email.txt +++ /dev/null @@ -1,10 +0,0 @@ -Hello {{ form.user }}, - -Glad you're joining the CUCC EXPO team! Please go to - -{{ site }}{% url "registration_activate" activation_key %} - -to activate your account. Do this within {{ expiration_days }} days, or else you'll have to sign up again. - -Yours, -The magical troggle
\ No newline at end of file diff --git a/templates/registration/activation_email_subject.txt b/templates/registration/activation_email_subject.txt deleted file mode 100644 index 78ae905..0000000 --- a/templates/registration/activation_email_subject.txt +++ /dev/null @@ -1 +0,0 @@ -[CUCC Expo] Activation email
\ No newline at end of file diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html new file mode 100644 index 0000000..95c2531 --- /dev/null +++ b/templates/registration/logged_out.html @@ -0,0 +1,55 @@ +{% extends 'base.html' %} + +{% block content %} +<!-- this overrides the django.contrib.admin default logout form +and it must be placed in +troggle/templates/registration/ +because magic + +Note that we need to have TWO DIFFERENT logout templates to make this work, +the other one is in +troggle/templates/login/logout.html +That one is for logging out +of the normal system whereas this one is for logging out of the Django Admin system. + +Not forgetting the template in +troggle/templates/login/index +which also has a login form. + +This is because Django is Opinionated and does lots of Invisible Defaults +--> +<div class='middle'> +<h2>You have been logged out</h2> +</div> + <!-- Yeah this logon form sometimes fails to appear, and then the Submit button gives a horrible crash. + All because of some CSRF horribleness ? Possibly. + + So let's not even attempt to have it here, OK? + --> + + <!-- + <h3>Troggle user Login</h3> + <p>(using template registration/logged_out.html) + <div style='width: 250px;' class='middle3 login'> + <div class='align-center'> + + <div class='space'></div> + <div class='align-center'> + <form action="/login/" method="post" accept-charset="utf-8">{% csrf_token %} + <table class='form'> + {{form.as_table}} + </table> + <div class='space'></div> + <span class='indent'> + <br /><input type="submit" value="Login →"> + </form> + </div> + --> +<form action="/accounts/login/" method="GET" accept-charset="utf-8"> +<br /><input type="submit" value="Login →"> +</form> + + + + +{% endblock %} diff --git a/templates/registration/login.html b/templates/registration/login.html deleted file mode 100644 index da61169..0000000 --- a/templates/registration/login.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "base.html" %} -{% load csrffaker %} - -{% block content %} - -{% if form.errors %} -<p>Your username and password didn't match. Please try again.</p> -{% endif %} - -<div align="center"> -<pre>This uses the registration/login.html template</pre> - -<form method="post" action=".">{% csrf_token %} -<table> -<tr><td>{{ form.username.label_tag }}</td><td>{{ form.username }}</td></tr> -<tr><td>{{ form.password.label_tag }}</td><td>{{ form.password }}</td></tr> -</table> - - - -<input type="submit" value="login" /> -<input type="hidden" name="next" value="{{ next }}" /> -</form> - - -</div> -{% endblock %} diff --git a/templates/registration/logout.html b/templates/registration/logout.html deleted file mode 100644 index ef2a3b2..0000000 --- a/templates/registration/logout.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "base.html" %} -{% block content %} - You have been logged out. -{% endblock %}
\ No newline at end of file diff --git a/templates/registration/registration_activate.html b/templates/registration/registration_activate.html deleted file mode 100644 index 6566bf4..0000000 --- a/templates/registration/registration_activate.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends “base.html” %} -{% block body %} -Hello {{ account }}! - -Check your email to confirm the activation. There are {{ expiration_days }} days left to do it. -{% endblock %}
\ No newline at end of file diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html deleted file mode 100644 index 4dac94b..0000000 --- a/templates/registration/registration_complete.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -{{ block.super }}: registration complete -{% endblock %} - -{% block contentheader %} -<h1>Registration Complete</h1> -{% endblock %} - -{% block content %} -<p>Thank you for signing up. An email with the activation code has been sent to your inbox. </p> -{% endblock %}
\ No newline at end of file diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html deleted file mode 100644 index 6c4a7f6..0000000 --- a/templates/registration/registration_form.html +++ /dev/null @@ -1,50 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -registration_form.html | {{ block.super }} -{% endblock %} - -{% block header %} -<h1>registration_form.html</h1> -{% endblock %} - -{% block content %} -<form action="{% url "registration_register" %}" method="POST">{% csrf_token %} - {% for error in form.non_field_errors %} - <span style="color:red">{{ error }}</span> - {% endfor %} -<table> -<tr> - <td align="right" valign="top">Username:</td> - <td> - {{ form.username }} <br/> - {% for error in form.username.errors %} - <span style="color:red">{{ error }}</span> - {% endfor %} - </td> -</tr> -<tr> - <td align="right" valign="top">Email:</td> - <td> - {{ form.email }} <br/> - {% for error in form.email.errors %} - <span style="color:red">{{ error }}</span> - {% endfor %} - </td> -</tr> -<tr> - <td align="right" valign="top">Password:</td> - <td> - {{ form.password1 }} <br/> - {% for error in form.password1.errors %} - <span style="color:red">{{ error }}</span> - {% endfor %} - </td> -</tr> -<tr> - <td> </td> - <td><input type="submit" value="Register" /></td> -</tr> -</table> -</form> -{% endblock %} |