aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:50:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:50:57 -0300
commitef47af966edaf727834758f1a4fc7b1c19a0f230 (patch)
treef853217022b5e1a868a227dddc5c8010f4266e55 /views
downloadelgg-ef47af966edaf727834758f1a4fc7b1c19a0f230.tar.gz
elgg-ef47af966edaf727834758f1a4fc7b1c19a0f230.tar.bz2
Squashed 'mod/simple_faq/' content from commit 1852794
git-subtree-dir: mod/simple_faq git-subtree-split: 1852794b849fcbab29c2b37ca6c106dc0cb9903d
Diffstat (limited to 'views')
-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);