diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-03-27 18:22:07 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-03-27 18:22:07 +0000 |
commit | ffaaea497c44f362a619d95da097def836a28b50 (patch) | |
tree | 417ccaae7e1d635408a02f8bd29962f7d8b665fe /templates | |
parent | e7947069a2877b47c1dd7a18b686da5bbf3e160b (diff) | |
download | troggle-ffaaea497c44f362a619d95da097def836a28b50.tar.gz troggle-ffaaea497c44f362a619d95da097def836a28b50.tar.bz2 troggle-ffaaea497c44f362a619d95da097def836a28b50.zip |
re-ordering middleware and logon system
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 2 | ||||
-rw-r--r-- | templates/frontpage.html | 4 | ||||
-rw-r--r-- | templates/pagenotfound.html | 5 | ||||
-rw-r--r-- | templates/registration/login.html | 7 | ||||
-rw-r--r-- | templates/tasks.html | 27 |
5 files changed, 41 insertions, 4 deletions
diff --git a/templates/base.html b/templates/base.html index 081d5a2..2a61aac 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,7 +23,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='{% url "registration_register" %}'>Sign up</a> | <a href='{% url "auth_login" %}'>Log in</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 %} {% endblock%} {% block editLink %} diff --git a/templates/frontpage.html b/templates/frontpage.html index 5f0bf18..534602d 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -4,7 +4,7 @@ {% block title %}Cambridge Expeditions to Austria{% endblock %} {% block related %} - <h2>Recent Actions</h2> + <h2>Recent Actions - admin user</h5> {% load log %} {% get_admin_log 10 as admin_log for_user 1 %} {% if not admin_log %} @@ -16,7 +16,7 @@ {% if entry.is_deletion %} {{ entry.object_repr }} {% else %} - <a href="admin/{{ entry.get_admin_url }}/">{{ entry.object_repr }}</a> + <a href="{{ entry.get_admin_url }}/">{{ entry.object_repr }}</a> {% endif %} <br/> {% if entry.content_type %} diff --git a/templates/pagenotfound.html b/templates/pagenotfound.html index 4fdfe2a..2791dd9 100644 --- a/templates/pagenotfound.html +++ b/templates/pagenotfound.html @@ -2,6 +2,9 @@ {% block title %}Page not found {{ path }}{% endblock %} {% block body %} <h1>Page not found {{ path }}</h1> -<a href="{%url "editflatpage" path %}">Create this page.</a> +<p>Probably a mistake. But you can use <a href="{%url "editflatpage" path %}">this link</a> +<p> + or 'Edit this page' in the menu on the left to create this page if you aare logged in. + <p>If you can't see that option in the menu, then you are not logged in and you can't create anything. {% include "menu.html" %} {% endblock %} diff --git a/templates/registration/login.html b/templates/registration/login.html index 388d41b..da61169 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -7,14 +7,21 @@ <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/tasks.html b/templates/tasks.html index 4a6a02b..e9b12a9 100644 --- a/templates/tasks.html +++ b/templates/tasks.html @@ -4,6 +4,33 @@ {% block title %}Cambridge Expeditions to Austria{% endblock %} + {% block related %} + <h2>Recent Actions - admin user</h5> + {% load log %} + {% get_admin_log 10 as admin_log for_user 1 %} + {% if not admin_log %} + <p>No recent actions</p> + {% else %} + <ul class="actionlist"> + {% for entry in admin_log %} + <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}"> + {% if entry.is_deletion %} + {{ entry.object_repr }} + {% else %} + <a href="{{ entry.get_admin_url }}/">{{ entry.object_repr }}</a> + {% endif %} + <br/> + {% if entry.content_type %} + <span class="mini quiet">{% filter capfirst %}{{entry.content_type.name}}{% endfilter %}</span> + {% else %} + <span class="mini quiet">Unknown content</span> + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + {% endblock %} + {% block content %} <h2>This is not fully working currently</h2> <h2>The code behind this page is under repair</h2> |