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

$widget = $vars['widget'];

$params = array(
	'text' => ' ',
	'href' => "#",
	'class' => 'elgg-widget-collapse-button',
//	'internalid' => "elgg-toggler-widget-$widget->guid"
//	'internalid' => "elgg-widget-collapse-button-$widget->guid"
);
$collapse_link = elgg_view('output/url', $params);

$params = array(
	'text' => ' ',
	'title' => elgg_echo('widget:delete', array($widget->getTitle())),
	'href' => elgg_get_site_url() . "action/widgets/delete?guid=$widget->guid",
	'is_action' => true,
	'class' => 'elgg-widget-delete-button',
	'internalid' => "elgg-widget-delete-button-$widget->guid"
);
$delete_link = elgg_view('output/url', $params);

$params = array(
	'text' => ' ',
	'title' => elgg_echo('widget:edit'),
	'href' => "#",
	'class' => 'elgg-widget-edit-button elgg-toggle',
	'internalid' => "elgg-toggler-widget-$widget->guid"
);
$edit_link = elgg_view('output/url', $params);

echo <<<___END
<div class="elgg-widget-controls">
	$collapse_link
	$delete_link
	$edit_link
</div>
___END;