aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-04 06:31:11 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-04 06:31:11 -0400
commit1b3f527c0ba8a39cb0b81bd5ffca0d91db29af99 (patch)
treea0a6ca1a4e0c113e9e1553e7a1b739d4abc8f9d1 /views
parent67d692b76b079a75a0ad7ca1fb73ce6333a61789 (diff)
downloadelgg-1b3f527c0ba8a39cb0b81bd5ffca0d91db29af99.tar.gz
elgg-1b3f527c0ba8a39cb0b81bd5ffca0d91db29af99.tar.bz2
Fixes #4047 header and footer optional for the module view
Diffstat (limited to 'views')
-rw-r--r--views/default/core/walled_garden/login.php6
-rw-r--r--views/default/core/walled_garden/lost_password.php2
-rw-r--r--views/default/core/walled_garden/register.php2
-rw-r--r--views/default/page/components/module.php22
4 files changed, 17 insertions, 15 deletions
diff --git a/views/default/core/walled_garden/login.php b/views/default/core/walled_garden/login.php
index 069422bfa..0a8b4a908 100644
--- a/views/default/core/walled_garden/login.php
+++ b/views/default/core/walled_garden/login.php
@@ -30,4 +30,8 @@ $content = <<<HTML
</div>
HTML;
-echo elgg_view_module('walledgarden', '', $content, array('class' => 'elgg-walledgarden-double'));
+echo elgg_view_module('walledgarden', '', $content, array(
+ 'class' => 'elgg-walledgarden-double',
+ 'header' => ' ',
+ 'footer' => ' ',
+));
diff --git a/views/default/core/walled_garden/lost_password.php b/views/default/core/walled_garden/lost_password.php
index 60356aaf0..ce75b558b 100644
--- a/views/default/core/walled_garden/lost_password.php
+++ b/views/default/core/walled_garden/lost_password.php
@@ -14,4 +14,6 @@ HTML;
echo elgg_view_module('walledgarden', '', $lost, array(
'class' => 'elgg-walledgarden-single elgg-walledgarden-password hidden',
+ 'header' => ' ',
+ 'footer' => ' ',
));
diff --git a/views/default/core/walled_garden/register.php b/views/default/core/walled_garden/register.php
index 951bd7295..7f6aac99b 100644
--- a/views/default/core/walled_garden/register.php
+++ b/views/default/core/walled_garden/register.php
@@ -18,4 +18,6 @@ __HTML;
echo elgg_view_module('walledgarden', '', $content, array(
'class' => 'elgg-walledgarden-single elgg-walledgarden-register hidden',
+ 'header' => ' ',
+ 'footer' => ' ',
)); \ No newline at end of file
diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php
index b1198ee9a..0a2f1c35a 100644
--- a/views/default/page/components/module.php
+++ b/views/default/page/components/module.php
@@ -2,10 +2,10 @@
/**
* Elgg module element
*
- * @uses $vars['title'] Title text
- * @uses $vars['header'] HTML content of the header
+ * @uses $vars['title'] Optional title text (do not pass header with this option)
+ * @uses $vars['header'] Optional HTML content of the header
* @uses $vars['body'] HTML content of the body
- * @uses $vars['footer'] HTML content of the footer
+ * @uses $vars['footer'] Optional HTML content of the footer
* @uses $vars['class'] Optional additional class for module
* @uses $vars['id'] Optional id for module
* @uses $vars['show_inner'] Optional flag to leave out inner div (default: false)
@@ -28,22 +28,16 @@ if (isset($vars['id'])) {
$id = "id=\"{$vars['id']}\"";
}
-if (isset($vars['header'])) {
- if ($vars['header']) {
- $header = "<div class=\"elgg-head\">$header</div>";
- }
-} else {
+if ($vars['header']) {
+ $header = "<div class=\"elgg-head\">$header</div>";
+} elseif ($title) {
$header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
}
$body = "<div class=\"elgg-body\">$body</div>";
-if (isset($vars['footer'])) {
- if ($vars['footer']) {
- $footer = "<div class=\"elgg-foot\">$footer</div>";
- }
-} else {
- $footer = "<div class=\"elgg-foot\"></div>";
+if ($footer) {
+ $footer = "<div class=\"elgg-foot\">$footer</div>";
}
$contents = $header . $body . $footer;