function theme_ed_classified_category_list_row in Classified Ads 7.2
Same name and namespace in other branches
- 5.2 ed_classified_themefuncs.inc \theme_ed_classified_category_list_row()
- 5 ed_classified_themefuncs.inc \theme_ed_classified_category_list_row()
- 6.2 ed_classified_themefuncs.inc \theme_ed_classified_category_list_row()
1 theme call to theme_ed_classified_category_list_row()
File
- ./
ed_classified_themefuncs.inc, line 117 - $ Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All…
Code
function theme_ed_classified_category_list_row($cat, $row_count) {
$content = '';
$row_style = $row_count % 2 == 0 ? 'even' : 'odd';
$content .= "<li class ='{$row_style}' >";
// 'preview' (was thumbnail of latest image)
// if ($cat->count)
// $content.= l('foo', _ed_classified_make_category_path($cat->tid), array('html' => TRUE));
$content .= theme('ed_classified_category_name', $cat);
// Removed the description from below the name, instead it is integrated with the name
// (i.e. it appears as a title in there)
//if(trim($cat->description) != '') {
// $content .= theme('ed_classified_category_description', $cat);
//}
// TODO: get preview list
if ($cat->latest) {
$content .= '<div class=\'title\'>' . t('Latest ad: ') . l($cat->latest->title, drupal_get_path_alias('node/' . $cat->latest->nid)) . '</div>';
$content .= '<div class=\'created\'>' . t('Created on ') . format_date($cat->latest->created) . ' (' . format_interval(REQUEST_TIME - $cat->latest->created) . t(' ago') . ')</div>';
}
$content .= '<div class="status">';
$content .= theme('ed_classified_category_adcount', $cat->count);
if ($cat->latest->changed) {
$content .= t(' Last updated: !date', array(
'!date' => format_date($cat->latest->changed),
));
}
$content .= "</div>\n";
// class="status"
$content .= "</li>\n";
return $content;
}