aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/wiki.tpl
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-24 06:15:42 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-24 06:15:42 -0400
commite00b8a70829213a4333a53a097c2c498d529f5d6 (patch)
tree74bd9a90a24671287106b85050480f9cc45fe79c /view/tpl/wiki.tpl
parenta36bef7979aecd72751d319f85b7037991979e35 (diff)
downloadvolse-hubzilla-e00b8a70829213a4333a53a097c2c498d529f5d6.tar.gz
volse-hubzilla-e00b8a70829213a4333a53a097c2c498d529f5d6.tar.bz2
volse-hubzilla-e00b8a70829213a4333a53a097c2c498d529f5d6.zip
Delete wiki (in progress)
Diffstat (limited to 'view/tpl/wiki.tpl')
-rw-r--r--view/tpl/wiki.tpl16
1 files changed, 14 insertions, 2 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index 641b3256a..6ee4a7f89 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -30,6 +30,7 @@
</div>
<button id="new-wiki-submit" class="btn btn-primary" type="submit" name="submit" >Create Wiki</button>
</div>
+ <div>{{$acl}}</div>
</form>
<div class="clear"></div>
<hr>
@@ -74,8 +75,6 @@
</div>
</div>
-<div>{{$acl}}</div>
-
<script>
$(document).ready(function () {
// Show Edit tab first. Otherwise the Ace editor does not load.
@@ -98,4 +97,17 @@
ev.preventDefault();
});
+function wiki_delete_wiki(wikiName, resource_id) {
+ if(!confirm('Are you sure you want to delete the entire wiki: ' + JSON.stringify(wikiName))) {
+ return;
+ }
+ $.post("wiki/{{$channel}}/delete/wiki", {resource_id: resource_id}, function (data) {
+ if (data.success) {
+ window.console.log('Wiki deleted');
+ // Refresh list and redirect page as necessary
+ } else {
+ window.console.log('Error deleting wiki.');
+ }
+ }, 'json');
+}
</script>