From 042b01d169bc26444e1150c8a01dd0f5bb9d2f4f Mon Sep 17 00:00:00 2001 From: sarven Date: Mon, 19 Jan 2009 17:04:59 +0000 Subject: Extracted the showLocalNav block information into its own method in order to override it from other actions. This HTML need not be outputted if there is no page_notice. --- lib/action.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/action.php b/lib/action.php index c056c128f..d385c3cb5 100644 --- a/lib/action.php +++ b/lib/action.php @@ -301,15 +301,20 @@ class Action extends HTMLOutputter // lawsuit function showCore() { $this->elementStart('div', array('id' => 'core')); + $this->showLocalNavBlock(); + $this->elementEnd('dl'); + $this->showContentBlock(); + $this->showAside(); + $this->elementEnd('div'); + } + + function showLocalNavBlock() + { $this->elementStart('dl', array('id' => 'site_nav_local_views')); $this->element('dt', null, _('Local views')); $this->elementStart('dd'); $this->showLocalNav(); $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->showContentBlock(); - $this->showAside(); - $this->elementEnd('div'); } // SHOULD overload -- cgit v1.2.3-54-g00ecf From 77a9b4b75844873071f2c741da0234f9bf723def Mon Sep 17 00:00:00 2001 From: sarven Date: Mon, 19 Jan 2009 17:09:50 +0000 Subject: Moved minor dangling HTML. --- lib/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/action.php b/lib/action.php index d385c3cb5..5987abf3c 100644 --- a/lib/action.php +++ b/lib/action.php @@ -302,7 +302,6 @@ class Action extends HTMLOutputter // lawsuit { $this->elementStart('div', array('id' => 'core')); $this->showLocalNavBlock(); - $this->elementEnd('dl'); $this->showContentBlock(); $this->showAside(); $this->elementEnd('div'); @@ -315,6 +314,7 @@ class Action extends HTMLOutputter // lawsuit $this->elementStart('dd'); $this->showLocalNav(); $this->elementEnd('dd'); + $this->elementEnd('dl'); } // SHOULD overload -- cgit v1.2.3-54-g00ecf From a5f3e3b759879aaed31a82fa98a89d6d3594af8c Mon Sep 17 00:00:00 2001 From: sarven Date: Mon, 19 Jan 2009 17:12:35 +0000 Subject: Removed unnecessary empty containers (page_notice, aside, local navigation) --- actions/shownotice.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/actions/shownotice.php b/actions/shownotice.php index 7033a1672..beae478ba 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -180,6 +180,18 @@ class ShownoticeAction extends Action $this->showPage(); } + + /** + * Don't show local navigation + * + * @return void + */ + + function showLocalNavBlock() + { + } + + /** * Fill the content area of the page * @@ -196,6 +208,29 @@ class ShownoticeAction extends Action $this->elementEnd('ul'); } + + + /** + * Don't show page notice + * + * @return void + */ + + function showPageNoticeBlock() + { + } + + + /** + * Don't show aside + * + * @return void + */ + + function showAside() { + } + + /** * Extra content * -- cgit v1.2.3-54-g00ecf