ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTable2GUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2005 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 require_once("Services/Table/classes/class.ilTableGUI.php");
25 
34 class ilTable2GUI extends ilTableGUI
35 {
36  protected $close_command = "";
37  private $unique_id;
38  private $headerHTML;
39 
44  public function __construct($a_parent_obj, $a_parent_cmd = "")
45  {
46  global $ilUser;
47 
48  parent::__construct(0, false);
49  $this->unique_id = md5(uniqid());
50  $this->parent_obj = $a_parent_obj;
51  $this->parent_cmd = $a_parent_cmd;
52  $this->buttons = array();
53  $this->header_commands = array();
54  $this->multi = array();
55  $this->formname = "table_" . $this->unique_id;
56  $this->tpl = new ilTemplate("tpl.table2.html", true, true, "Services/Table");
57 
58  $this->setLimit($ilUser->getPref("hits_per_page"));
59  }
60 
66  public function getParentObject()
67  {
68  return $this->parent_obj;
69  }
70 
76  public function getParentCmd()
77  {
78  return $this->parent_cmd;
79  }
80 
86  function setNoEntriesText($a_text)
87  {
88  $this->noentriestext = $a_text;
89  }
90 
96  function getNoEntriesText()
97  {
98  return $this->noentriestext;
99  }
100 
106  function setEnableTitle($a_enabletitle)
107  {
108  $this->enabled["title"] = $a_enabletitle;
109  }
110 
116  function getEnableTitle()
117  {
118  return $this->enabled["title"];
119  }
120 
126  function setEnableHeader($a_enableheader)
127  {
128  $this->enabled["header"] = $a_enableheader;
129  }
130 
136  function getEnableHeader()
137  {
138  return $this->enabled["header"];
139  }
140 
141  final public function setTitle($a_title, $a_icon = 0, $a_icon_alt = 0)
142  {
143  parent::setTitle($a_title, $a_icon, $a_icon_alt);
144  }
145 
151  function setOrderField($a_order_field)
152  {
153  $this->order_field = $a_order_field;
154  }
155 
156  function getOrderField()
157  {
158  return $this->order_field;
159  }
160 
161  final public function setData($a_data)
162  {
163  $this->row_data = $a_data;
164  }
165 
166  final public function getData()
167  {
168  return $this->row_data;
169  }
170 
171  final public function dataExists()
172  {
173  if (is_array($this->row_data))
174  {
175  if (count($this->row_data) > 0)
176  {
177  return true;
178  }
179  }
180  return false;
181  }
182 
183  final public function setPrefix($a_prefix)
184  {
185  $this->prefix = $a_prefix;
186  }
187 
193  final public function setFormAction($a_form_action)
194  {
195  $this->form_action = $a_form_action;
196  }
197 
203  final public function getFormAction()
204  {
205  return $this->form_action;
206  }
207 
213  function setFormName($a_formname)
214  {
215  $this->formname = $a_formname;
216  }
217 
223  function getFormName()
224  {
225  return $this->formname;
226  }
227 
233  function setId($a_val)
234  {
235  $this->id = $a_val;
236  }
237 
243  function getId()
244  {
245  return $this->id;
246  }
247 
254  {
256  }
257 
263  function setSelectAllCheckbox($a_select_all_checkbox)
264  {
265  $this->select_all_checkbox = $a_select_all_checkbox;
266  }
267 
274  final public function setRowTemplate($a_template, $a_template_dir = "")
275  {
276  $this->row_template = $a_template;
277  $this->row_template_dir = $a_template_dir;
278  }
279 
285  function setDefaultOrderField($a_defaultorderfield)
286  {
287  $this->defaultorderfield = $a_defaultorderfield;
288  }
289 
296  {
297  return $this->defaultorderfield;
298  }
299 
305  function setDefaultOrderDirection($a_defaultorderdirection)
306  {
307  $this->defaultorderdirection = $a_defaultorderdirection;
308  }
309 
316  {
317  return $this->defaultorderdirection;
318  }
319 
326  function addCommandButton($a_cmd, $a_text)
327  {
328  $this->buttons[] = array("cmd" => $a_cmd, "text" => $a_text);
329  }
330 
331 
337  function setCloseCommand($a_link)
338  {
339  $this->close_command = $a_link;
340  }
341 
348  function addMultiCommand($a_cmd, $a_text)
349  {
350  $this->multi[] = array("cmd" => $a_cmd, "text" => $a_text);
351  }
352 
359  function addHeaderCommand($a_href, $a_text, $a_target = "", $a_img = "")
360  {
361  $this->header_commands[] = array("href" => $a_href, "text" => $a_text,
362  "target" => $a_target, "img" => $a_img);
363  }
364 
372  final public function addColumn($a_text, $a_sort_field = "", $a_width = "")
373  {
374  $this->column[] = array(
375  "text" => $a_text,
376  "sort_field" => $a_sort_field,
377  "width" => $a_width);
378  $this->column_count = count($this->column);
379  }
380 
381  final public function getNavParameter()
382  {
383  return $this->prefix."_table_nav";
384  }
385 
386  function setOrderLink($sort_field, $order_dir)
387  {
388  global $ilCtrl;
389 
390  $old = $_GET[$this->getNavParameter()];
391 
392  // set order link
393  $ilCtrl->setParameter($this->parent_obj,
394  $this->getNavParameter(),
395  $sort_field.":".$order_dir.":".$this->offset);
396  $this->tpl->setVariable("TBL_ORDER_LINK",
397  $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
398 
399  // set old value of nav variable
400  $ilCtrl->setParameter($this->parent_obj,
401  $this->getNavParameter(), $old);
402  }
403 
404  function fillHeader()
405  {
406  foreach ($this->column as $column)
407  {
408  if (!$this->enabled["sort"] || $column["sort_field"] == "")
409  {
410  $this->tpl->setCurrentBlock("tbl_header_no_link");
411  if ($column["width"] != "")
412  {
413  $this->tpl->setVariable("TBL_COLUMN_WIDTH_NO_LINK"," width=\"".$column["width"]."\"");
414  }
415  $this->tpl->setVariable("TBL_HEADER_CELL_NO_LINK",
416  $column["text"]);
417  $this->tpl->parseCurrentBlock();
418  $this->tpl->touchBlock("tbl_header_th");
419  continue;
420  }
421  if (($column["sort_field"] == $this->order_field) && ($this->order_direction != ""))
422  {
423  $this->tpl->setCurrentBlock("tbl_order_image");
424  $this->tpl->setVariable("IMG_ORDER_DIR",ilUtil::getImagePath($this->order_direction."_order.gif"));
425  $this->tpl->parseCurrentBlock();
426  }
427 
428  $this->tpl->setCurrentBlock("tbl_header_cell");
429  $this->tpl->setVariable("TBL_HEADER_CELL", $column["text"]);
430 
431  // only set width if a value is given for that column
432  if ($column["width"] != "")
433  {
434  $this->tpl->setVariable("TBL_COLUMN_WIDTH"," width=\"".$column["width"]."\"");
435  }
436 
437  $lng_sort_column = $this->lng->txt("sort_by_this_column");
438  $this->tpl->setVariable("TBL_ORDER_ALT",$lng_sort_column);
439 
440  $order_dir = "asc";
441 
442  if ($column["sort_field"] == $this->order_field)
443  {
444  $order_dir = $this->sort_order;
445 
446  $lng_change_sort = $this->lng->txt("change_sort_direction");
447  $this->tpl->setVariable("TBL_ORDER_ALT",$lng_change_sort);
448  }
449 
450  $this->setOrderLink($column["sort_field"], $order_dir);
451  $this->tpl->parseCurrentBlock();
452  $this->tpl->touchBlock("tbl_header_th");
453  }
454 
455  $this->tpl->setCurrentBlock("tbl_header");
456  $this->tpl->parseCurrentBlock();
457  }
458 
459 
460  final public function getHTML()
461  {
462  global $lng, $ilCtrl;
463 
464  $ilCtrl->saveParameter($this->getParentObject(), $this->getNavParameter());
465 
466  if(!$this->enabled['content'])
467  {
468  return $this->render();
469  }
470 
471  if ($_POST[$this->getNavParameter()."1"] != "")
472  {
473  if ($_POST[$this->getNavParameter()."1"] != $_POST[$this->getNavParameter()])
474  {
475  $this->nav_value = $_POST[$this->getNavParameter()."1"];
476  }
477  else if ($_POST[$this->getNavParameter()."2"] != $_POST[$this->getNavParameter()])
478  {
479  $this->nav_value = $_POST[$this->getNavParameter()."2"];
480  }
481  }
482  else
483  {
484  $this->nav_value = $_GET[$this->getNavParameter()];
485  }
486  $nav = explode(":", $this->nav_value);
487 
488  // $nav[0] is order by
489  $this->setOrderField(($nav[0] != "") ? $nav[0] : $this->getDefaultOrderField());
490  $this->setOrderDirection(($nav[1] != "") ? $nav[1] : $this->getDefaultOrderDirection());
491  $this->setOffset($nav[2]);
492  $this->setMaxCount(count($this->row_data));
493  $this->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
494 
495  // sort
496  $data = $this->getData();
497  $data = ilUtil::sortArray($data, $this->getOrderField(),
498  $this->getOrderDirection(), $this->numericOrdering($this->getOrderField()));
499 
500  // slice
501  $data = array_slice($data, $this->getOffset(), $this->getLimit());
502 
503  // fill rows
504  if(count($data) > 0)
505  {
506  $this->tpl->addBlockFile("TBL_CONTENT", "tbl_content", $this->row_template,
507  $this->row_template_dir);
508 
509  foreach($data as $set)
510  {
511  $this->tpl->setCurrentBlock("tbl_content");
512  $this->css_row = ($this->css_row != "tblrow1")
513  ? "tblrow1"
514  : "tblrow2";
515  $this->tpl->setVariable("CSS_ROW", $this->css_row);
516 
517  $this->fillRow($set);
518  $this->tpl->setCurrentBlock("tbl_content");
519  $this->tpl->parseCurrentBlock();
520  }
521  }
522  else
523  {
524  // add standard no items text (please tell me, if it messes something up, alex, 29.8.2008)
525  $no_items_text = (trim($this->getNoEntriesText()) != '')
526  ? $this->getNoEntriesText()
527  : $lng->txt("no_items");
528 
529  $this->css_row = ($this->css_row != "tblrow1")
530  ? "tblrow1"
531  : "tblrow2";
532 
533  $this->tpl->setCurrentBlock("tbl_no_entries");
534  $this->tpl->setVariable('TBL_NO_ENTRY_CSS_ROW', $this->css_row);
535  $this->tpl->setVariable('TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
536  $this->tpl->setVariable('TBL_NO_ENTRY_TEXT', trim($no_items_text));
537  $this->tpl->parseCurrentBlock();
538  }
539 
540  // set form action
541  if ($this->form_action != "")
542  {
543  $this->tpl->setCurrentBlock("tbl_form_header");
544  $this->tpl->setVariable("FORMACTION", $this->getFormAction());
545  $this->tpl->setVariable("FORMNAME", $this->getFormName());
546  $this->tpl->parseCurrentBlock();
547  $this->tpl->touchBlock("tbl_form_footer");
548  }
549 
550  $this->fillFooter();
551 
552  $this->fillActionRow();
553 
554  return $this->render();
555  }
556 
562  function numericOrdering($a_field)
563  {
564  return false;
565  }
566 
571  function render()
572  {
573  global $lng;
574 
575  $this->tpl->setVariable("CSS_TABLE",$this->getStyle("table"));
576  if ($this->getId() != "")
577  {
578  $this->tpl->setVariable("ID", 'id="'.$this->getId().'"');
579  }
580 
581  // table title and icon
582  if ($this->enabled["title"])
583  {
584  if ($this->enabled["icon"])
585  {
586  $this->tpl->setCurrentBlock("tbl_header_title_icon");
587  $this->tpl->setVariable("TBL_TITLE_IMG",ilUtil::getImagePath($this->icon));
588  $this->tpl->setVariable("TBL_TITLE_IMG_ALT",$this->icon_alt);
589  $this->tpl->parseCurrentBlock();
590  }
591 
592  foreach($this->header_commands as $command)
593  {
594  if ($command["img"] != "")
595  {
596  $this->tpl->setCurrentBlock("tbl_header_img_link");
597  if ($command["target"] != "")
598  {
599  $this->tpl->setVariable("TARGET_IMG_LINK",
600  'target="'.$command["target"].'"');
601  }
602  $this->tpl->setVariable("ALT_IMG_LINK", $command["text"]);
603  $this->tpl->setVariable("HREF_IMG_LINK", $command["href"]);
604  $this->tpl->setVariable("SRC_IMG_LINK",
605  $command["img"]);
606  $this->tpl->parseCurrentBlock();
607  }
608  else
609  {
610  $this->tpl->setCurrentBlock("head_cmd");
611  $this->tpl->setVariable("TXT_HEAD_CMD", $command["text"]);
612  $this->tpl->setVariable("HREF_HEAD_CMD", $command["href"]);
613  $this->tpl->parseCurrentBlock();
614  }
615  }
616 
617  if (isset ($this->headerHTML)) {
618  $this->tpl->setCurrentBlock("tbl_header_html");
619  $this->tpl->setVariable ("HEADER_HTML", $this->headerHTML);
620  $this->tpl->parseCurrentBlock();
621  }
622 
623  // close command
624  if ($this->close_command != "")
625  {
626  $this->tpl->setCurrentBlock("tbl_header_img_link");
627  $this->tpl->setVariable("ALT_IMG_LINK",$lng->txt("close"));
628  $this->tpl->setVariable("HREF_IMG_LINK",$this->close_command);
629  $this->tpl->setVariable("SRC_IMG_LINK",ilUtil::getImagePath("icon_close2.gif"));
630  $this->tpl->parseCurrentBlock();
631  }
632 
633  $this->tpl->setCurrentBlock("tbl_header_title");
634  $this->tpl->setVariable("COLUMN_COUNT",$this->column_count);
635  $this->tpl->setVariable("TBL_TITLE",$this->title);
636  $this->tpl->parseCurrentBlock();
637  }
638 
639  // table header
640  if ($this->enabled["header"])
641  {
642  $this->fillHeader();
643  }
644 
645  $this->tpl->touchBlock("tbl_table_end");
646 
647  return $this->tpl->get();
648  }
649 
656  protected function fillRow($a_set)
657  {
658  foreach ($a_set as $key => $value)
659  {
660  $this->tpl->setVariable("VAL_".strtoupper($key), $value);
661  }
662  }
663 
664 
668  function fillFooter()
669  {
670  global $lng, $ilCtrl;
671 
672  $footer = false;
673 
674  // select all checkbox
675  if ((strlen($this->getFormName())) && (strlen($this->getSelectAllCheckbox())) && $this->dataExists())
676  {
677  $this->tpl->setCurrentBlock("select_all_checkbox");
678  $this->tpl->setVariable("SELECT_ALL_TXT_SELECT_ALL", $lng->txt("select_all"));
679  $this->tpl->setVariable("SELECT_ALL_CHECKBOX_NAME", $this->getSelectAllCheckbox());
680  $this->tpl->setVariable("SELECT_ALL_FORM_NAME", $this->getFormName());
681  $this->tpl->setVariable("CHECKBOXNAME", "chb_select_all_" . $this->unique_id);
682  $this->tpl->parseCurrentBlock();
683  $footer = true;
684  }
685 
686  // table footer numinfo
687  if ($this->enabled["numinfo"] && $this->enabled["footer"])
688  {
689  $start = $this->offset + 1; // compute num info
690  if (!$this->dataExists())
691  {
692  $start = 0;
693  }
694  $end = $this->offset + $this->limit;
695 
696  if ($end > $this->max_count or $this->limit == 0)
697  {
698  $end = $this->max_count;
699  }
700 
701  if ($this->lang_support)
702  {
703  $numinfo = "(".$start." - ".$end." ".strtolower($this->lng->txt("of"))." ".$this->max_count.")";
704  }
705  else
706  {
707  $numinfo = "(".$start." - ".$end." of ".$this->max_count.")";
708  }
709  if ($this->max_count > 0)
710  {
711  $this->tpl->setCurrentBlock("tbl_footer_numinfo");
712  $this->tpl->setVariable("NUMINFO", $numinfo);
713  $this->tpl->parseCurrentBlock();
714  }
715  $footer = true;
716  }
717 
718  // table footer linkbar
719  if ($this->enabled["linkbar"] && $this->enabled["footer"] && $this->limit != 0
720  && $this->max_count > 0)
721  {
722  $layout = array(
723  "link" => $this->footer_style,
724  "prev" => $this->footer_previous,
725  "next" => $this->footer_next,
726  );
727  $linkbar = $this->getLinkbar("1");
728  $this->tpl->setCurrentBlock("tbl_footer_linkbar");
729  $this->tpl->setVariable("LINKBAR", $linkbar);
730  $this->tpl->parseCurrentBlock();
731  $footer = true;
732  }
733 
734  if ($footer)
735  {
736  $this->tpl->setCurrentBlock("tbl_footer");
737  $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount());
738  $this->tpl->parseCurrentBlock();
739 
740  // top navigation, if number info or linkbar given
741  if ($numinfo != "" || $linkbar != "")
742  {
743  if ($numinfo != "")
744  {
745  $this->tpl->setCurrentBlock("top_numinfo");
746  $this->tpl->setVariable("NUMINFO", $numinfo);
747  $this->tpl->parseCurrentBlock();
748  }
749  if ($linkbar != "")
750  {
751  $linkbar = $this->getLinkbar("2");
752  $this->tpl->setCurrentBlock("top_linkbar");
753  $this->tpl->setVariable("LINKBAR", $linkbar);
754  $this->tpl->parseCurrentBlock();
755  }
756  $this->tpl->setCurrentBlock("top_navigation");
757  $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount());
758  $this->tpl->parseCurrentBlock();
759  }
760  }
761  }
762 
770  function getLinkbar($a_num)
771  {
772  global $ilCtrl, $lng;
773 
774  $link = $ilCtrl->getLinkTargetByClass(get_class($this->parent_obj), $this->parent_cmd).
775  "&".$this->getNavParameter()."=".
776  $this->getOrderField().":".$this->getOrderDirection().":";
777 
778  $LinkBar = "";
779  $layout_prev = $lng->txt("previous");
780  $layout_next = $lng->txt("next");
781 
782  // if more entries then entries per page -> show link bar
783  if ($this->max_count > $this->getLimit())
784  {
785  // previous link
786  if ($this->getOffset() >= 1)
787  {
788  $prevoffset = $this->getOffset() - $this->getLimit();
789  $LinkBar .= "<a class=\"small\" href=\"".$link.$prevoffset."\">".$layout_prev."&nbsp;</a>";
790  }
791  else
792  {
793  $LinkBar .= '<span class="il_BlockInfo">'.$layout_prev."&nbsp;</span>";
794  }
795 
796  // current value
797  if ($a_num == "1")
798  {
799  $LinkBar .= '<input type="hidden" name="'.$this->getNavParameter().
800  '" value="'.$this->getOrderField().":".$this->getOrderDirection().":".$this->getOffset().'" />';
801  }
802 
803  // calculate number of pages
804  $pages = intval($this->max_count / $this->getLimit());
805 
806  // add a page if a rest remains
807  if (($this->max_count % $this->getLimit()))
808  $pages++;
809 
810  // links to other pages
811  $offset_arr = array();
812  for ($i = 1 ;$i <= $pages ; $i++)
813  {
814  $newoffset = $this->getLimit() * ($i-1);
815 
816  $nav_value = $this->getOrderField().":".$this->getOrderDirection().":".$newoffset;
817  $offset_arr[$nav_value] = $i;
818  if ($newoffset == $this->getOffset())
819  {
820  // $LinkBar .= "[".$i."] ";
821  }
822  else
823  {
824  // $LinkBar .= '<a '.$layout_link.' href="'.
825  // $link.$newoffset.'">['.$i.']</a> ';
826  }
827  }
828 
829  // show next link (if not last page)
830  if (! ( ($this->getOffset() / $this->getLimit())==($pages-1) ) && ($pages!=1) )
831  {
832  if ($LinkBar != "")
833  $LinkBar .= "<span class=\"small\" > | </span>";
834  $newoffset = $this->getOffset() + $this->getLimit();
835  $LinkBar .= "<a class=\"small\" href=\"".$link.$newoffset."\">&nbsp;".$layout_next."</a>";
836  }
837  else
838  {
839  if ($LinkBar != "")
840  $LinkBar .= "<span class=\"small\" > | </span>";
841  $LinkBar .= '<span class="il_BlockInfo">&nbsp;'.$layout_next."</span>";
842  }
843 
844  if (count($offset_arr))
845  {
846  $LinkBar .= "&nbsp;&nbsp;&nbsp;&nbsp;".ilUtil::formSelect($this->nav_value,
847  $this->getNavParameter().$a_num, $offset_arr, false, true, 0, "ilEditSelect").
848  ' <input class="ilEditSubmit" type="submit" name="cmd['.$this->parent_cmd.']" value="'.
849  $lng->txt("select_page").'"> ';
850  }
851 
852  return $LinkBar;
853  }
854  else
855  {
856  return false;
857  }
858  }
859 
863  function fillActionRow()
864  {
865  global $lng;
866 
867  // action row
868  $action_row = false;
869  $arrow = false;
870 
871  // add buttons
872  if (count($this->buttons) > 0)
873  {
874  foreach ($this->buttons as $button)
875  {
876  $this->tpl->setCurrentBlock("plain_button");
877  $this->tpl->setVariable("PBTN_NAME", $button["cmd"]);
878  $this->tpl->setVariable("PBTN_VALUE", $button["text"]);
879  $this->tpl->parseCurrentBlock();
880  }
881  $this->tpl->setCurrentBlock("plain_buttons");
882  $this->tpl->parseCurrentBlock();
883 
884  $action_row = true;
885  }
886 
887  // multi selection
888  if (count($this->multi) > 1 && $this->dataExists())
889  {
890  $this->tpl->setCurrentBlock("tbl_cmd_select");
891  $sel = array();
892  foreach ($this->multi as $mc)
893  {
894  $sel[$mc["cmd"]] = $mc["text"];
895  }
896  $this->tpl->setVariable("SELECT_CMDS",
897  ilUtil::formSelect("", "selected_cmd", $sel, false, true));
898  $this->tpl->setVariable("TXT_EXECUTE", $lng->txt("execute"));
899  $this->tpl->setVariable('SELECT_CMD','select_cmd');
900  $this->tpl->parseCurrentBlock();
901  $arrow = true;
902  $action_row = true;
903  }
904  elseif(count($this->multi) == 1 && $this->dataExists())
905  {
906  $this->tpl->setCurrentBlock("tbl_single_cmd");
907  $sel = array();
908  foreach ($this->multi as $mc)
909  {
910  $cmd = $mc['cmd'];
911  $txt = $mc['text'];
912  }
913  $this->tpl->setVariable("TXT_SINGLE_CMD",$txt);
914  $this->tpl->setVariable("SINGLE_CMD",$cmd);
915  $this->tpl->parseCurrentBlock();
916  $arrow = true;
917  $action_row = true;
918  }
919 
920  if ($arrow)
921  {
922  $this->tpl->setCurrentBlock("tbl_action_img_arrow");
923  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
924  $this->tpl->setVariable("ALT_ARROW", $lng->txt("action"));
925  $this->tpl->parseCurrentBlock();
926  }
927 
928  if ($action_row)
929  {
930  $this->tpl->setCurrentBlock("tbl_action_row");
931  $this->tpl->setVariable("COLUMN_COUNTS", $this->getColumnCount());
932  $this->tpl->parseCurrentBlock();
933  }
934  }
935 
942  public function setHeaderHTML($html)
943  {
944  $this->headerHTML = $html;
945  }
946 }
947 ?>