1 |
jonen |
1.1 |
<? |
2 |
|
|
/* |
3 |
|
|
## ----------------------------------------------------------------------------- |
4 |
|
|
## $Id: NavigationList.inc,v 1.1 2003/03/01 22:57:23 cvsmax Exp $ |
5 |
|
|
## ----------------------------------------------------------------------------- |
6 |
|
|
## $Log: NavigationList.inc,v $ |
7 |
|
|
## Revision 1.1 2003/03/01 22:57:23 cvsmax |
8 |
|
|
## + inital commit |
9 |
|
|
## |
10 |
|
|
## |
11 |
|
|
## ----------------------------------------------------------------------------- |
12 |
|
|
*/ |
13 |
|
|
|
14 |
|
|
loadModule('WebExplorer::Module::AbstractGUIModule'); |
15 |
|
|
|
16 |
|
|
class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractGUIModule { |
17 |
|
|
|
18 |
|
|
function set_gui_object() { |
19 |
|
|
$this->_gui_object = $this->buildNavList(); |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
|
23 |
|
|
function buildNavList() { |
24 |
|
|
print Dumper($this->_args); |
25 |
|
|
$initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) ); |
26 |
|
|
$proxy = php::mkComponent('DataSource::Generic', $initial_locator, $this->_args['options']['data_locator_meta']); |
27 |
|
|
$source = $proxy->get_adapter(); |
28 |
|
|
$source->do_query(); |
29 |
|
|
$result = $source->_result; |
30 |
|
|
|
31 |
|
|
//print Dumper($source->_result); |
32 |
|
|
|
33 |
|
|
$nav = new VerticalCSSNavTable($this->_args['caption'], "", $width="100%"); |
34 |
|
|
|
35 |
|
|
if (is_array($result)) { |
36 |
|
|
foreach($result as $value) { |
37 |
|
|
$alt_caption = "Alle Elemente des Types $value anzeigen"; |
38 |
|
|
//$url = $_SERVER['PHP_SELF'] . "?" . $this->_control['page_ident_label'] . "=d_list&l_label=" . $value; |
39 |
|
|
$url = $_SERVER['PHP_SELF'] . "?ap=explorer&ecl=content&ect=data&ecdlk=rpc&ecat=list&ecdid=$value"; |
40 |
|
|
$nav->add($url, $value, $alt_caption); |
41 |
|
|
} |
42 |
|
|
} |
43 |
|
|
|
44 |
|
|
return $nav; |
45 |
|
|
} |
46 |
|
|
|
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
?> |