aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-13 19:49:40 -0700
committerfriendica <info@friendica.com>2013-10-13 19:49:40 -0700
commitbae7f4e07868563637594edb81933fc5f3ed49cf (patch)
tree103bfa0a1b1d7189e79508e1c83f9c6ce6169d03
parent0e0e0d018b5cd14ed8d1578c15b3fc57ba4bfa12 (diff)
downloadvolse-hubzilla-bae7f4e07868563637594edb81933fc5f3ed49cf.tar.gz
volse-hubzilla-bae7f4e07868563637594edb81933fc5f3ed49cf.tar.bz2
volse-hubzilla-bae7f4e07868563637594edb81933fc5f3ed49cf.zip
directory sort links on sidebar
-rw-r--r--include/dir_fns.php11
-rw-r--r--mod/directory.php2
-rw-r--r--view/tpl/dir_sort_links.tpl6
3 files changed, 19 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 5521f2738..ba3aa1877 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -9,6 +9,17 @@ function find_upstream_directory($dirmode) {
return '';
}
+function dir_sort_links() {
+
+ $o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
+ '$header' => t('Sort Options'),
+ '$normal' => t('Alphabetic'),
+ '$reverse' => t('Reverse Alphabetic'),
+ '$date' => t('Newest to Oldest')
+ ));
+ return $o;
+}
+
function sync_directories($dirmode) {
diff --git a/mod/directory.php b/mod/directory.php
index 195ca993e..13855cff7 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -14,6 +14,8 @@ function directory_aside(&$a) {
require_once('include/contact_widgets.php');
$a->set_widget('find_people',findpeople_widget());
}
+ $a->set_widget('dir_sort_order',dir_sort_links());
+
}
diff --git a/view/tpl/dir_sort_links.tpl b/view/tpl/dir_sort_links.tpl
new file mode 100644
index 000000000..58498e4d8
--- /dev/null
+++ b/view/tpl/dir_sort_links.tpl
@@ -0,0 +1,6 @@
+<div class="widget" id="dir_sort_links">
+<h3>{{$header}}</h3>
+<a href="directory?f=&order=">{{$normal}}</a><br />
+<a href="directory?f=&order=reverse">{{$reverse}}</a><br />
+<a href="directory?f=&order=date">{{$date}}</a><br />
+</div>