You are here

function theme_asset_search_wizard_browse in Asset 6

Same name and namespace in other branches
  1. 5.2 contrib/asset_search/asset_search.module \theme_asset_search_wizard_browse()

Theme the search folder to display a browsable list of pseudo-assets

1 theme call to theme_asset_search_wizard_browse()
asset_search_wizard_results in contrib/asset_search/asset_search.module
Menu callback for asset/wizard/method/search/<type>/<value>

File

contrib/asset_search/asset_search.module, line 162

Code

function theme_asset_search_wizard_browse($folder, $items = array()) {
  $size = 64;
  $links = array();
  foreach ($items as $guid => $asset) {
    $icon = theme('asset_icon', $asset, $size);
    if ($asset->aid >= 0) {
      $links[] = tbl($icon, 'asset/' . $asset->aid, array(), NULL, NULL, FALSE, TRUE);
    }
    else {
      $links[] = tbl($icon, 'asset/wizard/search_preview/' . $asset->cid, array(), NULL, NULL, FALSE, TRUE);
    }
  }
  $output .= '<ul class="asset-directory-browse clear-block">';
  foreach ($links as $link) {
    $output .= '<li>' . $link . '</li>';
  }
  $output .= '</ul>';
  return $output;
}