$entity, "handler" => "announcements", "class" => "elgg-menu-hz", "sort_by" => "priority" )); } $entity_icon = elgg_view_entity_icon($entity, "topbar"); if ($full_view) { // show full view (in header) $content = elgg_view("output/longtext", array("value" => $entity->description, "class" => "mtn")); $params = array( "entity" => $entity, "metadata" => $entity_menu, "content" => $content, ); $params = $params + $vars; $full_body = elgg_view("object/elements/summary", $params); $class = "elgg-state-notice"; $announcement_type = $entity->announcement_type; if (!empty($announcement_type)) { $class .= " site-announcement-" . $announcement_type; } echo elgg_view_image_block($entity_icon, $full_body, array("class" => $class)); } else { // listing $subtitle = "" . elgg_echo("site_announcements:edit:startdate") . ": " . date(elgg_echo("friendlytime:date_format"), $entity->startdate); $subtitle .= " " . elgg_echo("site_announcements:edit:enddate") . ": " . date(elgg_echo("friendlytime:date_format"), $entity->enddate); $params = array( "entity" => $entity, "metadata" => $entity_menu, "subtitle" => $subtitle, "content" => $entity->description, ); $params = $params + $vars; $list_body = elgg_view("object/elements/summary", $params); echo elgg_view_image_block($entity_icon, $list_body); }