1 |
<? |
<? |
2 |
/* |
/* |
3 |
## ----------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.14 2004/11/15 16:51:48 jonen |
8 |
|
## + added var 'numrows' to constructor args |
9 |
|
## |
10 |
|
## Revision 1.13 2004/10/07 14:17:50 jonen |
11 |
|
## + pass filter-values to backend now! (page-control!) |
12 |
|
## |
13 |
|
## Revision 1.12 2004/05/06 17:14:35 jonen |
14 |
|
## updated |
15 |
|
## |
16 |
|
## Revision 1.11 2003/05/10 17:58:45 jonen |
17 |
|
## + reworked to implement 'create/add new' item |
18 |
|
## |
19 |
|
## Revision 1.10 2003/04/18 18:40:02 jonen |
20 |
|
## + fixed bugs at 'actionbar_cell' relating to html-form and js |
21 |
|
## |
22 |
|
## Revision 1.9 2003/04/11 00:44:46 joko |
23 |
|
## minor update: shortened seperators |
24 |
|
## |
25 |
|
## Revision 1.8 2003/04/09 07:54:42 joko |
26 |
|
## cleaned up decoding part |
27 |
|
## |
28 |
|
## Revision 1.7 2003/04/09 00:37:53 jonen |
29 |
|
## + added actionbar |
30 |
|
## + some changes according to request vars |
31 |
|
## |
32 |
|
## Revision 1.6 2003/04/08 17:48:31 jonen |
33 |
|
## + bugfix again |
34 |
|
## |
35 |
|
## Revision 1.5 2003/04/08 17:33:22 jonen |
36 |
|
## + fixed problems with hidden form fields(current base URL) at the 'simple search form' |
37 |
|
## |
38 |
|
## Revision 1.4 2003/04/06 01:41:07 jonen |
39 |
|
## - removed duplicated decode functions |
40 |
|
## |
41 |
|
## Revision 1.3 2003/04/04 21:26:06 joko |
42 |
|
## added comments regarding possible (future) refactoring using the Data::Lift-infrastructure |
43 |
|
## |
44 |
|
## Revision 1.2 2003/04/04 00:45:40 jonen |
45 |
|
## + reworked decode functions |
46 |
|
## |
47 |
## Revision 1.1 2003/03/27 01:17:31 jonen |
## Revision 1.1 2003/03/27 01:17:31 jonen |
48 |
## + inital commit (was orginal 'ObjectList.inc) |
## + inital commit (was orginal 'ObjectList.inc) |
49 |
## |
## |
56 |
## Revision 1.1 2003/03/01 22:57:40 cvsmax |
## Revision 1.1 2003/03/01 22:57:40 cvsmax |
57 |
## + inital commit |
## + inital commit |
58 |
## |
## |
59 |
## |
## ------------------------------------------------------------------------- |
|
## ----------------------------------------------------------------------------- |
|
60 |
*/ |
*/ |
61 |
|
|
62 |
|
|
63 |
/** |
/** |
64 |
* Need to make sure we have the DefaultGUIDataList object |
* Need to make sure we have the DefaultGUIDataList object |
65 |
*/ |
*/ |
79 |
*/ |
*/ |
80 |
var $_options = NULL; |
var $_options = NULL; |
81 |
|
|
82 |
|
/** |
83 |
|
* Holds a list of hidden elements |
84 |
|
* |
85 |
|
*/ |
86 |
|
var $_hidden_elements = array(); |
87 |
|
|
88 |
|
|
89 |
/** |
/** |
90 |
* The constructor is used to pass in some additional |
* The constructor is used to pass in some additional |
91 |
* metadata informations as "options". |
* metadata informations as "options". |
106 |
* |
* |
107 |
* |
* |
108 |
*/ |
*/ |
109 |
function GenericGUIDataList($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE, $options = array()) { |
function GenericGUIDataList($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE, $num_rows=10, $options = array()) { |
110 |
if ($options) { $this->_options = $options; } |
if ($options) { $this->_options = $options; } |
111 |
|
|
112 |
|
$this->set_numrows($num_rows); |
113 |
|
|
114 |
|
// call parent constructor |
115 |
$parent = get_parent_class($this); |
$parent = get_parent_class($this); |
116 |
$this->$parent($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE); |
$this->$parent($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE); |
117 |
|
|
118 |
} |
} |
119 |
|
|
120 |
|
|
121 |
function get_data_source( ) { |
function get_data_source( ) { |
122 |
|
|
123 |
// finally: create phpHtmlLib source handle (XyzDataListSource) |
// finally: create phpHtmlLib source handle (XyzDataListSource) |
150 |
// V5: |
// V5: |
151 |
//print "options: " . Dumper($this->_options); |
//print "options: " . Dumper($this->_options); |
152 |
|
|
153 |
|
|
154 |
|
//HACK 2004-10-07: page-filter done by backend now, |
155 |
|
// filter-values are passed to backend |
156 |
|
$this->_options['data_locator_meta']['filter']['offset'] = $this->offset(); |
157 |
|
$this->_options['data_locator_meta']['filter']['numrows'] = $this->numrows(); |
158 |
|
$this->_options['data_locator_meta']['filter']['search_field'] = $this->search_field(); |
159 |
|
$this->_options['data_locator_meta']['filter']['search_value'] = $this->search_value(); |
160 |
|
$this->_options['data_locator_meta']['filter']['search_modifier'] = $this->simple_search_modifier_value(); |
161 |
|
|
162 |
|
//$this->_set("offsetVar", 0); |
163 |
|
|
164 |
$initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) ); |
$initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) ); |
165 |
//print "1st locator: " . Dumper($initial_locator); |
//print "1st locator: " . Dumper($initial_locator); |
166 |
|
|
184 |
$source = $proxy->get_adapter(); |
$source = $proxy->get_adapter(); |
185 |
|
|
186 |
// V4: |
// V4: |
187 |
//$source = $this->_datasource; |
//$source = $this->_datasource; |
188 |
|
|
189 |
//print "objectlist-source: " . Dumper($source); |
//print "objectlist-source: " . Dumper($source); |
190 |
//exit; |
//exit; |
191 |
|
|
202 |
|
|
203 |
//print Dumper($source); |
//print Dumper($source); |
204 |
$headers = $source->get_header(); |
$headers = $source->get_header(); |
205 |
//print Dumper($headers); |
//print "headers: " . Dumper($headers); |
206 |
|
|
207 |
$this->set_title( $this->get_title() . ' - ' . $source->get_total_rows() . ' Einträge' ); |
$this->set_title( $this->get_title() . ' - ' . $source->get_total_rows() . ' Einträge' ); |
208 |
|
|
209 |
foreach($headers as $val) { |
foreach($headers as $val) { |
210 |
$this->add_header_item($val, "150", $val, SORTABLE, SEARCHABLE); |
$this->add_header_item($val, "150", $val, SORTABLE, SEARCHABLE); |
211 |
} |
} |
212 |
|
|
213 |
|
|
214 |
/* |
/* |
215 |
$this->add_header_item("Uid", "200", "uid", SORTABLE, SEARCHABLE); |
$this->add_header_item("Uid", "200", "uid", SORTABLE, SEARCHABLE); |
216 |
$this->add_header_item("Name", "200", "lastName", SORTABLE, SEARCHABLE, "center"); |
$this->add_header_item("Name", "200", "lastName", SORTABLE, SEARCHABLE, "center"); |
217 |
*/ |
*/ |
218 |
|
|
219 |
} |
} |
220 |
|
|
221 |
|
|
232 |
* @param int - the column # we are working on. |
* @param int - the column # we are working on. |
233 |
* @return TDtag object |
* @return TDtag object |
234 |
*/ |
*/ |
235 |
function wrap_column_item($obj, $col_name) { |
function wrap_column_item($obj, $col_name, $row_data) { |
236 |
|
|
237 |
|
//print "item: " . Dumper($obj) . "<br>"; |
238 |
|
|
239 |
//make sure its set to something. |
//make sure its set to something. |
240 |
if ($obj == '') { |
if ($obj == '') { |
241 |
$obj = " "; |
$obj = " "; |
242 |
} |
} |
243 |
// if item is match by expression we will replace it with an link object |
|
244 |
elseif($this->_options['decode']) { |
// decode item / mungle item data? |
245 |
if($this->decode_item_expr($obj)) { |
// TODO: use Data::Lift here!!! (like already done in YAA::JobList and YAA::JobDetails) |
246 |
$obj = $this->decode_item_expr($obj); |
elseif ($this->_options['decode']) { |
247 |
} |
|
248 |
// if item is an Array we will replace it with an selection form object |
// Proposal using Data::Lift: (see YAA::JobList and YAA::JobDetails) |
249 |
elseif($this->decode_item_array($obj) ) { |
// This class will get shorter and better to maintain! |
250 |
$obj = $this->decode_item_array($obj); |
|
251 |
|
// Picture Data::Lift as a container component handling |
252 |
|
// *specific* en-/decoding stuff for your very core components. |
253 |
|
// This way we will have almost all "specific mungling code" at one place. nice thing! |
254 |
|
|
255 |
|
/* |
256 |
|
|
257 |
|
// 1. expr: string -> object (phpHtmlLib-object: 'html_a'-tag) |
258 |
|
// returns a phpHtmlLib object of class 'Xyz' containing a http-/html-link |
259 |
|
// pointing to a View of a different - linked/referenced - object (reference-interpolation) |
260 |
|
$this->lift1 = php::mkComponent('Data::Lift', $obj, array( metatype => 'expression' ) ); |
261 |
|
$obj = $this->lift1->to('phpHtmlLib::html_a'); |
262 |
|
|
263 |
|
// 2. data: hash -> object (phpHtmlLib-object: 'container'-object containing form) |
264 |
|
// returns a phpHtmlLib object of class 'Container' containing a html-form made up of |
265 |
|
// phpHtmlLib form-tags wrapping all attribute-value pairs of the data hash (object-edit) |
266 |
|
$this->lift2 = php::mkComponent('Data::Lift', $obj, array( metatype => 'item' ) ); |
267 |
|
$obj = $this->lift2->to('phpHtmlLib::form'); |
268 |
|
|
269 |
|
*/ |
270 |
|
|
271 |
|
$utils = php::mkComponent('WebExplorer::utils'); |
272 |
|
$hidden = $this->_hidden_elements; |
273 |
|
$options = $this->_options['decode_args']; |
274 |
|
$options[label] = $col_name; |
275 |
|
$options[parent_guid] = $row_data[guid]; |
276 |
|
$options[parent_class] = $this->_options['parent']['class']; |
277 |
|
|
278 |
|
// a) Iterate through the attributes of the item and replace each |
279 |
|
// value with an appropriate link object if it has a certain format. |
280 |
|
if ($utils->decode_item_expr($obj, $hidden, $options)) { |
281 |
|
|
282 |
|
// b) Otherwise: If item is an Array we will replace it with a selection form object. |
283 |
|
} else { |
284 |
|
$utils->decode_item_array($obj, $hidden, $options); |
285 |
} |
} |
286 |
|
|
287 |
} |
} |
288 |
|
|
289 |
//make sure we don't put a right border on the last |
//make sure we don't put a right border on the last |
290 |
//column we are working on. |
//column we are working on. |
291 |
//$style = "padding-left: 3px;padding-right:3px;border-top: 1px solid #dddddd;"; |
//$style = "padding-left: 3px;padding-right:3px;border-top: 1px solid #dddddd;"; |
310 |
return $td; |
return $td; |
311 |
} |
} |
312 |
|
|
313 |
function decode_item_array($item) { |
function add_hidden_element($label, $value) { |
314 |
$options = $this->_options['decode_args']; |
$this->_hidden_elements[$label] = $value; |
315 |
if( is_array($item) ) { |
} |
316 |
//$cur_row_index = $this->_datasource->get_cur_data_index(); |
|
317 |
//$parent_guid = $this->_datasource->_data[$cur_row_index]['guid']; |
|
318 |
// build list for selection form |
|
319 |
if($options['form']) { |
/** |
320 |
foreach($item as $key => $value) { |
* This function builds the simple search TD |
321 |
$tmp = split($options['seperator'], $value); |
* |
322 |
$ident = $tmp['1']; |
* @return ContainerWidget |
323 |
$meta = $tmp['2']; |
*/ |
324 |
$list[$key] = $ident; |
function _build_simple_search_form() { |
325 |
} |
|
326 |
if(is_array($list) ) { |
//if there is only 1 item enabled for search |
327 |
$container = container( |
//then the search looks simple. |
328 |
form_open( $item[0], $_SERVER["PHP_SELF"], "POST" ), |
$fields = $this->_get_searchable_fields(); |
329 |
form_open("ecdm", $meta), |
$cnt = count($fields); |
330 |
form_select("ecdid", $list), |
if ($cnt == 0) { |
331 |
form_submit("submit","view" ) |
return NULL; |
332 |
); |
} |
333 |
foreach($this->_hidden_items as $label => $value) { |
|
334 |
$container->add(form_hidden($label, $value)); |
$container = new ContainerWidget; |
335 |
} |
|
336 |
$container->add(form_close() ); |
// OLD - needed hidden elements are now recognized at 'render()' |
337 |
$item = $container; |
/* |
338 |
} |
// get current request vars and add them ad hidden items |
339 |
|
$url_vars = $this->_get_current_url_vars(); |
340 |
|
foreach($url_vars as $label => $value) { |
341 |
|
$container->push(form_hidden($label, $value)); |
342 |
|
} |
343 |
|
*/ |
344 |
|
|
345 |
|
if ($cnt == 1) { |
346 |
|
//user only has 1 field to show. |
347 |
|
list($name, $field) = each($fields); |
348 |
|
$container->push("Find ".$name." "); |
349 |
} else { |
} else { |
350 |
$container = container(); |
//user has many fields to show. |
351 |
foreach($item as $key => $value) { |
$container->push("Find ", |
352 |
$tmp = split($options['seperator'], $value); |
form_select($this->_vars["search_fieldVar"], $fields, $this->search_field())); |
353 |
$ident = $tmp['1']; |
} |
354 |
$meta = $tmp['2']; |
|
355 |
foreach($this->_hidden_items as $label => $value) { |
if ($this->get_simple_search_modifier()) { |
356 |
$tmp_array[] = $label . "=" . $value; |
//the user wants the search modifier turned on. |
357 |
} |
$container->push($this->_build_simple_search_modifier()); |
358 |
$str_hidden = join("&", $tmp_array); |
} |
359 |
$container->add("->", html_a($_SERVER["PHP_SELF"] . "?ecdid=" . $ident . "&ecdm=" . $meta . $str_hidden, $key . " view"), html_br()); |
|
360 |
|
$container->push(form_text($this->_vars["search_valueVar"], $this->search_value_filter($this->search_value()), "20", "100", array("style"=>"vertical-align:middle;")), |
361 |
|
form_submit($this->get_form_name(), "Search", array("style"=>"vertical-align:middle;"))); |
362 |
|
|
363 |
|
if ($this->is_advanced_search_enabled()) { |
364 |
|
$span = html_span(html_a("ass","Advanced Search", "title")); |
365 |
|
$container->push(" ", $span); |
366 |
|
} |
367 |
|
|
368 |
|
if ($cnt == 1) { |
369 |
|
$container->push(form_hidden($this->_vars["search_fieldVar"], $field)); |
370 |
|
} |
371 |
|
|
372 |
|
return $container; |
373 |
|
} |
374 |
|
|
375 |
|
|
376 |
|
/** |
377 |
|
* This function builds the data cell action buttons or main actionbar |
378 |
|
* |
379 |
|
* @return TDtag; |
380 |
|
*/ |
381 |
|
function _build_actionbar_data_cell() { |
382 |
|
$td = new TDtag(array("class" => "datalist_title", |
383 |
|
"style" => "padding-left:5px;padding-right:5px;". |
384 |
|
"padding-top:5px;padding-bottom:5px") |
385 |
|
); |
386 |
|
|
387 |
|
$flag = FALSE; |
388 |
|
if ($this->_has_action_column("FIRST")) { |
389 |
|
$flag = TRUE; |
390 |
|
$td->set_tag_attribute("align", "left"); |
391 |
|
} |
392 |
|
elseif ($this->_has_action_column("LAST")) { |
393 |
|
$flag = TRUE; |
394 |
|
$td->set_tag_attribute("align", "right"); |
395 |
|
} |
396 |
|
|
397 |
|
if ($flag && $this->_datasource->get_total_rows()) { |
398 |
|
$td->push($this->actionbar_cell()); |
399 |
|
$td->push($this->actionbar_cell_new()); |
400 |
|
} |
401 |
|
else { |
402 |
|
$td->push(" "); |
403 |
|
$td->push($this->actionbar_cell_new()); |
404 |
|
} |
405 |
|
|
406 |
|
return $td; |
407 |
|
} |
408 |
|
|
409 |
|
|
410 |
|
/** |
411 |
|
* this is the method that builds |
412 |
|
* the contents for the middle actionbar |
413 |
|
* td cell. |
414 |
|
* |
415 |
|
* @return ContainerWidget object |
416 |
|
*/ |
417 |
|
function actionbar_cell() { |
418 |
|
$action_list = $this->_options['actionbar']['list']; |
419 |
|
$action_name = $this->_options['actionbar']['name']; |
420 |
|
|
421 |
|
if($action_name && is_array($action_list)) { |
422 |
|
$action_form = container("Select action", _HTML_SPACE, |
423 |
|
form_select($action_name, $action_list, $this->_options['actionbar']['selected']), |
424 |
|
form_submit("ok","OK" ) |
425 |
|
); |
426 |
|
return $action_form; |
427 |
|
} else { |
428 |
|
return _HTML_SPACE; |
429 |
|
} |
430 |
|
} |
431 |
|
|
432 |
|
|
433 |
|
/** |
434 |
|
* this is the method that builds |
435 |
|
* the contents for the buttons of actionbar |
436 |
|
* td cell. |
437 |
|
* |
438 |
|
* @return ContainerWidget object |
439 |
|
*/ |
440 |
|
function actionbar_cell_new() { |
441 |
|
$action_buttons = $this->_options['actionbar']['buttons']; |
442 |
|
|
443 |
|
if(is_array($action_buttons)) { |
444 |
|
$action_form = container(); |
445 |
|
foreach($action_buttons as $type) { |
446 |
|
$action_form->add( |
447 |
|
_HTML_SPACE, |
448 |
|
form_submit($type['name'], $type['value']) |
449 |
|
); |
450 |
} |
} |
451 |
$item = $container; |
return $action_form; |
452 |
|
} else { |
453 |
|
return _HTML_SPACE; |
454 |
} |
} |
|
return $item; |
|
455 |
} |
} |
|
} |
|
456 |
|
|
457 |
function decode_item_expr($item) { |
|
458 |
$options = $this->_options['decode_args']; |
/* |
459 |
if(substr($item, 0, 2) == "o_") { |
* OLD (depreciated) - this method returns the current requested variables |
460 |
$tmp = split($options['seperator'], $item); |
* |
461 |
$ident = $tmp['1']; |
* @return array |
462 |
$meta = $tmp['2']; |
*/ |
463 |
foreach($this->_hidden_items as $label => $value) { |
function _get_current_url_vars() { |
464 |
$tmp_array[] = $label . "=" . $value; |
$cur_url_vars = array(); |
465 |
|
|
466 |
|
// get new LinkBuilder instance |
467 |
|
$linkbuilder = new LinkBuilder(); |
468 |
|
|
469 |
|
$url_vars = php::array_join_merge($_GET, $_POST); |
470 |
|
if(is_array($url_vars)) { |
471 |
|
foreach($url_vars as $key => $value) { |
472 |
|
// if there is an LinkBuilder guid instead of variables, encode it |
473 |
|
if($key == 'lbid') { |
474 |
|
$lb_vars = $linkbuilder->load($value); |
475 |
|
foreach($lb_vars as $lbkey => $lbval) { |
476 |
|
$cur_url_vars[$lbkey] = $lbval; |
477 |
|
} |
478 |
|
} else { |
479 |
|
$cur_url_vars[$key] = $value; |
480 |
|
} |
481 |
} |
} |
482 |
$str_hidden = join("&", $tmp_array); |
} |
483 |
$item = html_a($_SERVER["PHP_SELF"] . "?ecdid=" . $guid . "&ecdm=" . $meta . $str_hidden, "view"); |
return $cur_url_vars; |
|
return $item; |
|
484 |
} |
} |
485 |
} |
|
486 |
|
|
487 |
|
/** |
488 |
|
* This function renders the final |
489 |
|
* widget |
490 |
|
* |
491 |
|
*/ |
492 |
|
function render($indent_level, $output_debug) { |
493 |
|
|
494 |
|
//setup the columns in their sorts |
495 |
|
$this->setup_columns(); |
496 |
|
|
497 |
|
//do any data prefetch work |
498 |
|
//which may be child specific |
499 |
|
if ( $this->_show_results() ) { |
500 |
|
$this->data_prefetch(); |
501 |
|
} |
502 |
|
|
503 |
|
//This function gives the child class |
504 |
|
//a chance to build the tables/divs/containers |
505 |
|
//that will be responsible for the look/feel |
506 |
|
//of the DataList |
507 |
|
$this->gui_init(); |
508 |
|
|
509 |
|
//see if we need to build the search area. |
510 |
|
if ( $this->is_search_enabled() || $this->is_advanced_search_enabled() ) { |
511 |
|
$this->_search_table = $this->child_build_search_table(); |
512 |
|
if ( $this->_search_table ) { |
513 |
|
$this->set_form_render(TRUE); |
514 |
|
} |
515 |
|
} |
516 |
|
|
517 |
|
//see if form is needed by the actionbar |
518 |
|
if($this->_show_actionbar) { |
519 |
|
$this->set_form_render(TRUE); |
520 |
|
} |
521 |
|
|
522 |
|
if ( $this->get_form_render() ) { |
523 |
|
$form = new FORMtag( array("method" => $this->get_form_method(), |
524 |
|
"action" => $this->build_base_url(), |
525 |
|
"name" => $this->get_form_name(), |
526 |
|
"style" => "margin-top: 0px;margin-bottom:0px;") ); |
527 |
|
|
528 |
|
$target = $this->get_form_target(); |
529 |
|
if ( $target != NULL ) |
530 |
|
$form->set_tag_attribute("target",$target); |
531 |
|
|
532 |
|
$action = $this->get_form_action(); |
533 |
|
if ( $action != NULL ) |
534 |
|
$form->set_tag_attribute("action",$action); |
535 |
|
|
536 |
|
//now build the UI and return it |
537 |
|
$form->add( $this->build_gui() ); |
538 |
|
|
539 |
|
} else { |
540 |
|
$form = container(); |
541 |
|
|
542 |
|
//now build the UI and return it |
543 |
|
$form->add( $this->build_gui() ); |
544 |
|
} |
545 |
|
|
546 |
|
//add the hidden vars if we are a POST |
547 |
|
if ($this->get_form_method() == "POST") { |
548 |
|
$form->add( $this->_build_default_vars() ); |
549 |
|
|
550 |
|
//build hidden elements needed for data flow control |
551 |
|
$hidden = $this->_hidden_elements; |
552 |
|
//print "Hidden: " . Dumper($hidden); |
553 |
|
if($hidden) { |
554 |
|
foreach($hidden as $label => $value) { |
555 |
|
$form->add(form_hidden($label, $value)); |
556 |
|
} |
557 |
|
} |
558 |
|
|
559 |
|
} |
560 |
|
|
561 |
|
//add the save vars the user wants. |
562 |
|
$form->add( $this->_build_save_vars() ); |
563 |
|
|
564 |
|
//add any javascript required |
565 |
|
$container = container( $this->_javascript(), $form ); |
566 |
|
return $container->render( $indent_level, $output_debug ); |
567 |
|
} |
568 |
|
|
569 |
|
|
570 |
|
|
571 |
|
function child_add_row_cell($obj, $col_name, $last_in_row_flag, $row_data) { |
572 |
|
if (!$this->_cur_col_cntr) { |
573 |
|
//if (!isset($this->_cur_col_cntr)) { |
574 |
|
$this->_cur_col_cntr = 1; |
575 |
|
//lets see if we need to add an action column |
576 |
|
//as the first column. |
577 |
|
if ($this->_has_action_column("FIRST")) { |
578 |
|
//looks like we have a FIRST column actionbar |
579 |
|
//lets add it |
580 |
|
$this->_data_row->add($this->_build_action_column("FIRST", FALSE, $row_data)); |
581 |
|
} |
582 |
|
$td = $this->wrap_column_item($obj, $col_name, $row_data); |
583 |
|
$this->_data_row->add( $td ); |
584 |
|
} else { |
585 |
|
//show the normal data |
586 |
|
$td = $this->wrap_column_item($obj, $col_name, $row_data); |
587 |
|
$this->_data_row->add( $td ); |
588 |
|
} |
589 |
|
|
590 |
|
|
591 |
|
if ($last_in_row_flag) { |
592 |
|
//lets see if we need to add an action column |
593 |
|
//as the first column. |
594 |
|
if ($this->_has_action_column("LAST")) { |
595 |
|
//looks like we have a LAST column actionbar |
596 |
|
//lets add it |
597 |
|
$this->_data_row->add($this->_build_action_column("LAST", FALSE, $row_data)); |
598 |
|
} |
599 |
|
|
600 |
|
|
601 |
|
|
602 |
|
$this->_data_table->add_row( $this->_data_row ); |
603 |
|
$this->_data_row = new TRtag; |
604 |
|
unset( $this->_cur_col_cntr ); |
605 |
|
} else { |
606 |
|
$this->_cur_col_cntr++; |
607 |
|
} |
608 |
|
} |
609 |
|
|
610 |
} |
} |
611 |
?> |
?> |