diff options
author | sembrestels <sembrestels@riseup.net> | 2011-10-13 07:01:11 +0200 |
---|---|---|
committer | sembrestels <sembrestels@riseup.net> | 2011-10-13 07:01:11 +0200 |
commit | 83e927036eb70524dd26fb38ceb4b302e3415305 (patch) | |
tree | b0d4d98b23cf6e3fcb6137bb6c0b75f46433ba0e /views/default | |
parent | bb5b0e00cf18bcd8e2b628d1d84dbca73ee79730 (diff) | |
download | elgg-83e927036eb70524dd26fb38ceb4b302e3415305.tar.gz elgg-83e927036eb70524dd26fb38ceb4b302e3415305.tar.bz2 |
Improving wiki listing view.
Diffstat (limited to 'views/default')
-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("", ""); } ?> |