aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/views/default/annotation
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages/views/default/annotation')
-rw-r--r--mod/pages/views/default/annotation/icon.php26
-rw-r--r--mod/pages/views/default/annotation/page.php42
2 files changed, 24 insertions, 44 deletions
diff --git a/mod/pages/views/default/annotation/icon.php b/mod/pages/views/default/annotation/icon.php
deleted file mode 100644
index 42d32b021..000000000
--- a/mod/pages/views/default/annotation/icon.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * @todo What is this doing here?
- *
- * @package ElggPages
- */
-
-$annotation = $vars['annotation'];
-$entity = get_entity($annotation->entity_guid);
-
-// Get size
-if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
-
-// Get any align and js
-if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
-} else {
- $align = "";
-}
-
-?>
-
-<div class="groupicon">
-<a href="<?php echo $entity->getURL() . "?rev=" . $annotation->id; ?>"><img src="<?php echo $entity->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> /></a>
-</div>
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