From c59a8b1fcc8157d451604d61ad470ea3b7120e66 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 Nov 2007 07:01:17 +0000 Subject: [PATCH] Allow disabling of footer and header part git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7752 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa.conf | 2 +- include/class_ObjectListViewport.inc | 39 ++++++++++++++++++---------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/gosa.conf b/gosa.conf index ca705aa79..dee090100 100644 --- a/gosa.conf +++ b/gosa.conf @@ -119,6 +119,6 @@ kiosk-path = "/var/spool/kiosk" ppd-path = "/var/spool/ppds" [plugin/sample] -headline= "|{18px}|{:L}Name|{160px:R}Actions|" +headline= "|{18px}|{:L}Name|{40%:R}Actions|" footer= "Statistics with no information currently" entryFormat= "|{_icon}|{cn} ({_filter(uppercase,{cn})})|{_actions}|" diff --git a/include/class_ObjectListViewport.inc b/include/class_ObjectListViewport.inc index 693e424c1..340a69f7d 100644 --- a/include/class_ObjectListViewport.inc +++ b/include/class_ObjectListViewport.inc @@ -30,7 +30,9 @@ class ObjectListViewport { private $footer; private $entryFormat; private $attributes= array('cn', '_icon', '_actions', 'dn'); - + + private $b_displayHeader = TRUE; + private $b_displayFooter = TRUE; /* <---- Dummy here */ /*! @@ -192,8 +194,21 @@ class ObjectListViewport { */ public function render() { - $header = $this->renderHeadline(); - $footer = $this->renderFooter(); + $header = $footer = ""; + if($this->b_displayHeader){ + $header =" + + ".$this->renderHeadline()." + + "; + } + if($this->b_displayFooter){ + $footer =" + + ".$this->renderFooter()." + + "; + } /* Apply current filter */ $entries = ""; @@ -208,11 +223,7 @@ class ObjectListViewport { - - - + ".$header." - - - + ".$footer."
- ".$header." -
@@ -222,11 +233,7 @@ class ObjectListViewport {
@@ -296,6 +303,12 @@ class ObjectListViewport { } + public function enableFooter($bool = TRUE){ + $this->b_displayFooter = $bool; + } + public function enableHeader($bool = TRUE){ + $this->b_displayHeader = $bool; + } } -- 2.30.2