You are here

function theme_ed_classified_taxonomy in Classified Ads 6.2

Same name and namespace in other branches
  1. 5.2 ed_classified_themefuncs.inc \theme_ed_classified_taxonomy()
  2. 5 ed_classified_themefuncs.inc \theme_ed_classified_taxonomy()
  3. 7.2 ed_classified_themefuncs.inc \theme_ed_classified_taxonomy()

Theme a classified ads taxonomy browser page

1 theme call to theme_ed_classified_taxonomy()
ed_classified_page in ./ed_classified.module
Display a page of classified ads, as appropriate.

File

./ed_classified_themefuncs.inc, line 80
$ Simple text-based classified ads module.

Code

function theme_ed_classified_taxonomy($cats, $ads) {
  module_load_include('inc', 'ed_classified', 'ed_classified_utils');
  $content = '';
  if (user_access('create classified ads')) {
    $content .= '<div class="classified-category-link-add">' . l(t('Create a new ad'), drupal_get_path_alias("node/add/" . EDI_CLASSIFIED_PATH_NAME)) . "</div>\n";
  }
  if (count($cats)) {
    $content .= theme('ed_classified_taxonomy_catlist', $cats);
  }
  if (count($ads)) {
    $content .= theme('ed_classified_taxonomy_ads', $ads);
  }
  if ($pager = theme('pager', NULL, _ed_classified_variable_get('ads_per_page', 10), 0)) {
    $content .= $pager;
  }
  if (count($ads) + count($cats) == 0) {
    $content .= theme('ed_classified_category_adcount', 0);
  }
  return $content;
}