aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/wiki_page_not_found.tpl
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-06 14:29:36 -0800
committerzotlabs <mike@macgirvin.com>2017-12-06 14:29:36 -0800
commite5653945d35e00ae1821fa93e502cc4555519735 (patch)
tree05c1a273a378ccf02bc19cfb32c8f5be7391abff /view/tpl/wiki_page_not_found.tpl
parent0a55d6d51143acbf1084104d1626c7a4b88e6c15 (diff)
parenta604236d89a843a10af1a87f5e9a5cdac153b3ab (diff)
downloadvolse-hubzilla-e5653945d35e00ae1821fa93e502cc4555519735.tar.gz
volse-hubzilla-e5653945d35e00ae1821fa93e502cc4555519735.tar.bz2
volse-hubzilla-e5653945d35e00ae1821fa93e502cc4555519735.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view/tpl/wiki_page_not_found.tpl')
-rw-r--r--view/tpl/wiki_page_not_found.tpl34
1 files changed, 34 insertions, 0 deletions
diff --git a/view/tpl/wiki_page_not_found.tpl b/view/tpl/wiki_page_not_found.tpl
new file mode 100644
index 000000000..de98efdf8
--- /dev/null
+++ b/view/tpl/wiki_page_not_found.tpl
@@ -0,0 +1,34 @@
+ <h3>Page does not exist</h3>
+ <br /><br /><br />
+ {{if $canadd}}
+ <form id="new-page-form" action="wiki/{{$channel_address}}/create/page" method="post" >
+ <input type="hidden" name="resource_id" value="{{$resource_id}}">
+ {{include file="field_input.tpl" field=$pageName}}
+ {{if $typelock}}
+ <input id="id_mimetype" type="hidden" name="mimetype" value="{{$lockedtype}}">
+ {{else}}
+ <div id="wiki_missing_page_options" style="display: none">
+ {{$mimetype}}
+ </div>
+ <div class="float-right fakelink" onClick="openClose('wiki_missing_page_options')">
+ {{$options}}
+ </div>
+ {{/if}}
+ <button id="create-missing-page-submit" class="btn btn-primary" type="submit" name="submit" >{{$submit}}</button>
+ </form>
+
+<script>
+ $('#create-missing-page-submit').click(function (ev) {
+ $.post("wiki/{{$channel_address}}/create/page", {pageName: $('#id_missingPageName').val(), resource_id: window.wiki_resource_id, mimetype: $('#id_mimetype').val() },
+ function(data) {
+ if(data.success) {
+ window.location = data.url;
+ } else {
+ window.console.log('Error creating page. ('+data.message+')');
+ }
+ }, 'json');
+ ev.preventDefault();
+ });
+
+</script>
+{{/if}}