diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-17 12:00:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-17 12:00:58 -0300 |
commit | 228d3697bcd0218605be2e28131574cc85293a2e (patch) | |
tree | 6a59c627f6226bd2b3056b959acc9cc871eb1f8f /views/default/annotation | |
download | elgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.gz elgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.bz2 |
Squashed 'mod/tasks/' content from commit c9b1097
git-subtree-dir: mod/tasks
git-subtree-split: c9b1097ce081d6893f9c939146208559c089dc15
Diffstat (limited to 'views/default/annotation')
-rw-r--r-- | views/default/annotation/task_state_changed.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/views/default/annotation/task_state_changed.php b/views/default/annotation/task_state_changed.php new file mode 100644 index 000000000..dded53101 --- /dev/null +++ b/views/default/annotation/task_state_changed.php @@ -0,0 +1,40 @@ +<?php +/** + * Elgg state changed annotation view + * + * @note To add or remove from the annotation menu, register handlers for the menu:annotation hook. + * + * @uses $vars['annotation'] + */ + +$annotation = $vars['annotation']; + +$owner = get_entity($annotation->owner_guid); +if (!$owner) { + return true; +} +$icon = elgg_view_entity_icon($owner, 'tiny'); +$owner_link = "<a href=\"{$owner->getURL()}\">$owner->name</a>"; + +$menu = elgg_view_menu('annotation', array( + 'annotation' => $annotation, + 'sort_by' => 'priority', + 'class' => 'elgg-menu-hz float-alt', +)); + +$state_action = elgg_echo("tasks:history:$annotation->value"); + +$friendlytime = elgg_view_friendly_time($annotation->time_created); + +$body = <<<HTML +<div class="mbn"> + $menu + $owner_link + <span class="elgg-subtext"> + $state_action + $friendlytime + </span> +</div> +HTML; + +echo elgg_view_image_block($icon, $body); |