blob: 6692d2bd046117f06c10a27e181c2557d5ce814b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<?php
$contents = array();
$contents['all'] = 'all';
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 = '';
switch($vars['orient']) {
case '': $allselect = 'class="riverdashboard_tabs_selected"';
break;
case 'friends': $friendsselect = 'class="riverdashboard_tabs_selected"';
break;
case 'mine': $mineselect = 'class="riverdashboard_tabs_selected"';
break;
}
?>
<div class="riverdashboard_navigation">
<div class="riverdashboard_tabs">
<p>
<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>
<div class="riverdashboard_content_select">
<form action="index.php">
<select name="content">
<?php
foreach($contents as $label => $content) {
if (("{$vars['type']},{$vars['subtype']}" == $content) ||
(empty($vars['subtype']) && $content == 'all')) {
$selected = 'selected="selected"';
} else $selected = '';
echo "<option value=\"{$content}\" {$selected}>".elgg_echo($label)."</option>";
}
?>
</select>
<input type="hidden" name="display" value="<?php echo htmlentities($vars['orient']); ?>" />
<input type="submit" value="<?php echo elgg_echo('filter'); ?>" />
</form>
</div>
</div>
|