aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default/object
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views/default/object')
-rw-r--r--mod/file/views/default/object/file.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 874d8fb07..81421133f 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -19,8 +19,6 @@ $excerpt = elgg_get_excerpt($file->description);
$mime = $file->mimetype;
$base_type = substr($mime, 0, strpos($mime,'/'));
-$body = elgg_view('output/longtext', array('value' => $file->description));
-
$owner_link = elgg_view('output/url', array(
'href' => "file/owner/$owner->username",
'text' => $owner->name,
@@ -69,8 +67,6 @@ if ($full && !elgg_in_context('gallery')) {
$extra = elgg_view("file/specialcontent/$base_type/default", $vars);
}
- $header = elgg_view_title($file->title);
-
$params = array(
'entity' => $file,
'title' => false,
@@ -79,17 +75,18 @@ if ($full && !elgg_in_context('gallery')) {
'tags' => $tags,
);
$params = $params + $vars;
- $list_body = elgg_view('object/elements/summary', $params);
+ $summary = elgg_view('object/elements/summary', $params);
- $file_info = elgg_view_image_block($file_icon, $list_body);
+ $text = elgg_view('output/longtext', array('value' => $file->description));
+ $body = "$text $extra";
- echo <<<HTML
-$file_info
-<div class="file elgg-content">
- $body
- $extra
-</div>
-HTML;
+ echo elgg_view('object/elements/full', array(
+ 'entity' => $file,
+ 'title' => false,
+ 'icon' => $file_icon,
+ 'summary' => $summary,
+ 'body' => $body,
+ ));
} elseif (elgg_in_context('gallery')) {
echo '<div class="file-gallery-item">';