From 43c33492d2ab65a783c17559cf8dabd7832e9ea1 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 15 Jan 2011 22:28:46 +0000 Subject: Updated the messages plugin to use the new CSS/HTML git-svn-id: http://code.elgg.org/elgg/trunk@7886 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/messages/views/default/object/messages.php | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 mod/messages/views/default/object/messages.php (limited to 'mod/messages/views/default/object/messages.php') diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php new file mode 100644 index 000000000..9aae6b7a8 --- /dev/null +++ b/mod/messages/views/default/object/messages.php @@ -0,0 +1,75 @@ +readYet = true; +} + +if ($message->toId == elgg_get_page_owner_guid()) { + // received + $user = get_entity($message->fromId); + $icon = elgg_view('profile/icon', array('entity' => $user, 'size' => 'tiny')); + $user_link = elgg_view('output/url', array( + 'href' => "pg/messages/compose?send_to=$user->guid", + 'text' => $user->name, + )); + + if ($message->readYet) { + $class = 'message read'; + } else { + $class = 'message unread'; + } + +} else { + // sent + $user = get_entity($message->toId); + $icon = elgg_view('profile/icon', array('entity' => $user, 'size' => 'tiny')); + $user_link = elgg_view('output/url', array( + 'href' => "pg/messages/compose?send_to=$user->guid", + 'text' => elgg_echo('messages:to_user', array($user->name)), + )); + + $class = 'message read'; +} + +$timestamp = elgg_view_friendly_time($message->time_created); + +$subject_info = ''; +if (!$full) { + $subject_info .= "guid}\" />"; +} +$subject_info .= elgg_view('output/url', array( + 'href' => $message->getURL(), + 'text' => $message->title, +)); + +$delete_link = "" . elgg_view("output/confirmlink", array( + 'href' => "action/messages/delete?guid=" . $message->getGUID(), + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )) . ""; + +$body = <<$user_link +
$subject_info
+
$timestamp
+
$delete_link
+HTML; + +if ($full) { + echo elgg_view_image_block($icon, $body, array('class' => $class)); + echo elgg_view('output/longtext', array('value' => $message->description)); +} else { + echo elgg_view_image_block($icon, $body, array('class' => $class)); +} \ No newline at end of file -- cgit v1.2.3