| 4 |
## $Id$ |
## $Id$ |
| 5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
| 6 |
## $Log$ |
## $Log$ |
| 7 |
|
## Revision 1.6 2003/05/13 16:24:30 joko |
| 8 |
|
## title addendum |
| 9 |
|
## MetaBox - header style |
| 10 |
|
## |
| 11 |
## Revision 1.5 2003/05/10 18:07:31 jonen |
## Revision 1.5 2003/05/10 18:07:31 jonen |
| 12 |
## + added values needed for 'create/add new' links |
## + added values needed for 'create/add new' links |
| 13 |
## - purged depreciated code |
## - purged depreciated code |
| 49 |
function DataItem($title, $options = array()) { |
function DataItem($title, $options = array()) { |
| 50 |
$this->_options = $options; |
$this->_options = $options; |
| 51 |
|
|
| 52 |
|
//print "title: $title<br/>"; |
| 53 |
|
//print Dumper($options); |
| 54 |
|
|
| 55 |
|
$title .= $this->get_title_addendum(); |
| 56 |
|
|
| 57 |
$parent = get_parent_class($this); |
$parent = get_parent_class($this); |
| 58 |
$this->$parent($title, $width="100%", "center"); |
$this->$parent($title, $width="100%", "center"); |
| 59 |
|
|
| 179 |
} |
} |
| 180 |
|
|
| 181 |
|
|
| 182 |
|
// Please visit WebExplorer::Module::DataItem - there is a similar chooser at the top!!! |
| 183 |
|
// TODO: abstract this out into some reusable, generic component sometimes (SimpleChooser?) |
| 184 |
|
// (also take a look at WebExplorer::Module::DataTree) |
| 185 |
|
function get_title_addendum() { |
| 186 |
|
|
| 187 |
|
// MetaBox / Chooser - resolve / display some links which probably have been declared in some other layer |
| 188 |
|
//$this->header = html_span(); |
| 189 |
|
|
| 190 |
|
// Build a header-style MetaBox. |
| 191 |
|
// This will get injected into the header of the DataItem. |
| 192 |
|
$this->header_box = php::mkComponent('MetaBox', array( |
| 193 |
|
box_mode => 'header', |
| 194 |
|
caption => $this->_options['caption'], |
| 195 |
|
payload => $this->_options['links'], |
| 196 |
|
) ); |
| 197 |
|
|
| 198 |
|
return $this->header_box->render(); |
| 199 |
|
|
| 200 |
|
} |
| 201 |
|
|
| 202 |
} |
} |
| 203 |
|
|
| 204 |
|
|