diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/object/dokuwiki.php | 22 |
1 files changed, 8 insertions, 14 deletions
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 = "<a href='".$vars['url']."pg/dokuwiki/".$owner_guid."'>".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)." (".sprintf(elgg_echo("dokuwiki:pages"), $filecount).")</a>"; - echo elgg_view_listing($icon, $body); + $list_body = "<h3><a href='".$entity->getURL()."'>".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)."</a></h3>"; + $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("", ""); } ?> |