aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/wrapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets/wrapper.php')
-rw-r--r--views/default/widgets/wrapper.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php
new file mode 100644
index 000000000..93db61725
--- /dev/null
+++ b/views/default/widgets/wrapper.php
@@ -0,0 +1,36 @@
+<?php
+
+ /**
+ * Elgg widget wrapper
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ if ($vars['entity'] instanceof ElggObject && $vars['entity']->subtype = 'widget') {
+ $handler = $vars['entity']->handler;
+ $title = $vars['entity']->title;
+ } else {
+ $handler = "error";
+ $title = elgg_echo("error");
+ }
+
+?>
+
+ <div class="collapsable_box">
+ <div class="collapsable_box_header">
+ <a href="javascript:void(0);" class="toggle_box_contents">-</a><a href="javascript:void(0);" class="toggle_box_edit_panel"><?php echo elgg_echo('edit'); ?></a>
+ <h1><?php
+
+ echo $vars['entity']->title;
+
+ ?></h1></div>
+ <div class="collapsable_box_editpanel"><?php echo elgg_view('widgets/editwrapper',array('body' => elgg_view("widgets/{$handler}/edit",$vars))); ?></div><!-- /collapsable_box_editpanel -->
+ <div class="collapsable_box_content">
+ <?php echo elgg_view("widgets/{$handler}/view",$vars); ?>
+ </div><!-- /.collapsable_box_content -->
+ </div><!-- /.collapsable_box --> \ No newline at end of file