aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-05-06 15:28:17 +0100
committerGravatar Gareth Coles <[email protected]>2018-05-06 15:28:17 +0100
commitce4da82f9b32524874ca208915f3b35813c2c672 (patch)
treee180bd1d3e0478452791a26456651d8856c765ae /templates
parentMerge remote-tracking branch 'origin/master' (diff)
[Wiki] Move page function
Diffstat (limited to 'templates')
-rw-r--r--templates/wiki/base.html14
-rw-r--r--templates/wiki/page_delete.html33
-rw-r--r--templates/wiki/page_move.html26
3 files changed, 56 insertions, 17 deletions
diff --git a/templates/wiki/base.html b/templates/wiki/base.html
index eec0ecb8..a71f09e6 100644
--- a/templates/wiki/base.html
+++ b/templates/wiki/base.html
@@ -104,6 +104,20 @@
</li>
{% endif %}
+ {% if current_page == "move" %}
+ <li>
+ <a href="{{ url_for("wiki.page", page=page) }}">
+ <i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back
+ </a>
+ </li>
+ {% else %}
+ <li>
+ <a href="{{ url_for("wiki.move", page=page) }}">
+ <i class="uk-icon fas fa-fw fa-arrow-right"></i> &nbsp;Move
+ </a>
+ </li>
+ {% endif %}
+
{% if current_page == "history.show" %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
diff --git a/templates/wiki/page_delete.html b/templates/wiki/page_delete.html
index f4d52653..27c4b406 100644
--- a/templates/wiki/page_delete.html
+++ b/templates/wiki/page_delete.html
@@ -2,25 +2,24 @@
{% block title %}Wiki | Delete: {{ page }}{% endblock %}
{% block og_title %}Wiki | Delete: {{ page }}{% endblock %}
{% block og_description %}{% endblock %}
-{% block extra_head %}
-<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.3/ace.js" type="application/javascript"></script>
-{% endblock %}
{% block content %}
- <div uk-alert class="uk-alert-danger">
- <h3>Delete Page: {{ page }}</h3>
- <p>
- Are you sure you want to delete this page?
- </p>
+ <div class="uk-container uk-container-small">
+ <div uk-alert class="uk-alert-danger">
+ <h3>Delete Page: {{ page }}</h3>
+ <p>
+ Are you sure you want to delete this page?
+ </p>
- <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.delete", page=page) }}" method="post">
- <div class="uk-width-1-2">
- <a href="{{ url_for("wiki.page", page=page) }}" class="uk-button uk-button-primary uk-width-1-1" type="button" value="Cancel" id="cancel">Cancel</a>
- </div>
- <div class="uk-width-1-2">
- <input class="uk-button uk-button-secondary uk-width-1-1" type="submit" id="delete" value="Delete" />
- </div>
+ <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.delete", page=page) }}" method="post">
+ <div class="uk-width-1-2">
+ <a href="{{ url_for("wiki.page", page=page) }}" class="uk-button uk-button-primary uk-width-1-1" type="button" id="cancel">Cancel</a>
+ </div>
+ <div class="uk-width-1-2">
+ <input class="uk-button uk-button-secondary uk-width-1-1" type="submit" id="delete" value="Delete" />
+ </div>
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- </form>
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ </form>
+ </div>
</div>
{% endblock %}
diff --git a/templates/wiki/page_move.html b/templates/wiki/page_move.html
new file mode 100644
index 00000000..e2d52807
--- /dev/null
+++ b/templates/wiki/page_move.html
@@ -0,0 +1,26 @@
+{% extends "wiki/base.html" %}
+{% block title %}Wiki | Move: {{ page }}{% endblock %}
+{% block og_title %}Wiki | Move: {{ page }}{% endblock %}
+{% block og_description %}{% endblock %}
+{% block content %}
+ <div class="uk-container uk-container-small">
+ {% if message is defined %}
+ <div uk-alert class="uk-alert-danger">
+ <p>{{ message }}</p>
+ </div>
+ {% endif %}
+
+ <h3>Move Page: {{ page }}</h3>
+ <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.move", page=page) }}" method="post">
+ <input type="text" class="uk-width-1-1 uk-input" placeholder="{{ page }}" id="location" name="location" style="margin-left: 15px;" required>
+ <div class="uk-width-1-2">
+ <a href="{{ url_for("wiki.page", page=page) }}" class="uk-button uk-button-primary uk-width-1-1" type="button" id="cancel">Cancel</a>
+ </div>
+ <div class="uk-width-1-2">
+ <input class="uk-button uk-button-secondary uk-width-1-1" type="submit" id="move" value="Move" />
+ </div>
+
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ </form>
+ </div>
+{% endblock %}