aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default/file/typecloud.php
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 18:07:38 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 18:07:38 +0000
commit451b29b0f5fef1f41b209c51b57d6362c13696a1 (patch)
tree28e45d071a26d0306dd845e9b5085149aed00f6b /mod/file/views/default/file/typecloud.php
parentaa55192c5e2347e31a905d4e218477dd1e0ff333 (diff)
downloadelgg-451b29b0f5fef1f41b209c51b57d6362c13696a1.tar.gz
elgg-451b29b0f5fef1f41b209c51b57d6362c13696a1.tar.bz2
Updated File mod to new UI.
git-svn-id: http://code.elgg.org/elgg/trunk@5409 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/views/default/file/typecloud.php')
-rw-r--r--mod/file/views/default/file/typecloud.php89
1 files changed, 39 insertions, 50 deletions
diff --git a/mod/file/views/default/file/typecloud.php b/mod/file/views/default/file/typecloud.php
index b85960849..5ac831cfe 100644
--- a/mod/file/views/default/file/typecloud.php
+++ b/mod/file/views/default/file/typecloud.php
@@ -4,64 +4,53 @@
if (is_array($vars['types']) && sizeof($vars['types'])) {
-?>
-
- <!-- <div class="filerepo_types"> -->
- <!-- <p><b><?php echo elgg_echo('file:types'); ?>:</b> -->
-
- <div id="canvas_header_submenu">
- <ul>
+?>
+<ul>
<?php
- $all = new stdClass;
- $all->tag = "all";
- $vars['types'][] = $all;
- $vars['types'] = array_reverse($vars['types']);
- foreach($vars['types'] as $type) {
+ $all = new stdClass;
+ $all->tag = "all";
+ $vars['types'][] = $all;
+ $vars['types'] = array_reverse($vars['types']);
+ foreach($vars['types'] as $type) {
- $tag = $type->tag;
- if ($tag != "all") {
- $label = elgg_echo("file:type:" . $tag);
- } else {
- $label = elgg_echo('all');
- }
-
- $url = $vars['url'] . "mod/file/search.php?subtype=file";
- if ($tag != "all")
- $url .= "&md_type=simpletype&tag=" . urlencode($tag);
- if (isset($vars['friend_guid']) && $vars['friend_guid'] != false) {
- $url .= "&friends_guid={$vars['friend_guid']}";
- } else if ($vars['owner_guid'] != "") {
- if (is_array($vars['owner_guid'])) {
- $owner_guid = implode(",",$vars['owner_guid']);
- } else {
- $owner_guid = $vars['owner_guid'];
- }
- $url .= "&owner_guid={$owner_guid}";
- }
- if ($tag == "image")
- $url .= "&search_viewtype=gallery";
-
- $url .= "&page_owner=" . page_owner();
-
- $inputtag = get_input('tag');
- if ($inputtag == $tag || (empty($inputtag) && $tag == "all")) {
- // $class = "class=\"filerepo_types_current\"";
- $class = " class=\"selected\" ";
+ $tag = $type->tag;
+ if ($tag != "all") {
+ $label = elgg_echo("file:type:" . $tag);
+ } else {
+ $label = elgg_echo('all');
+ }
+
+ $url = $vars['url'] . "mod/file/search.php?subtype=file";
+ if ($tag != "all")
+ $url .= "&md_type=simpletype&tag=" . urlencode($tag);
+ if (isset($vars['friend_guid']) && $vars['friend_guid'] != false) {
+ $url .= "&friends_guid={$vars['friend_guid']}";
+ } else if ($vars['owner_guid'] != "") {
+ if (is_array($vars['owner_guid'])) {
+ $owner_guid = implode(",",$vars['owner_guid']);
} else {
- $class = "";
+ $owner_guid = $vars['owner_guid'];
}
-
- add_submenu_item($label, $url, 'filetypes');
-
- //echo "<li {$class} ><a href=\"{$url}\">{$label}</a></li>";
-
+ $url .= "&owner_guid={$owner_guid}";
}
+ if ($tag == "image")
+ $url .= "&search_viewtype=gallery";
+ $url .= "&page_owner=" . page_owner();
+
+ $inputtag = get_input('tag');
+ if ($inputtag == $tag || (empty($inputtag) && $tag == "all")) {
+ $class = " class=\"selected\" ";
+ } else {
+ $class = "";
+ }
+
+ add_submenu_item($label, $url, 'filetypes');
+ }
+
?>
- <!-- </p> -->
- </ul>
- </div>
+</ul>
<?php