mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-10-05 17:52:03 +02:00
update portal plus tpl
This commit is contained in:
parent
bfd5f43148
commit
afa2d68758
@ -137,6 +137,12 @@
|
|||||||
$reg = "/<!--\s+BEGIN $handle\s+-->(.*)\n\s*<!--\s+END $handle\s+-->/sm";
|
$reg = "/<!--\s+BEGIN $handle\s+-->(.*)\n\s*<!--\s+END $handle\s+-->/sm";
|
||||||
preg_match_all($reg, $str, $m);
|
preg_match_all($reg, $str, $m);
|
||||||
$this->set_var($name, $m[1][0]);
|
$this->set_var($name, $m[1][0]);
|
||||||
|
// ralfbecker: readded for compatibility with old way to set blocks
|
||||||
|
$this->set_var($parent,preg_replace($reg,'{'.$name.'}',$str));
|
||||||
|
if ($name != $handle)
|
||||||
|
{
|
||||||
|
$this->set_var($handle, $m[1][0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* public: set_var(array $values)
|
/* public: set_var(array $values)
|
||||||
|
@ -43,10 +43,6 @@
|
|||||||
*/
|
*/
|
||||||
function listbox($param)
|
function listbox($param)
|
||||||
{
|
{
|
||||||
$this->setvar('outerwidth',300);
|
|
||||||
$this->setvar('innerwidth',300);
|
|
||||||
$this->setvar('width',300);
|
|
||||||
|
|
||||||
@reset($param);
|
@reset($param);
|
||||||
while(list($key,$value) = each($param))
|
while(list($key,$value) = each($param))
|
||||||
{
|
{
|
||||||
@ -57,7 +53,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->portalbox($param['title']);
|
$this->portalbox($param['title']);
|
||||||
//$this->start_template();
|
|
||||||
|
if($param['app_id'])
|
||||||
|
{
|
||||||
|
$app_id = $this->getvar('app_id');
|
||||||
|
|
||||||
|
$var = Array
|
||||||
|
(
|
||||||
|
'up' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||||
|
'down' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||||
|
'close' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||||
|
'question' => Array('url' => '/set_box.php', 'app' => $app_id),
|
||||||
|
'edit' => Array('url' => '/set_box.php', 'app' => $app_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
while(list($key,$value) = each($var))
|
||||||
|
{
|
||||||
|
$this->set_controls($key,$value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -27,11 +27,8 @@
|
|||||||
//Set up the Object, reserving memory space for variables
|
//Set up the Object, reserving memory space for variables
|
||||||
|
|
||||||
var $app_name;
|
var $app_name;
|
||||||
var $outerwidth;
|
var $app_id;
|
||||||
var $width;
|
|
||||||
var $innerwidth;
|
|
||||||
var $controls;
|
var $controls;
|
||||||
var $header_background_image;
|
|
||||||
var $up;
|
var $up;
|
||||||
var $down;
|
var $down;
|
||||||
var $close;
|
var $close;
|
||||||
@ -39,7 +36,7 @@
|
|||||||
var $edit;
|
var $edit;
|
||||||
|
|
||||||
var $output;
|
var $output;
|
||||||
var $data = Array();
|
var $data = array();
|
||||||
|
|
||||||
// Textual variables
|
// Textual variables
|
||||||
var $title;
|
var $title;
|
||||||
@ -85,7 +82,7 @@
|
|||||||
|
|
||||||
function start_template($extra = '')
|
function start_template($extra = '')
|
||||||
{
|
{
|
||||||
if ($extra)
|
if ($extra && $this->getvar('app_name'))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->getvar('app_name'),'default') . SEP . 'extrabox'));
|
$GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->getvar('app_name'),'default') . SEP . 'extrabox'));
|
||||||
}
|
}
|
||||||
@ -96,10 +93,8 @@
|
|||||||
|
|
||||||
$this->output = array
|
$this->output = array
|
||||||
(
|
(
|
||||||
'outer_width' => $this->getvar('width'),
|
|
||||||
'title' => $this->getvar('title'),
|
'title' => $this->getvar('title'),
|
||||||
'inner_width' => $this->getvar('width'),
|
'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler.png')
|
||||||
'header_background_image' => $this->getvar('header_background_image')
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,9 +112,8 @@
|
|||||||
{
|
{
|
||||||
if($data=='' && !count($this->data))
|
if($data=='' && !count($this->data))
|
||||||
{
|
{
|
||||||
$data = ' ';
|
$data = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->output['extrabox'] = $data;
|
$this->output['extrabox'] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +121,7 @@
|
|||||||
{
|
{
|
||||||
if($data=='' && !count($this->data))
|
if($data=='' && !count($this->data))
|
||||||
{
|
{
|
||||||
$data = ' ';
|
$data = '';
|
||||||
}
|
}
|
||||||
$this->output['xextrabox'] = $data;
|
$this->output['xextrabox'] = $data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user