diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-13 13:16:19 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-13 13:16:19 +0000 |
commit | ef5c47e15604ccd993ed50d466e25f5442c1017f (patch) | |
tree | 2b56f809aaf547ea9f3da9fa4ace33154bbe13dc /mod/riverdashboard/views | |
parent | 771c5e5909e69f614372f6bfb43300647e5aa5e1 (diff) | |
download | elgg-ef5c47e15604ccd993ed50d466e25f5442c1017f.tar.gz elgg-ef5c47e15604ccd993ed50d466e25f5442c1017f.tar.bz2 |
Added better content filtering for dashboard
git-svn-id: https://code.elgg.org/elgg/trunk@2738 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/views')
-rw-r--r-- | mod/riverdashboard/views/default/riverdashboard/nav.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/mod/riverdashboard/views/default/riverdashboard/nav.php b/mod/riverdashboard/views/default/riverdashboard/nav.php index a6e3a9381..6692d2bd0 100644 --- a/mod/riverdashboard/views/default/riverdashboard/nav.php +++ b/mod/riverdashboard/views/default/riverdashboard/nav.php @@ -2,9 +2,15 @@ $contents = array();
$contents['all'] = 'all';
- if (!empty($vars['config']->registered_entities['object'])) {
- foreach ($vars['config']->registered_entities['object'] as $object)
- $contents['item:object:'.$object] = $object;
+ if (!empty($vars['config']->registered_entities)) {
+ foreach ($vars['config']->registered_entities as $type => $ar) {
+ foreach ($vars['config']->registered_entities[$type] as $object) {
+ if (!empty($object )) {
+ $keyname = 'item:'.$type.':'.$object;
+ } else $keyname = 'item:'.$type;
+ $contents[$keyname] = "{$type},{$object}";
+ }
+ }
}
$allselect = ''; $friendsselect = ''; $mineselect = '';
@@ -22,9 +28,9 @@ <div class="riverdashboard_navigation">
<div class="riverdashboard_tabs">
<p>
- <a <?php echo $allselect; ?> href="?content=<?php echo $vars['subtype']; ?>">All</a>
- <a <?php echo $friendsselect; ?> href="?display=friends&content=<?php echo $vars['subtype']; ?>">Friends</a>
- <a <?php echo $mineselect; ?> href="?display=mine&content=<?php echo $vars['subtype']; ?>">Mine</a>
+ <a <?php echo $allselect; ?> href="?type=<?php echo $vars['type']; ?>&content=<?php echo $vars['subtype']; ?>">All</a>
+ <a <?php echo $friendsselect; ?> href="?type=<?php echo $vars['type']; ?>&display=friends&content=<?php echo $vars['subtype']; ?>">Friends</a>
+ <a <?php echo $mineselect; ?> href="?type=<?php echo $vars['type']; ?>&display=mine&content=<?php echo $vars['subtype']; ?>">Mine</a>
</p>
</div>
@@ -34,7 +40,7 @@ <?php
foreach($contents as $label => $content) {
- if (($vars['subtype'] == $content) ||
+ if (("{$vars['type']},{$vars['subtype']}" == $content) ||
(empty($vars['subtype']) && $content == 'all')) {
$selected = 'selected="selected"';
} else $selected = '';
|