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 | |
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')
-rw-r--r-- | views/default/canvas/layouts/one_column.php | 15 | ||||
-rw-r--r-- | views/default/canvas/layouts/two_column.php | 15 | ||||
-rw-r--r-- | views/default/canvas/layouts/widgets.php | 42 | ||||
-rw-r--r-- | views/default/widgets/editwrapper.php | 32 | ||||
-rw-r--r-- | views/default/widgets/wrapper.php | 36 |
5 files changed, 140 insertions, 0 deletions
diff --git a/views/default/canvas/layouts/one_column.php b/views/default/canvas/layouts/one_column.php index 14b8ebae1..12b31aa4e 100644 --- a/views/default/canvas/layouts/one_column.php +++ b/views/default/canvas/layouts/one_column.php @@ -1,3 +1,18 @@ +<?php
+
+ /**
+ * Elgg one-column layout
+ *
+ * @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/
+ */
+
+?>
+
<!-- main content --> <div id="layout_maincontent"> <div id="wrapper_maincontent"> diff --git a/views/default/canvas/layouts/two_column.php b/views/default/canvas/layouts/two_column.php index 83a690469..9b1cfd17c 100644 --- a/views/default/canvas/layouts/two_column.php +++ b/views/default/canvas/layouts/two_column.php @@ -1,3 +1,18 @@ +<?php + + /** + * Elgg two-column layout + * + * @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/ + */ + +?> + <!-- right sidebar --> <div id="layout_sidebar_right"> <div id="wrapper_sidebar_right"> diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index e69de29bb..e52cc3f08 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -0,0 +1,42 @@ +<?php + + /** + * Elgg widget layout + * + * @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/ + */ + +?> + +<!-- right sidebar --> +<div id="layout_sidebar_right"> +<div id="wrapper_sidebar_right"> + + + <?php echo $vars['area2']; ?> + + +</div><!-- /#wrapper_sidebar_right --> +<p></p><!-- necessary to avoid an ie7 bug? --> +</div><!-- /#layout_sidebar_right --> + + +<!-- main content --> +<div id="layout_maincontent" class="has_sidebar_right"> +<div id="wrapper_maincontent"> + + + <?php echo $vars['area1']; ?> + + +</div><!-- /#wrapper_maincontent --> +<p></p><!-- necessary to avoid an ie7 bug? --> +</div><!-- /#layout_maincontent --> + +<!-- This clearing element should immediately follow the #layout_maincontent to force the #container to contain all child floats --> +<div class="clearfloat"></div>
\ No newline at end of file diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php new file mode 100644 index 000000000..eff8ec2a0 --- /dev/null +++ b/views/default/widgets/editwrapper.php @@ -0,0 +1,32 @@ +<?php
+
+ /**
+ * Elgg edit widget layout
+ *
+ * @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/
+ */
+
+?>
+
+<form>
+
+ <?php
+
+ echo $vars['body'];
+
+ ?>
+
+ <p>
+ <input type="submit" value="<?php
+
+ echo elgg_echo('save');
+
+ ?>" />
+ </p>
+
+</form>
\ No newline at end of file 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 |