aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/listtype.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-14 08:04:28 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-14 08:04:28 +0000
commitaa5bb3f0bc17d858831412da82eef805ecafac89 (patch)
tree1a8c281c27778755bd9db83f8aa5822706a3b5db /views/default/navigation/listtype.php
parentbddba2985d89ff3ed9f52681b37cdce7a9c22bd9 (diff)
downloadelgg-aa5bb3f0bc17d858831412da82eef805ecafac89.tar.gz
elgg-aa5bb3f0bc17d858831412da82eef805ecafac89.tar.bz2
Fixes #2334: Converted viewtype => listtype and viewtypetoggle => listtypetoggle. Did my best to maintain backwards compatibility but might have missed something...
git-svn-id: http://code.elgg.org/elgg/trunk@7311 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation/listtype.php')
-rw-r--r--views/default/navigation/listtype.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/views/default/navigation/listtype.php b/views/default/navigation/listtype.php
new file mode 100644
index 000000000..c4693313b
--- /dev/null
+++ b/views/default/navigation/listtype.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Elgg list view switcher
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], 'search_listtype');
+
+if ($vars['listtype'] == "list") {
+ $listtype = "gallery";
+} else {
+ $listtype = "list";
+}
+
+if (substr_count($baseurl,'?')) {
+ $baseurl .= "&search_listtype=" . $listtype;
+} else {
+ $baseurl .= "?search_listtype=" . $listtype;
+}
+
+?>
+
+<p class="margin_top">
+ <?php echo elgg_echo("listtype:change") ?>:
+ <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("listtype:{$listtype}"); ?></a>
+</p> \ No newline at end of file