aboutsummaryrefslogtreecommitdiff
path: root/mod/file
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-25 19:18:09 -0400
committercash <cash.costello@gmail.com>2011-10-25 19:18:09 -0400
commit08910caa0a8750a449db6910bb28d0d1e758c615 (patch)
treeabfb6e85ec8487c246e9f4c5d6e3f6327ccbfa39 /mod/file
parent65bd37c1f0e3e3adb04bd48dad6183bcd3c7e26c (diff)
downloadelgg-08910caa0a8750a449db6910bb28d0d1e758c615.tar.gz
elgg-08910caa0a8750a449db6910bb28d0d1e758c615.tar.bz2
added new view for the full display of objects
Diffstat (limited to 'mod/file')
-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">';