You are here

function theme_filefield_source_reference_autocomplete_item in FileField Sources 7

Same name and namespace in other branches
  1. 6 sources/reference.inc \theme_filefield_source_reference_autocomplete_item()

Theme the output of a single item in the autocomplete list.

1 theme call to theme_filefield_source_reference_autocomplete_item()
filefield_source_reference_autocomplete in sources/reference.inc
Menu callback; autocomplete.js callback to return a list of files.

File

sources/reference.inc, line 197
A FileField extension to allow referencing of existing files.

Code

function theme_filefield_source_reference_autocomplete_item($variables) {
  $file = $variables['file'];
  $output = '';
  $output .= '<div class="filefield-source-reference-item">';
  $output .= '<span class="filename">' . check_plain($file->filename) . '</span> <span class="filesize">(' . format_size($file->filesize) . ')</span>';
  $output .= '</div>';
  return $output;
}