Almost working wiki before refactoring

This commit is contained in:
Skia
2015-11-23 13:30:30 +01:00
parent e9c18748b0
commit ace66bba0a
10 changed files with 138 additions and 13 deletions

View File

@ -11,11 +11,11 @@
{% endblock %}
{% block content %}
{% if page %}
{% if view_page %}
<h3>Page</h3>
<p><a href="{% url 'core:page_list' %}">Back to list</a></p>
{% if user.is_superuser %}
<p><a href="{% url 'core:page_edit' page.name %}">Edit</a></p>
<p><a href="{% url 'core:page_edit' page.full_name %}">Edit</a></p>
{% endif %}
<p>You're seeing the page <strong>{{ page.get_display_name }}</strong></p>
<h3>{{ page.title }}</h3>
@ -24,7 +24,7 @@
<h3>Page list</h3>
<ul>
{% for p in page_list %}
<li><a href="{% url 'core:page' p.name %}">{{ p.get_display_name }}</a></li>
<li><a href="{% url 'core:page' p.full_name %}">{{ p.get_display_name }}</a></li>
{% endfor %}
</ul>
{% elif new_page %}
@ -32,7 +32,7 @@
<p><a href="{% url 'core:page_edit' new_page %}">Create it?</a></p>
{% elif page_form %}
<h2>Edit page</h2>
<form action="{% url 'core:page_edit' page_name=page_name %}" method="post">
<form action="{% url 'core:page_edit' page_name=page.full_name %}" method="post">
{% csrf_token %}
{{ page_form }}
<p><input type="submit" value="Save!" /></p>