aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/controls.php
blob: 891a53595f3ea0cbcaac9216620eb53d67c61ae3 (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
<?php
/**
 * Elgg widget controls
 *
 * @package Elgg
 * @subpackage Core
 */

$widget = $vars['widget'];

$params = array(
	'text' => 'delete',
	'href' => elgg_get_site_url() . "action/widgets/delete?guid=$widget->guid",
	'is_action' => true,
	'class' => 'widget_delete_button',
	'internalid' => "widget_delete_button_$widget->guid"
);
$delete_link = elgg_view('output/url', $params);

$params = array(
	'text' => 'edit',
	'href' => "#",
	'class' => 'widget_edit_button',
	'internalid' => "widget_edit_button_$widget->guid"
);
$edit_link = elgg_view('output/url', $params);

echo <<<___END
<ul>
	<li>$delete_link</li>
	<li>$edit_link</li>
</ul>
___END;