1. Victor Kotseruba
  2. superwiki

Source

superwiki / superwiki / templates / wiki / show.html

{% extends "wiki/layout.html" %}

{% load wiki_extra %}

{% block wiki_head %}
  {% if exists %}
    {% if page.title %}{{ page.title }}{% else %}{{ page.url }}{% endif %}
  {% else %}
    not found
  {% endif %}
{% endblock %}

{% block wiki_toolbar %}
  {% if exists %}
    {% if edit_allowed %}
    <div style="overflow: hidden;">
      <a class="button" href="{% wiki_reverse bind url %}:edit">Edit</a>
      <a class="button negative" href="{% wiki_reverse bind url %}:delete">Delete</a>
    </div>
    {% endif %}
    <div><a href="{% wiki_reverse bind url %}:history">History</a><br/><br/></div>
  {% endif %}
{% endblock %}

{% block wiki_content %}
  {% if exists %}
    <div class="wiki-text">
      {{ page.rendered_body|safe }}
    </div>
  {% else %}
    <div class="wiki-not-found">
      wiki page with url "{{ url }}" doesn't exist
      {% if edit_allowed %}
        <br/>
        <a class="button positive" href="{% wiki_reverse bind url %}:create">create</a>
      {% endif %}
    </div>
  {% endif %}
{% endblock %}