aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-10-25 16:34:22 -0700
committerCash Costello <cash.costello@gmail.com>2011-10-25 16:34:22 -0700
commit01119f1713739c4d9b0c2aaa00168a498569c37f (patch)
tree0a09b2166085b5f477761f7131c23e4e6f633958 /mod/file/views/default
parent65bd37c1f0e3e3adb04bd48dad6183bcd3c7e26c (diff)
parent5c43ddc2d58dbe7a280742131f221e4947f73125 (diff)
downloadelgg-01119f1713739c4d9b0c2aaa00168a498569c37f.tar.gz
elgg-01119f1713739c4d9b0c2aaa00168a498569c37f.tar.bz2
Merge pull request #80 from cash/styling_content
Fixes #3960 and #2292 making it easier to style and extend content pages
Diffstat (limited to 'mod/file/views/default')
-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">';