blob: f2038f88b1217b6bdcc1be842a9a3f712087ccc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?php
/**
* List metadata for objects
*
* @uses $vars['entity']
* @uses $vars['handler']
*/
$entity = $vars['entity'];
$handler = elgg_get_array_value('handler', $vars, '');
?>
<ul class="elgg-list-metadata">
<li>
<?php echo elgg_view('output/access', array('entity' => $entity)); ?>
</li>
<?php
$likes = elgg_view_likes($entity);
echo "<li>$likes</li>";
// pass <li>your data</li> back from the view
echo elgg_view("entity/metadata", array('entity' => $entity));
// links to delete or edit.
if ($entity->canEdit() && $handler) {
$edit_url = "pg/$handler/edit/{$entity->getGUID()}";
$edit_link = elgg_view('output/url', array(
'href' => $edit_url,
'text' => elgg_echo('edit'),
));
echo "<li>$edit_link</li>";
$delete_url = "action/$handler/delete?guid={$entity->getGUID()}";
$delete_link = elgg_view('output/confirmlink', array(
'href' => $delete_url,
'text' => '<span class="elgg-icon elgg-icon-delete"></span>',
'title' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm'),
'text_encode' => false,
));
echo "<li>$delete_link</li>";
}
?>
</ul>
|