aboutsummaryrefslogtreecommitdiff
path: root/views/default/canvas/layouts/widgets.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 19:26:37 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 19:26:37 +0000
commit8048313e87b9fd5ab6734e29a0e951524fa33e45 (patch)
tree556f70ba4a4c70cbd4890e1d90317d2a636e2d9e /views/default/canvas/layouts/widgets.php
parent17c17807cc0b63d322d56acfae4f30399041cdb5 (diff)
downloadelgg-8048313e87b9fd5ab6734e29a0e951524fa33e45.tar.gz
elgg-8048313e87b9fd5ab6734e29a0e951524fa33e45.tar.bz2
Standardized more files.
git-svn-id: http://code.elgg.org/elgg/trunk@3554 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/canvas/layouts/widgets.php')
-rw-r--r--views/default/canvas/layouts/widgets.php174
1 files changed, 85 insertions, 89 deletions
diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php
index 04df22bf9..f6c9dec79 100644
--- a/views/default/canvas/layouts/widgets.php
+++ b/views/default/canvas/layouts/widgets.php
@@ -1,32 +1,33 @@
<?php
- /**
- * Elgg widget layout
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
- $widgettypes = get_widget_types();
-
- $owner = page_owner_entity();
-
- $area1widgets = get_widgets(page_owner(),get_context(),1);
- $area2widgets = get_widgets(page_owner(),get_context(),2);
- $area3widgets = get_widgets(page_owner(),get_context(),3);
-
- if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
-
- if (isset($vars['area3'])) $vars['area1'] = $vars['area3'];
- if (isset($vars['area4'])) $vars['area2'] = $vars['area4'];
-
- }
-
- if (is_array($widgettypes) && sizeof($widgettypes) > 0 && $owner && $owner->canEdit()) {
+/**
+ * Elgg widget layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$widgettypes = get_widget_types();
+
+$owner = page_owner_entity();
+
+$area1widgets = get_widgets(page_owner(),get_context(),1);
+$area2widgets = get_widgets(page_owner(),get_context(),2);
+$area3widgets = get_widgets(page_owner(),get_context(),3);
+
+if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
+ if (isset($vars['area3'])) {
+ $vars['area1'] = $vars['area3'];
+ }
+ if (isset($vars['area4'])) {
+ $vars['area2'] = $vars['area4'];
+ }
+}
+
+if (is_array($widgettypes) && sizeof($widgettypes) > 0 && $owner && $owner->canEdit()) {
-
?>
<div id="customise_editpanel">
@@ -37,9 +38,7 @@
<?php
-
foreach($widgettypes as $handler => $widget) {
-
?>
<table class="draggable_widget" cellspacing="0"><tr><td>
@@ -77,24 +76,23 @@
<div id="customise_page_view">
<table cellspacing="0">
- <tr>
- <td colspan="2" align="left" valign="top">
-
- <?php
- if(get_context() == "profile"){
- ?>
- <h2 class="profile_box"><?php echo elgg_echo("widgets:profilebox"); ?></h2>
- <div id="profile_box_widgets">
- <p><small><?php echo elgg_echo('widgets:position:fixed'); ?></small></p>
- </div>
- <?php
- }
- ?>
-
- </td>
-
-
- <td rowspan="2" align="left" valign="top">
+<tr>
+ <td colspan="2" align="left" valign="top">
+
+ <?php
+ if(get_context() == "profile"){
+ ?>
+ <h2 class="profile_box"><?php echo elgg_echo("widgets:profilebox"); ?></h2>
+ <div id="profile_box_widgets">
+ <p><small><?php echo elgg_echo('widgets:position:fixed'); ?></small></p>
+ </div>
+ <?php
+ }
+ ?>
+
+ </td>
+
+ <td rowspan="2" align="left" valign="top">
<h2><?php echo elgg_echo("widgets:rightcolumn"); ?></h2>
<div id="rightcolumn_widgets" <?php if(get_context() == "profile")echo "class=\"long\""; ?>>
<?php
@@ -106,12 +104,12 @@
}
$rightcolumn_widgets .= "{$widget->handler}::{$widget->getGUID()}";
?>
-
+
<table class="draggable_widget" cellspacing="0"><tr><td width="149px">
<h3>
<?php echo $widgettypes[$widget->handler]->name; ?>
- <input type="hidden" name="handler" value="<?php
- echo $widget->handler;
+ <input type="hidden" name="handler" value="<?php
+ echo $widget->handler;
?>" />
<input type="hidden" name="multiple" value="<?php echo $widgettypes[$widget->handler]->multiple; ?>" />
<input type="hidden" name="side" value="<?php echo in_array('side',$widgettypes[$widget->handler]->positions); ?>" />
@@ -124,19 +122,19 @@
<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14px" height="14px" class="more_info" /></a></td>
<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15px" height="15px" class="drag_handle" /></a></td>
</tr></table>
-
+
<?php
-
+
}
}
?>
-
+
</div>
- </td><!-- /rightcolumn td -->
-
- </tr>
-
- <tr>
+ </td><!-- /rightcolumn td -->
+
+</tr>
+
+<tr>
<td>
<h2><?php echo elgg_echo("widgets:leftcolumn"); ?></h2>
@@ -155,8 +153,8 @@
<table class="draggable_widget" cellspacing="0"><tr><td width="149px">
<h3>
<?php echo $widgettypes[$widget->handler]->name; ?>
- <input type="hidden" name="handler" value="<?php
- echo $widget->handler;
+ <input type="hidden" name="handler" value="<?php
+ echo $widget->handler;
?>" />
<input type="hidden" name="multiple" value="<?php echo $widgettypes[$widget->handler]->multiple; ?>" />
<input type="hidden" name="side" value="<?php echo in_array('side',$widgettypes[$widget->handler]->positions); ?>" />
@@ -171,7 +169,7 @@
</tr></table>
<?php
-
+
}
}
?>
@@ -196,8 +194,8 @@
<table class="draggable_widget" cellspacing="0"><tr><td width="149px">
<h3>
<?php echo $widgettypes[$widget->handler]->name; ?>
- <input type="hidden" name="handler" value="<?php
- echo $widget->handler;
+ <input type="hidden" name="handler" value="<?php
+ echo $widget->handler;
?>" />
<input type="hidden" name="multiple" value="<?php echo $widgettypes[$widget->handler]->multiple; ?>" />
<input type="hidden" name="side" value="<?php echo in_array('side',$widgettypes[$widget->handler]->positions); ?>" />
@@ -212,7 +210,7 @@
</tr></table>
<?php
-
+
}
}
?>
@@ -244,20 +242,20 @@
</div><!-- /customise_editpanel -->
<?php
-
+
}
-
+
?>
<table cellspacing="0" id="widget_table">
- <tr>
- <td colspan="2" align="left" valign="top" height="1px">
+<tr>
+ <td colspan="2" align="left" valign="top" height="1px">
<!-- profile box or 'dashboard info' notice -->
<?php if (isset($vars['area1'])) echo $vars['area1']; ?>
</td>
- <td rowspan="2" align="left" valign="top" height="100%">
- <?php
+ <td rowspan="2" align="left" valign="top" height="100%">
+ <?php
if($_SESSION['user']->guid == page_owner()){
?>
<!-- customise page button -->
@@ -269,54 +267,52 @@
<div id="widgets_right">
<?php
-
+
if (is_array($area3widgets) && sizeof($area3widgets) > 0)
foreach($area3widgets as $widget) {
echo elgg_view_entity($widget);
}
?>
-
- </div><!-- /#widgets_right -->
- </td>
- </tr>
- <tr>
+
+ </div><!-- /#widgets_right -->
+ </td>
+</tr>
+<tr>
<td align="left" valign="top">
-
+
<!-- left widgets -->
<div id="widgets_left">
-
+
<?php
-
+
if (is_array($area1widgets) && sizeof($area1widgets) > 0)
foreach($area1widgets as $widget) {
echo elgg_view_entity($widget);
}
?>
-
+
</div><!-- /#widgets_left -->
-
+
</td>
<td align="left" valign="top">
-
+
<!-- widgets middle -->
<div id="widgets_middle">
-
+
<?php if (isset($vars['area2'])) echo $vars['area2']; ?>
<?php
-
+
if (is_array($area2widgets) && sizeof($area2widgets) > 0)
foreach($area2widgets as $widget) {
echo elgg_view_entity($widget);
}
-
+
?>
-
+
</div><!-- /#widgets_middle -->
-
+
</td>
</tr>
-</table>
-
-
+</table> \ No newline at end of file