From eb1f78b48658b9ffaac228652a390102ab886dea Mon Sep 17 00:00:00 2001 From: ewinslow Date: Mon, 21 Feb 2011 20:25:58 +0000 Subject: Refs #2950: Moved widget code to object/widget/* git-svn-id: http://code.elgg.org/elgg/trunk@8386 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/object/widget/elements/controls.php | 47 +++++++++++++++++++++++ views/default/object/widget/elements/settings.php | 13 +++++++ 2 files changed, 60 insertions(+) create mode 100644 views/default/object/widget/elements/controls.php create mode 100644 views/default/object/widget/elements/settings.php (limited to 'views/default/object/widget') diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php new file mode 100644 index 000000000..09f5fc947 --- /dev/null +++ b/views/default/object/widget/elements/controls.php @@ -0,0 +1,47 @@ + ' ', + 'href' => "#", + 'class' => 'elgg-widget-collapse-button', +); +$collapse_link = elgg_view('output/url', $params); + +$delete_link = $edit_link = ''; +if ($widget->canEdit()) { + $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', + 'id' => "elgg-widget-delete-button-$widget->guid" + ); + $delete_link = elgg_view('output/url', $params); + + if ($show_edit) { + $params = array( + 'text' => ' ', + 'title' => elgg_echo('widget:edit'), + 'href' => "#", + 'class' => 'elgg-widget-edit-button elgg-toggle', + 'id' => "elgg-toggler-widget-$widget->guid" + ); + $edit_link = elgg_view('output/url', $params); + } +} + +echo <<<___END + $collapse_link + $delete_link + $edit_link +___END; diff --git a/views/default/object/widget/elements/settings.php b/views/default/object/widget/elements/settings.php new file mode 100644 index 000000000..05cc7b5ce --- /dev/null +++ b/views/default/object/widget/elements/settings.php @@ -0,0 +1,13 @@ + + +
+ +
-- cgit v1.2.3