aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:07:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:07:11 -0300
commiteef8dc3c35a4d6339fae7d942388009afe1f78c1 (patch)
treef0b8927c27691bb52ef59332f62ea09e1e7fcea4 /views/default
downloadelgg-eef8dc3c35a4d6339fae7d942388009afe1f78c1.tar.gz
elgg-eef8dc3c35a4d6339fae7d942388009afe1f78c1.tar.bz2
Squashed 'mod/faq/' content from commit b3a038c
git-subtree-dir: mod/faq git-subtree-split: b3a038c8ac7db28d5cd47a7ae870f722c24e5921
Diffstat (limited to 'views/default')
-rw-r--r--views/default/expages/menu.php23
-rw-r--r--views/default/js/simple_faq/toc.php24
2 files changed, 47 insertions, 0 deletions
diff --git a/views/default/expages/menu.php b/views/default/expages/menu.php
new file mode 100644
index 000000000..a88536924
--- /dev/null
+++ b/views/default/expages/menu.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * External pages menu
+ *
+ * @uses $vars['type']
+ */
+
+$type = $vars['type'];
+
+//set the url
+$url = $vars['url'] . "admin/site/expages?type=";
+
+$pages = array('about', 'terms', 'privacy', 'faq');
+$tabs = array();
+foreach ($pages as $page) {
+ $tabs[] = array(
+ 'title' => elgg_echo("expages:$page"),
+ 'url' => "admin/appearance/expages?type=$page",
+ 'selected' => $page == $type,
+ );
+}
+
+echo elgg_view('navigation/tabs', array('tabs' => $tabs, 'class' => 'elgg-form-settings'));
diff --git a/views/default/js/simple_faq/toc.php b/views/default/js/simple_faq/toc.php
new file mode 100644
index 000000000..2b1621f88
--- /dev/null
+++ b/views/default/js/simple_faq/toc.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Show the FAQs' Table of Contents
+ *
+ * @package SimpleFAQ
+ */
+
+include(elgg_get_plugins_path() . 'simple_faq/vendors/jquery-stoc/jquery.stoc.js');
+
+?>
+
+elgg.provide('elgg.simple_faq');
+
+elgg.simple_faq.init = function() {
+ $(function(){
+ $("<div class="elgg-simplefaq-toc"></div>").prependTo(".elgg-main .elgg-output").stoc({
+ search: ".elgg-main .elgg-output",
+ stocTitle: "",
+ listType: "ol",
+ });
+ });
+};
+
+elgg.register_hook_handler('init', 'system', elgg.simple_faq.init);