aboutsummaryrefslogtreecommitdiff
path: root/mod/simple_faq/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
commit009578973540995e73d82c4820528560f77c4d93 (patch)
tree37d36686e925109a6add53259883cd78bbb5f93a /mod/simple_faq/views
parent8e863c9c0c6050b3905db80b25b9769d91f59eb6 (diff)
parentef47af966edaf727834758f1a4fc7b1c19a0f230 (diff)
downloadelgg-009578973540995e73d82c4820528560f77c4d93.tar.gz
elgg-009578973540995e73d82c4820528560f77c4d93.tar.bz2
Merge commit 'ef47af966edaf727834758f1a4fc7b1c19a0f230' as 'mod/simple_faq'
Diffstat (limited to 'mod/simple_faq/views')
-rw-r--r--mod/simple_faq/views/default/expages/menu.php23
-rw-r--r--mod/simple_faq/views/default/js/simple_faq/toc.php24
2 files changed, 47 insertions, 0 deletions
diff --git a/mod/simple_faq/views/default/expages/menu.php b/mod/simple_faq/views/default/expages/menu.php
new file mode 100644
index 000000000..a88536924
--- /dev/null
+++ b/mod/simple_faq/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/mod/simple_faq/views/default/js/simple_faq/toc.php b/mod/simple_faq/views/default/js/simple_faq/toc.php
new file mode 100644
index 000000000..2b1621f88
--- /dev/null
+++ b/mod/simple_faq/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);