aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/layouts
diff options
context:
space:
mode:
authorFx Nion <http://fxnion.free.fr>2012-05-13 19:56:15 +0200
committerSem <sembrestels@riseup.net>2012-05-13 19:56:15 +0200
commitb070daa95241bc0c7d46011a3de7674fbf0c5e68 (patch)
tree638f771d1708194ab4a1cfb9614b73cd9fbaca5f /views/default/page/layouts
downloadelgg-b070daa95241bc0c7d46011a3de7674fbf0c5e68.tar.gz
elgg-b070daa95241bc0c7d46011a3de7674fbf0c5e68.tar.bz2
v2.4
Diffstat (limited to 'views/default/page/layouts')
-rw-r--r--views/default/page/layouts/edit_widgets.php61
-rw-r--r--views/default/page/layouts/index.php30
-rw-r--r--views/default/page/layouts/index_1rsss.php30
-rw-r--r--views/default/page/layouts/index_2rbhh.php30
-rw-r--r--views/default/page/layouts/index_2rbms.php30
-rw-r--r--views/default/page/layouts/index_2rbsm.php28
-rw-r--r--views/default/page/layouts/index_2rhhb.php30
-rw-r--r--views/default/page/layouts/index_2rmsb.php30
-rw-r--r--views/default/page/layouts/index_2rsmb.php30
9 files changed, 299 insertions, 0 deletions
diff --git a/views/default/page/layouts/edit_widgets.php b/views/default/page/layouts/edit_widgets.php
new file mode 100644
index 000000000..f61cea356
--- /dev/null
+++ b/views/default/page/layouts/edit_widgets.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Elgg widgets layout
+ *
+ * @uses $vars['content'] Optional display box at the top of layout
+ * @uses $vars['num_columns'] Number of widget columns for this layout (3)
+ * @uses $vars['show_add_widgets'] Display the add widgets button and panel (true)
+ * @uses $vars['exact_match'] Widgets must match the current context (false)
+ * @uses $vars['show_access'] Show the access control (true)
+ */
+
+$num_columns = elgg_extract('num_columns', $vars, 3);
+$show_add_widgets = elgg_extract('show_add_widgets', $vars, true);
+$exact_match = elgg_extract('exact_match', $vars, false);
+$show_access = elgg_extract('show_access', $vars, true);
+
+$owner = elgg_get_page_owner_entity();
+
+$widget_types = elgg_get_widget_types();
+
+$context = elgg_get_context();
+//elgg_push_context('widgets');
+
+$widgets = elgg_get_widgets($owner->guid, $context);
+
+if (elgg_can_edit_widget_layout($context)) {
+ if ($show_add_widgets) {
+ echo elgg_view('page/layouts/widgets/add_button');
+ }
+ $params = array(
+ 'widgets' => $widgets,
+ 'context' => $context,
+ 'exact_match' => $exact_match,
+ );
+ echo elgg_view('page/layouts/widgets/add_panel', $params);
+}
+
+echo $vars['content'];
+
+$widget_class = "elgg-col-1of{$num_columns}";
+for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
+ if (isset($widgets[$column_index])) {
+ $column_widgets = $widgets[$column_index];
+ } else {
+ $column_widgets = array();
+ }
+
+ echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">";
+ if (sizeof($column_widgets) > 0) {
+ foreach ($column_widgets as $widget) {
+ if (array_key_exists($widget->handler, $widget_types)) {
+ echo elgg_view_entity($widget, array('show_access' => $show_access));
+ }
+ }
+ }
+ echo '</div>';
+}
+
+elgg_pop_context();
+
+echo elgg_view('graphics/ajax_loader', array('id' => 'elgg-widget-loader'));
diff --git a/views/default/page/layouts/index.php b/views/default/page/layouts/index.php
new file mode 100644
index 000000000..a73a0d7b1
--- /dev/null
+++ b/views/default/page/layouts/index.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="leftcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr >
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/views/default/page/layouts/index_1rsss.php b/views/default/page/layouts/index_1rsss.php
new file mode 100644
index 000000000..c99bdd720
--- /dev/null
+++ b/views/default/page/layouts/index_1rsss.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="leftcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr >
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/views/default/page/layouts/index_2rbhh.php b/views/default/page/layouts/index_2rbhh.php
new file mode 100644
index 000000000..7f8c22437
--- /dev/null
+++ b/views/default/page/layouts/index_2rbhh.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="leftcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="rightcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/views/default/page/layouts/index_2rbms.php b/views/default/page/layouts/index_2rbms.php
new file mode 100644
index 000000000..fdb0cf38b
--- /dev/null
+++ b/views/default/page/layouts/index_2rbms.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="leftcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top" class="medium">
+ <div id="middlecolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="small">
+ <div id="rightcolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/views/default/page/layouts/index_2rbsm.php b/views/default/page/layouts/index_2rbsm.php
new file mode 100644
index 000000000..d5a81f1f5
--- /dev/null
+++ b/views/default/page/layouts/index_2rbsm.php
@@ -0,0 +1,28 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="leftcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top" class="small">
+ <div id="middlecolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="medium">
+ <div id="rightcolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table> \ No newline at end of file
diff --git a/views/default/page/layouts/index_2rhhb.php b/views/default/page/layouts/index_2rhhb.php
new file mode 100644
index 000000000..ae2995ff9
--- /dev/null
+++ b/views/default/page/layouts/index_2rhhb.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="leftcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/views/default/page/layouts/index_2rmsb.php b/views/default/page/layouts/index_2rmsb.php
new file mode 100644
index 000000000..a774a4a42
--- /dev/null
+++ b/views/default/page/layouts/index_2rmsb.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="medium">
+ <div id="leftcolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="small">
+ <div id="middlecolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/views/default/page/layouts/index_2rsmb.php b/views/default/page/layouts/index_2rsmb.php
new file mode 100644
index 000000000..72bb92d3d
--- /dev/null
+++ b/views/default/page/layouts/index_2rsmb.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="small">
+ <div id="leftcolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="medium">
+ <div id="middlecolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+