diff options
-rw-r--r-- | include/dir_fns.php | 11 | ||||
-rw-r--r-- | mod/directory.php | 2 | ||||
-rw-r--r-- | view/tpl/dir_sort_links.tpl | 6 |
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> |