From 83e927036eb70524dd26fb38ceb4b302e3415305 Mon Sep 17 00:00:00 2001 From: sembrestels Date: Thu, 13 Oct 2011 07:01:11 +0200 Subject: Improving wiki listing view. --- views/default/object/dokuwiki.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'views') diff --git a/views/default/object/dokuwiki.php b/views/default/object/dokuwiki.php index 6746567cf..12063b9da 100644 --- a/views/default/object/dokuwiki.php +++ b/views/default/object/dokuwiki.php @@ -2,24 +2,18 @@ $entity = $vars['entity']; $owner_guid = $entity->container_guid; $owner = get_entity($owner_guid); - $icon = elgg_view( - "graphics/icon", array( - 'entity' => $owner, - 'size' => 'small', - ) - ); + + $icon = elgg_view_entity_icon($owner, 'tiny'); - if ($vars['full_view']) { - // - } - elseif ($owner) { - $directory = $CONFIG->dataroot."wikis/".$owner_guid."/pages"; + if ($owner) { + $directory = elgg_get_data_path()."wikis/".$owner_guid."/pages"; $filecount = count(glob("" . $directory . "/*")); - $body = "".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)." (".sprintf(elgg_echo("dokuwiki:pages"), $filecount).")"; - echo elgg_view_listing($icon, $body); + $list_body = "

".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)."

"; + $list_body .= sprintf(elgg_echo("dokuwiki:pages"), $filecount); + echo elgg_view_image_block($icon, $list_body); } else { // shouldn't show wikis from groups you can't see :-P - echo elgg_view_listing("", ""); + echo elgg_view_image_block("", ""); } ?> -- cgit v1.2.3