aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 05:40:42 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 05:40:42 +0000
commit5bc52635a81d2448dbbbb8f0b62062229706b4f1 (patch)
tree8c61d26418ebd42cf9da2f0a3553c3ed7da922da /views
parent7cd7febec888d56225fb43dc9ac7a96f95eee154 (diff)
downloadelgg-5bc52635a81d2448dbbbb8f0b62062229706b4f1.tar.gz
elgg-5bc52635a81d2448dbbbb8f0b62062229706b4f1.tar.bz2
Refs #2895: Converted content filter to a menu, duplicated styles to mimic tabs... ick.
git-svn-id: http://code.elgg.org/elgg/trunk@8527 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/css/elements/navigation.php40
-rw-r--r--views/default/page/layouts/content/filter.php20
2 files changed, 53 insertions, 7 deletions
diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php
index 783d64811..d7c225d8a 100644
--- a/views/default/css/elements/navigation.php
+++ b/views/default/css/elements/navigation.php
@@ -83,6 +83,46 @@
}
/* ***************************************
+ FILTER MENU
+*************************************** */
+.elgg-menu-filter {
+ margin-bottom: 5px;
+ border-bottom: 2px solid #cccccc;
+ display: table;
+ width: 100%;
+}
+.elgg-menu-filter > li {
+ float: left;
+ border: 2px solid #cccccc;
+ border-bottom: 0;
+ background: #eeeeee;
+ margin: 0 0 0 10px;
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-radius: 5px 5px 0 0;
+}
+.elgg-menu-filter > li > a {
+ text-decoration: none;
+ display: block;
+ padding: 3px 10px 0 10px;
+ text-align: center;
+ height: 21px;
+ color: #999999;
+}
+.elgg-menu-filter > li > a:hover {
+ background: #dedede;
+ color:#4690D6;
+}
+.elgg-menu-filter > .elgg-state-selected {
+ border-color: #cccccc;
+ background: white;
+}
+.elgg-menu-filter > .elgg-state-selected > a {
+ position: relative;
+ top: 2px;
+ background: white;
+}
+
+/* ***************************************
* MENUS
*
* .elgg-menu does two things:
diff --git a/views/default/page/layouts/content/filter.php b/views/default/page/layouts/content/filter.php
index 9daee6d71..f22f2b761 100644
--- a/views/default/page/layouts/content/filter.php
+++ b/views/default/page/layouts/content/filter.php
@@ -23,21 +23,27 @@ if (elgg_is_logged_in() && $context) {
// generate a list of default tabs
$tabs = array(
'all' => array(
- 'title' => elgg_echo('all'),
- 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$context/all/",
+ 'text' => elgg_echo('all'),
+ 'href' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$context/all/",
'selected' => ($filter_context == 'all'),
),
'mine' => array(
- 'title' => elgg_echo('mine'),
- 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$context/owner/$username/",
+ 'text' => elgg_echo('mine'),
+ 'href' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$context/owner/$username/",
'selected' => ($filter_context == 'mine'),
),
'friend' => array(
- 'title' => elgg_echo('friends'),
- 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$context/friends/$username/",
+ 'text' => elgg_echo('friends'),
+ 'href' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$context/friends/$username/",
'selected' => ($filter_context == 'friends'),
),
);
+
+ foreach ($tabs as $name => $tab) {
+ $tab['name'] = $name;
+
+ elgg_register_menu_item('filter', $tab);
+ }
- echo elgg_view('navigation/tabs', array('tabs' => $tabs));
+ echo elgg_view_menu('filter', array('sort_by' => 'weight'));
}