aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-12-06 09:12:28 +0100
committerMario Vavti <mario@mariovavti.com>2017-12-06 09:12:28 +0100
commit44cb68a3561e6079e6185c1000753896b89c5129 (patch)
tree1b13ade0f452b2eb1b1d7f29ef67ca79f3e8102b /view
parent157966eb115606ef1d25fc55e90cb25fec1b6333 (diff)
downloadvolse-hubzilla-44cb68a3561e6079e6185c1000753896b89c5129.tar.gz
volse-hubzilla-44cb68a3561e6079e6185c1000753896b89c5129.tar.bz2
volse-hubzilla-44cb68a3561e6079e6185c1000753896b89c5129.zip
resolve merge conflict
Diffstat (limited to 'view')
-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}}