From e34163a6f0af509bb274842310f21e7a23b503dc Mon Sep 17 00:00:00 2001 From: inghamn Date: Thu, 7 Jan 2010 16:19:46 +0000 Subject: [PATCH] The about information is now part of panel-one. It is displayed unless you specifically add other content to panel-one git-svn-id: https://rosehill.googlecode.com/svn/branches/php@38 100bd78a-fc82-11de-b5bc-ffd2847a4b57 --- blocks/html/about.inc | 26 -------------- html/cemeteries/home.php | 5 ++- html/cemeteries/viewCemetery.php | 10 ++---- html/interments/home.php | 1 - templates/html/partials/panel-one.inc | 49 +++++++++++++++++++++++++-- 5 files changed, 52 insertions(+), 39 deletions(-) delete mode 100644 blocks/html/about.inc diff --git a/blocks/html/about.inc b/blocks/html/about.inc deleted file mode 100644 index 7ecb364..0000000 --- a/blocks/html/about.inc +++ /dev/null @@ -1,26 +0,0 @@ - -
-

About the Cemeteries

- -

Website Support

- - -
-
-
Rose Hill Cemetery" />
-
White Oak Cemetery" />
-
diff --git a/html/cemeteries/home.php b/html/cemeteries/home.php index d415a8b..ef939b2 100644 --- a/html/cemeteries/home.php +++ b/html/cemeteries/home.php @@ -1,13 +1,12 @@ */ - $cemeteryList = new CemeteryList(); $cemeteryList->find(); -$template = new Template(); +$template = isset($_GET['format']) ? new Template('default',$_GET['format']) : new Template(); $template->blocks[] = new Block('cemeteries/cemeteryList.inc',array('cemeteryList'=>$cemeteryList)); echo $template->render(); \ No newline at end of file diff --git a/html/cemeteries/viewCemetery.php b/html/cemeteries/viewCemetery.php index e91f34e..fa1078b 100644 --- a/html/cemeteries/viewCemetery.php +++ b/html/cemeteries/viewCemetery.php @@ -19,12 +19,8 @@ catch (Exception $e) { } - -if (isset($_GET['format'])) { - $template = new Template('default',$_GET['format']); -} -else { - $template = new Template(); -} +$template = isset($_GET['format']) + ? new Template('default',$_GET['format']) + : $template = new Template(); $template->blocks[] = new Block('cemeteries/cemeteryInfo.inc',array('cemetery'=>$cemetery)); echo $template->render(); diff --git a/html/interments/home.php b/html/interments/home.php index a7b29fa..f2147f5 100644 --- a/html/interments/home.php +++ b/html/interments/home.php @@ -32,7 +32,6 @@ if ($template->outputFormat=='html') { $template->blocks[] = new Block('interments/addIntermentForm.inc', array('return_url'=>$return_url)); } - $template->blocks['panel-one'][] = new Block('about.inc'); } diff --git a/templates/html/partials/panel-one.inc b/templates/html/partials/panel-one.inc index ed6c9b1..3887980 100644 --- a/templates/html/partials/panel-one.inc +++ b/templates/html/partials/panel-one.inc @@ -1,5 +1,50 @@
includeBlocks('panel-one'); + if (array_key_exists('panel-one',$this->blocks) && count($this->blocks['panel-one'])) { + echo $this->includeBlocks('panel-one'); + } + else { ?> -
+
+

About the Cemeteries

+ +

Website Support

+ + +
+
+
Rose Hill Cemetery" />
+
White Oak Cemetery" />
+
+ + \ No newline at end of file