aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/widget/elements
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-12-22 08:12:07 -0500
committerCash Costello <cash.costello@gmail.com>2011-12-22 08:12:07 -0500
commite49df853b2cc3a6a9bc2dd527a64951050142eb9 (patch)
tree6f485b560f89331c65fad3993e055a1834b07177 /views/default/object/widget/elements
parent5e5b3705a5ca7b66dfe386490c5570af88b49009 (diff)
parentfea599f1653d7206e34ac33c0c0a668cb587bc20 (diff)
downloadelgg-e49df853b2cc3a6a9bc2dd527a64951050142eb9.tar.gz
elgg-e49df853b2cc3a6a9bc2dd527a64951050142eb9.tar.bz2
Merge branch '1.8' after 1.8.2 release
Conflicts: version.php
Diffstat (limited to 'views/default/object/widget/elements')
-rw-r--r--views/default/object/widget/elements/controls.php49
1 files changed, 8 insertions, 41 deletions
diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php
index 866dcc787..d1d630c4f 100644
--- a/views/default/object/widget/elements/controls.php
+++ b/views/default/object/widget/elements/controls.php
@@ -6,44 +6,11 @@
* @uses $vars['show_edit'] Whether to show the edit button (true)
*/
-$widget = $vars['widget'];
-$show_edit = elgg_extract('show_edit', $vars, true);
-
-$params = array(
- 'text' => ' ',
- 'href' => "#elgg-widget-content-$widget->guid",
- 'class' => 'elgg-widget-collapse-button',
- 'rel' => 'toggle',
-);
-$collapse_link = elgg_view('output/url', $params);
-
-$delete_link = $edit_link = '';
-if ($widget->canEdit()) {
- $params = array(
- 'text' => elgg_view_icon('delete-alt'),
- 'title' => elgg_echo('widget:delete', array($widget->getTitle())),
- 'href' => "action/widgets/delete?widget_guid=$widget->guid",
- 'is_action' => true,
- 'is_trusted' => 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' => elgg_view_icon('settings-alt'),
- 'title' => elgg_echo('widget:edit'),
- 'href' => "#widget-edit-$widget->guid",
- 'class' => "elgg-widget-edit-button",
- 'rel' => 'toggle',
- );
- $edit_link = elgg_view('output/url', $params);
- }
-}
-
-echo <<<___END
- $collapse_link
- $delete_link
- $edit_link
-___END;
+echo elgg_view_menu('widget', array(
+ 'entity' => elgg_extract('widget', $vars),
+ 'params' => array(
+ 'show_edit' => elgg_extract('show_edit', $vars, true)
+ ),
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));