From cf5f3680c79bda21c8b844803a0f5d825ba71c7d Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 7 Jan 2001 19:53:22 +0000 Subject: [PATCH] new portal templates --- .../inc/phpgw_utilities_portalbox.inc.php | 43 ++++++++++++------- phpgwapi/templates/default/portal_linkbox.tpl | 5 +++ .../default/portal_linkbox_footer.tpl | 6 +++ .../default/portal_linkbox_header.tpl | 6 +++ phpgwapi/templates/default/portal_main.tpl | 16 +++++++ .../templates/verdilak/portal_linkbox.tpl | 5 +++ .../verdilak/portal_linkbox_footer.tpl | 6 +++ .../verdilak/portal_linkbox_header.tpl | 6 +++ phpgwapi/templates/verdilak/portal_main.tpl | 16 +++++++ 9 files changed, 94 insertions(+), 15 deletions(-) create mode 100755 phpgwapi/templates/default/portal_linkbox.tpl create mode 100755 phpgwapi/templates/default/portal_linkbox_footer.tpl create mode 100755 phpgwapi/templates/default/portal_linkbox_header.tpl create mode 100755 phpgwapi/templates/default/portal_main.tpl create mode 100755 phpgwapi/templates/verdilak/portal_linkbox.tpl create mode 100755 phpgwapi/templates/verdilak/portal_linkbox_footer.tpl create mode 100755 phpgwapi/templates/verdilak/portal_linkbox_header.tpl create mode 100755 phpgwapi/templates/verdilak/portal_main.tpl diff --git a/phpgwapi/inc/phpgw_utilities_portalbox.inc.php b/phpgwapi/inc/phpgw_utilities_portalbox.inc.php index 5ccfaf7646..3797fdf6bd 100755 --- a/phpgwapi/inc/phpgw_utilities_portalbox.inc.php +++ b/phpgwapi/inc/phpgw_utilities_portalbox.inc.php @@ -45,8 +45,6 @@ class baseportalbox { function baseportalbox($title="", $primary="", $secondary="", $tertiary="") { $this->setvar("title",$title); // echo "After SetVar Title = ".$this->getvar("title")."
\n"; - $this->setvar("outerwidth",220); - $this->setvar("innerwidth",220); $this->setvar("outerborderwidth",1); $this->setvar("titlebgcolor",$primary); $this->setvar("innerbgcolor",$secondary); @@ -72,6 +70,8 @@ class linkbox extends baseportalbox { */ function linkbox($title="", $primary="", $secondary="", $tertiary="") { $this->baseportalbox($title, $primary, $secondary, $tertiary); + $this->setvar("outerwidth",300); + $this->setvar("innerwidth",300); } /* This is the only method within the class. Quite simply, as you can see @@ -79,19 +79,30 @@ class linkbox extends baseportalbox { */ function draw() { global $phpgw, $phpgw_info; - - echo ''; - echo ''; - echo ''; - echo '
'.$this->getvar("title").'
'; - echo ''; - echo ''; - echo '
'; - echo '
'; + + $p = new Template($phpgw->common->get_tpl_dir('home')); + $p->set_file(array('portal_main' => 'portal_main.tpl', + 'portal_linkbox_header' => 'portal_linkbox_header.tpl', + 'portal_linkbox' => 'portal_linkbox.tpl', + 'portal_linkbox_footer' => 'portal_linkbox_footer.tpl')); + $p->set_block('portal_main','portal_linkbox_header','portal_linkbox','portal_linkbox_footer'); + + $p->set_var('outer_border',$this->getvar('outerborderwidth')); + $p->set_var('outer_width',$this->getvar('outerwidth')); + $p->set_var('outer_bordercolor',$this->getvar('outerbordercolor')); + $p->set_var('outer_bgcolor',$this->getvar('titlebgcolor')); + $p->set_var('title',$this->getvar('title')); + $p->set_var('inner_width',$this->getvar('innerwidth')); + $p->set_var('inner_bgcolor',$this->getvar('innerbgcolor')); + $p->parse('output','portal_linkbox_header',True); + + for ($x = 0; $x < count($this->data); $x++) { + $p->set_var('link',$this->data[$x][1]); + $p->set_var('text',$this->data[$x][0]); + $p->parse('output','portal_linkbox',True); + } + $p->parse('output','portal_linkbox_footer',True); + return $p->parse('out','portal_main'); } } @@ -104,6 +115,8 @@ class resultbox extends baseportalbox { //constructor function resultbox($title="", $primary="", $secondary="", $tertiary="") { $this->baseportalbox($title, $primary, $secondary, $tertiary); + $this->setvar("outerwidth",400); + $this->setvar("innerwidth",400); } /* This is the only method within the class. Quite simply, as you can see diff --git a/phpgwapi/templates/default/portal_linkbox.tpl b/phpgwapi/templates/default/portal_linkbox.tpl new file mode 100755 index 0000000000..d86fd030e5 --- /dev/null +++ b/phpgwapi/templates/default/portal_linkbox.tpl @@ -0,0 +1,5 @@ + + +
  • {text}
  • + + diff --git a/phpgwapi/templates/default/portal_linkbox_footer.tpl b/phpgwapi/templates/default/portal_linkbox_footer.tpl new file mode 100755 index 0000000000..e42cc68861 --- /dev/null +++ b/phpgwapi/templates/default/portal_linkbox_footer.tpl @@ -0,0 +1,6 @@ + + + + + + diff --git a/phpgwapi/templates/default/portal_linkbox_header.tpl b/phpgwapi/templates/default/portal_linkbox_header.tpl new file mode 100755 index 0000000000..52421d5e7a --- /dev/null +++ b/phpgwapi/templates/default/portal_linkbox_header.tpl @@ -0,0 +1,6 @@ + + + + + + + diff --git a/phpgwapi/templates/verdilak/portal_linkbox_header.tpl b/phpgwapi/templates/verdilak/portal_linkbox_header.tpl new file mode 100755 index 0000000000..52421d5e7a --- /dev/null +++ b/phpgwapi/templates/verdilak/portal_linkbox_header.tpl @@ -0,0 +1,6 @@ + + + +