2013-09-29 00:09:02 +03:00
|
|
|
{% extends 'layout.html' %}
|
2013-10-04 04:19:33 +03:00
|
|
|
{% block page_menu %}
|
2014-09-05 00:35:28 +03:00
|
|
|
<div class="controls pull-right">
|
2013-12-04 00:28:16 +02:00
|
|
|
<a class="btn btn-default btn-sm" href="{{ url_for('wiki.edit', name=name) }}">Edit</a>
|
|
|
|
<a class="btn btn-default btn-sm" href="{{ url_for('wiki.history', name=name) }}">History</a>
|
2014-09-05 00:35:28 +03:00
|
|
|
</div>
|
2013-10-04 04:19:33 +03:00
|
|
|
{% endblock %}
|
2013-09-29 00:09:02 +03:00
|
|
|
|
2013-10-04 04:19:33 +03:00
|
|
|
{% block body %}
|
2014-09-05 00:35:28 +03:00
|
|
|
{% if commit %}
|
|
|
|
<div id="page-action-bar">
|
2014-10-21 01:27:38 +03:00
|
|
|
<form method="POST" action="{{ url_for('wiki.revert') }}" class="ajax-form" data-redirect="{{ url_for('wiki.page', name=name) }}">
|
2014-09-05 00:35:28 +03:00
|
|
|
<input type="hidden" value="{{ name }}" name="name" />
|
|
|
|
<input type="hidden" value="{{ commit }}" name="commit" />
|
|
|
|
<input type="submit" class="btn btn-danger btn-sm" title="Revert back to this revision" value="Revert" />
|
|
|
|
</form>
|
2013-10-03 17:58:07 +03:00
|
|
|
</div>
|
2014-09-05 00:35:28 +03:00
|
|
|
{% endif %}
|
2014-10-07 00:07:20 +03:00
|
|
|
<div id="page-content"></div>
|
2013-09-29 00:09:02 +03:00
|
|
|
|
2013-10-02 04:50:48 +03:00
|
|
|
{% endblock %}
|
2014-10-07 00:07:20 +03:00
|
|
|
|
2013-10-02 04:50:48 +03:00
|
|
|
{% block js %}
|
2014-09-05 00:35:28 +03:00
|
|
|
<script>
|
|
|
|
$(function(){
|
2014-09-07 19:54:51 +03:00
|
|
|
{% if partials %}
|
|
|
|
{% for name, value in partials.items() %}
|
|
|
|
Handlebars.registerPartial({{ name|tojson|safe }}, {{ value.data|tojson|safe }});
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2014-09-05 00:35:28 +03:00
|
|
|
$("#page-content").html(MDR.convert({{ page.data|tojson|safe }})).show();
|
|
|
|
});
|
|
|
|
</script>
|
2013-09-29 00:09:02 +03:00
|
|
|
{% endblock %}
|