diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-12 14:27:19 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-12 14:27:19 +0000 |
commit | fdd4b36f9cfc7be1959c57795720cda084382c32 (patch) | |
tree | 8e473b486084a3facb717d876854b3e8a71ac7ea /views/default/widgets/wrapper.php | |
parent | 504e579f97b601634015172bb0ed01fd08578ee7 (diff) | |
download | elgg-fdd4b36f9cfc7be1959c57795720cda084382c32.tar.gz elgg-fdd4b36f9cfc7be1959c57795720cda084382c32.tar.bz2 |
Widget wrapper, widget views
git-svn-id: https://code.elgg.org/elgg/trunk@893 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/widgets/wrapper.php')
-rw-r--r-- | views/default/widgets/wrapper.php | 36 |
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 |