function theme_datetime_view_style_item in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_views.inc \theme_datetime_view_style_item()
2 theme calls to theme_datetime_view_style_item()
- spaces_contacts_block in spaces_contacts/
spaces_contacts.module - Implementation of hook_block()
- theme_spaces_datetitle_view_style in ./
spaces_views.inc
File
- ./
spaces_views.inc, line 210
Code
function theme_datetime_view_style_item($vars) {
$item = (object) $vars;
$_date = array(
$item->created,
$item->changed,
$item->last_comment_timestamp,
$item->cck_date,
);
foreach ($_date as $t) {
if ($t) {
$d = $t;
break;
}
}
$_user = array(
$item->assign_to,
$item->name,
$item->user,
);
foreach ($_user as $t) {
if ($t) {
$u = $t;
break;
}
}
$_title = array(
$item->subject,
$item->node_title,
// node title gets precedence over group title
$item->title,
);
foreach ($_title as $t) {
if ($t) {
$title = $t;
break;
}
}
$output = "<div class='view-item clear-block'>";
if ($item->type) {
$output .= "<div class=\"view-type\">{$item->type}</div>";
}
if ($d || $u) {
$output .= "<div class='meta'>";
if ($d) {
$output .= "<span class=\"view-date\">{$d}</span>";
}
if ($u) {
$output .= "<span class=\"view-user\">{$u}</span>";
}
$output .= "</div>";
}
$output .= "<div class=\"view-title\">{$title}</div>";
$output .= "</div>";
return $output;
}