From a210d4401a00ab875bf29aa189735525551ab7eb Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 3 Apr 2008 13:52:16 +0000 Subject: Marcus Povey * Basic guid browser git-svn-id: https://code.elgg.org/elgg/trunk@391 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/guidbrowser/start.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'mod/guidbrowser/start.php') diff --git a/mod/guidbrowser/start.php b/mod/guidbrowser/start.php index e5a08f02e..2beaf6d89 100644 --- a/mod/guidbrowser/start.php +++ b/mod/guidbrowser/start.php @@ -10,13 +10,37 @@ function guidbrowser_displayentity($entity) { - // display summary - // display full on clickdown + return elgg_view("guidbrowser/entity", + array( + 'entity_guid' => $entity->guid, + 'type' => $entity->type, + 'subtype' => $entity->getSubtype(), + 'full' => elgg_view( + "guidbrowser/entity_full", + array( + 'entity' => $entity, + 'metadata' => get_metadata_for_entity($entity->guid), + 'annotations' => get_annotations($entity->guid) + ) + ) + ) + ); } function guidbrowser_display($offset = 0, $limit = 10, $type = "", $subtype = "") { + $entities = get_entities($type, $subtype, page_owner(), "time_created desc", $limit, $offset); + $display = ""; + + foreach ($entities as $e) + $display .= guidbrowser_displayentity($e); + return elgg_view("guidbrowser/browser", + array( + 'entities' => $display, + 'prevnext' => elgg_view("guidbrowser/prevnext", array("limit" => $limit, "offset" => $offset)) + ) + ); } -- cgit v1.2.3