diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-22 16:36:30 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-22 16:36:30 +0000 |
commit | af5b59b518123a15a7182ebfe2487a9e10f67ee8 (patch) | |
tree | 4fcb24176b2b445acee48869aa816813f03352b6 /mod/pages/views/default/annotation | |
parent | 186f5474e37f9ebde09b9afe2c82fa711402b421 (diff) | |
download | elgg-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')
-rw-r--r-- | mod/pages/views/default/annotation/icon.php | 26 | ||||
-rw-r--r-- | mod/pages/views/default/annotation/page.php | 42 |
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 |