aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/views/default/annotation/page.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-22 16:36:30 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-22 16:36:30 +0000
commitaf5b59b518123a15a7182ebfe2487a9e10f67ee8 (patch)
tree4fcb24176b2b445acee48869aa816813f03352b6 /mod/pages/views/default/annotation/page.php
parent186f5474e37f9ebde09b9afe2c82fa711402b421 (diff)
downloadelgg-af5b59b518123a15a7182ebfe2487a9e10f67ee8.tar.gz
elgg-af5b59b518123a15a7182ebfe2487a9e10f67ee8.tar.bz2
more clean up of the pages plugin to use new HTML/CSS
git-svn-id: http://code.elgg.org/elgg/trunk@7898 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages/views/default/annotation/page.php')
-rw-r--r--mod/pages/views/default/annotation/page.php42
1 files changed, 24 insertions, 18 deletions
diff --git a/mod/pages/views/default/annotation/page.php b/mod/pages/views/default/annotation/page.php
index 53f38831f..87d32e23b 100644
--- a/mod/pages/views/default/annotation/page.php
+++ b/mod/pages/views/default/annotation/page.php
@@ -1,34 +1,40 @@
<?php
/**
- * Default page listing?
+ * Revision view for history page
*
* @package ElggPages
*/
$annotation = $vars['annotation'];
-$entity = get_entity($annotation->entity_guid);
+$page = get_entity($annotation->entity_guid);
-$icon = elgg_view(
- "annotation/icon", array(
- 'annotation' => $vars['annotation'],
- 'size' => 'small',
- )
-);
+$icon = elgg_view("pages/icon", array(
+ 'annotation' => $annotation,
+ 'size' => 'small',
+));
$owner_guid = $annotation->owner_guid;
$owner = get_entity($owner_guid);
+if (!$owner) {
-$rev = elgg_echo('pages:revision',
- array(elgg_view_friendly_time($annotation->time_created)),
- "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>"
-);
+}
+$owner_link = elgg_view('output/url', array(
+ 'href' => $owner->getURL(),
+ 'text' => $owner->name,
+));
-$link = $entity->getURL() . "?rev=" . $annotation->id;
+$date = elgg_view_friendly_time($annotation->time_created);
-$info = <<< END
+$title_link = elgg_view('output/url', array(
+ 'href' => $annotation->getURL(),
+ 'text' => $page->title,
+));
-<div><a href="$link">{$entity->title}</a></div>
-<div>$rev</div>
-END;
+$subtitle = elgg_echo('pages:revision:subtitle', array($date, $owner_link));
-echo elgg_view_listing($icon, $info);
+$body = <<< HTML
+<h3>$title_link</h3>
+<p class="elgg-subtitle">$subtitle</p>
+HTML;
+
+echo elgg_view_image_block($icon, $body); \ No newline at end of file