From 55724ff6f6818f2c1b16d4bacd912ae2eb745fdb Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Aug 2008 12:27:12 +0000 Subject: Added a new latest activity title to the front page git-svn-id: https://code.elgg.org/elgg/trunk@1895 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/pages/views/default/annotation/icon.php | 32 +++++++++++++++++++++++ mod/pages/views/default/annotation/page.php | 40 +++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 mod/pages/views/default/annotation/icon.php create mode 100644 mod/pages/views/default/annotation/page.php (limited to 'mod/pages/views/default/annotation') diff --git a/mod/pages/views/default/annotation/icon.php b/mod/pages/views/default/annotation/icon.php new file mode 100644 index 000000000..cb2548cb2 --- /dev/null +++ b/mod/pages/views/default/annotation/icon.php @@ -0,0 +1,32 @@ +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 = ""; + } + + +?> + +
+ /> +
\ No newline at end of file diff --git a/mod/pages/views/default/annotation/page.php b/mod/pages/views/default/annotation/page.php new file mode 100644 index 000000000..ff06178ec --- /dev/null +++ b/mod/pages/views/default/annotation/page.php @@ -0,0 +1,40 @@ +entity_guid); + + $icon = elgg_view( + "annotation/icon", array( + 'annotation' => $vars['annotation'], + 'size' => 'small', + ) + ); + + $owner_guid = $annotation->owner_guid; + $owner = get_entity($owner_guid); + + $rev = sprintf(elgg_echo('pages:revision'), + friendly_time($annotation->time_created), + + "getURL() . "\">" . $owner->name ."" + ); + + $link = $entity->getURL() . "?rev=" . $annotation->id; + + $info = <<< END + +
{$entity->title}
+
$rev
+END; + + echo elgg_view_listing($icon, $info); +?> \ No newline at end of file -- cgit v1.2.3