aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/components
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/default/page/components
parent67d692b76b079a75a0ad7ca1fb73ce6333a61789 (diff)
downloadelgg-1b3f527c0ba8a39cb0b81bd5ffca0d91db29af99.tar.gz
elgg-1b3f527c0ba8a39cb0b81bd5ffca0d91db29af99.tar.bz2
Fixes #4047 header and footer optional for the module view
Diffstat (limited to 'views/default/page/components')
-rw-r--r--views/default/page/components/module.php22
1 files changed, 8 insertions, 14 deletions
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;