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/page/components/widget.php | 70 -------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 views/default/page/components/widget.php (limited to 'views/default/page/components') diff --git a/views/default/page/components/widget.php b/views/default/page/components/widget.php deleted file mode 100644 index e7a16b318..000000000 --- a/views/default/page/components/widget.php +++ /dev/null @@ -1,70 +0,0 @@ -handler; - -$title = $widget->getTitle(); - -$edit_area = ''; -$can_edit = $widget->canEdit(); -if ($can_edit) { - $edit_area = elgg_view('layout/objects/widget/settings', array( - 'widget' => $widget, - 'show_access' => $show_access, - )); -} -$controls = elgg_view('layout/objects/widget/controls', array( - 'widget' => $widget, - 'show_edit' => $edit_area != '', -)); - -// don't show content for default widgets -if (elgg_in_context('default_widgets')) { - $content = ''; -} else { - if (elgg_view_exists("widgets/$handler/content")) { - $content = elgg_view("widgets/$handler/content", $vars); - } else { - elgg_deprecated_notice("widgets use content as the display view", 1.8); - $content = elgg_view("widgets/$handler/view", $vars); - } -} - -$widget_id = "elgg-widget-$widget->guid"; -$widget_instance = "elgg-widget-instance-$handler"; -$widget_class = "elgg-module elgg-module-widget"; -if ($can_edit) { - $widget_class .= " elgg-state-draggable $widget_instance"; -} else { - $widget_class .= " elgg-state-fixed $widget_instance"; -} - -echo << -
-

$title

- $controls -
-
- $edit_area -
- $content -
-
- -HTML; -- cgit v1.2.3