function theme_dir_listing_icon_view in Filebrowser 7.4
Same name and namespace in other branches
- 8 filebrowser.theme.inc \theme_dir_listing_icon_view()
- 6.2 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 14 - Several theme functions for filebrowser
Code
function theme_dir_listing_icon_view($node) {
$node = $node['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['display-name'], ".");
$data[FILEBROWSER_DATA_NAME_DISPLAY_NAME] = substr($data['display-name'], 0, $pos);
}
$variables = array(
'data' => $data,
'thumbnail' => _filebrowser_thumbnails_generate($node, $data),
'href' => $data['url'],
'title' => $data['display-name'] == '..' ? t('Go up') : $data['display-name'],
'new' => theme('mark', array(
'type' => $data['status'],
)),
'description' => $data['description'],
);
$output .= theme('dir_listing_icon', $variables);
}
$output .= "</div>";
return $output;
}