function theme_dir_listing_icon_view in Filebrowser 6.2
Same name and namespace in other branches
- 8 filebrowser.theme.inc \theme_dir_listing_icon_view()
- 7.4 filebrowser.theme.inc \theme_dir_listing_icon_view()
- 7.2 filebrowser.theme.inc \theme_dir_listing_icon_view()
- 7.3 filebrowser.theme.inc \theme_dir_listing_icon_view()
Enter description here ...
Parameters
Node $node:
Return value
string
File
- ./
filebrowser.theme.inc, line 30
Code
function theme_dir_listing_icon_view($node) {
$files =& $node->file_listing;
// Record if directory listing is empty or not.
$directory_empty = TRUE;
$output = "<div class='dir-listing-icon-view'>";
// Considered each file (or directory)
foreach ($files as $file_name => $data) {
// Skip dot folder
if ($file_name == ".") {
continue;
}
// At least one file
$directory_empty = FALSE;
// File extension case
if ($file_name != ".." && $data['kind'] == 0 && $node->folder_presentation->hide_extension) {
$pos = strrpos($data['name'], ".");
$data[FILEBROWSER_DATA_NAME_DISPLAY_NAME] = substr($data['name'], 0, $pos);
}
$thumbnail = _filebrowser_thumbnails_generate($node, $data);
$href = $data['url'];
$title = $data['display-name'] == '..' ? t('Go up') : $data['display-name'];
$new = theme('mark', $data['status']);
$description = $data['description'];
$output .= theme('dir_listing_icon', $data, $thumbnail, $title, $description, $href, $new);
}
$output .= "</div>";
return $output;
}