diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-16 19:26:37 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-16 19:26:37 +0000 |
commit | 8048313e87b9fd5ab6734e29a0e951524fa33e45 (patch) | |
tree | 556f70ba4a4c70cbd4890e1d90317d2a636e2d9e /views/default/canvas/layouts | |
parent | 17c17807cc0b63d322d56acfae4f30399041cdb5 (diff) | |
download | elgg-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')
-rw-r--r-- | views/default/canvas/layouts/edit_layout.php | 20 | ||||
-rw-r--r-- | views/default/canvas/layouts/one_column.php | 20 | ||||
-rw-r--r-- | views/default/canvas/layouts/sidebar_boxes.php | 24 | ||||
-rw-r--r-- | views/default/canvas/layouts/two_column_left_sidebar.php | 28 | ||||
-rw-r--r-- | views/default/canvas/layouts/two_column_right_sidebar.php | 25 | ||||
-rw-r--r-- | views/default/canvas/layouts/widgets.php | 174 |
6 files changed, 136 insertions, 155 deletions
diff --git a/views/default/canvas/layouts/edit_layout.php b/views/default/canvas/layouts/edit_layout.php index b43ff4255..0d2997965 100644 --- a/views/default/canvas/layouts/edit_layout.php +++ b/views/default/canvas/layouts/edit_layout.php @@ -1,16 +1,12 @@ <?php - - /** - * Elgg 2 column right sidebar canvas layout - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - */ - +/** + * Elgg 2 column right sidebar canvas layout + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ ?> <div id="blog_edit_page"> diff --git a/views/default/canvas/layouts/one_column.php b/views/default/canvas/layouts/one_column.php index bb5681f4c..c71c2def6 100644 --- a/views/default/canvas/layouts/one_column.php +++ b/views/default/canvas/layouts/one_column.php @@ -1,14 +1,12 @@ <?php - - /** - * Elgg one-column layout - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ - +/** + * Elgg one-column layout + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ ?> <!-- main content --> @@ -16,4 +14,4 @@ <?php echo $vars['area1']; ?> -</div><!-- /one_column -->
\ No newline at end of file +</div><!-- /one_column -->
\ No newline at end of file diff --git a/views/default/canvas/layouts/sidebar_boxes.php b/views/default/canvas/layouts/sidebar_boxes.php index f6ae93a2c..d639901c0 100644 --- a/views/default/canvas/layouts/sidebar_boxes.php +++ b/views/default/canvas/layouts/sidebar_boxes.php @@ -1,23 +1,19 @@ <?php - - /** - * Elgg 2 column left sidebar with boxes - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - */ - +/** + * Elgg 2 column left sidebar with boxes + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ ?> <!-- left sidebar --> <div id="two_column_left_sidebar_boxes"> - <?php if (isset($vars['area1'])) echo $vars['area1']; ?> - <?php if (isset($vars['area3'])) echo $vars['area3']; ?> + <?php if (isset($vars['area1'])) echo $vars['area1']; ?> + <?php if (isset($vars['area3'])) echo $vars['area3']; ?> </div><!-- /two_column_left_sidebar --> diff --git a/views/default/canvas/layouts/two_column_left_sidebar.php b/views/default/canvas/layouts/two_column_left_sidebar.php index 4be8939bb..40eb77b1a 100644 --- a/views/default/canvas/layouts/two_column_left_sidebar.php +++ b/views/default/canvas/layouts/two_column_left_sidebar.php @@ -1,25 +1,23 @@ <?php - - /** - * Elgg 2 column left sidebar canvas layout - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ - +/** + * Elgg 2 column left sidebar canvas layout + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ ?> <!-- left sidebar --> <div id="two_column_left_sidebar"> - <?php + <?php + + echo elgg_view('page_elements/owner_block',array('content' => $vars['area1'])); - echo elgg_view('page_elements/owner_block',array('content' => $vars['area1'])); - - ?> + ?> - <?php if (isset($vars['area3'])) echo $vars['area3']; ?> + <?php if (isset($vars['area3'])) echo $vars['area3']; ?> </div><!-- /two_column_left_sidebar --> diff --git a/views/default/canvas/layouts/two_column_right_sidebar.php b/views/default/canvas/layouts/two_column_right_sidebar.php index ab38e6529..feaa993b5 100644 --- a/views/default/canvas/layouts/two_column_right_sidebar.php +++ b/views/default/canvas/layouts/two_column_right_sidebar.php @@ -1,22 +1,20 @@ <?php - - /** - * Elgg 2 column right sidebar canvas layout - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ - +/** + * Elgg 2 column right sidebar canvas layout + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ ?> <!-- main content --> <div id="two_column_right_sidebar_maincontent"> <?php - echo elgg_view('page_elements/owner_block',array('content' => $vars['area1'])); - if (isset($vars['area2'])) echo $vars['area2']; ?> +echo elgg_view('page_elements/owner_block',array('content' => $vars['area1'])); +if (isset($vars['area2'])) echo $vars['area2']; ?> </div><!-- /two_column_right_sidebar_maincontent --> @@ -25,5 +23,4 @@ <?php if (isset($vars['area1'])) echo $vars['area1']; ?> -</div><!-- /two_column_right_sidebar --> - +</div><!-- /two_column_right_sidebar -->
\ No newline at end of file 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 |