4 require_once(
"Services/Table/classes/class.ilTableGUI.php");
37 public function __construct($a_parent_obj, $a_parent_cmd =
"")
42 $this->unique_id = md5(uniqid());
43 $this->parent_obj = $a_parent_obj;
44 $this->parent_cmd = $a_parent_cmd;
45 $this->buttons = array();
46 $this->header_commands = array();
47 $this->multi = array();
48 $this->hidden_inputs = array();
50 $this->tpl =
new ilTemplate(
"tpl.table2.html",
true,
true,
"Services/Table");
52 if (is_object($ilUser))
54 $this->
setLimit($ilUser->getPref(
"hits_per_page"));
68 $next_class = $ilCtrl->getNextClass($this);
69 $cmd = $ilCtrl->getCmd();
73 case 'ilformpropertydispatchgui':
74 include_once
'./Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
78 $form_prop_dispatch->setItem($item);
79 return $ilCtrl->forwardCommand($form_prop_dispatch);
91 if (!$this->nav_determined && !$a_in_determination)
118 return $this->parent_obj;
128 return $this->parent_cmd;
138 $this->top_anchor = $a_val;
158 $this->noentriestext = $a_text;
168 return $this->noentriestext;
178 $this->datatable = $a_val;
188 return $this->datatable;
198 $this->enabled[
"title"] = $a_enabletitle;
208 return $this->enabled[
"title"];
218 $this->enabled[
"header"] = $a_enableheader;
228 return $this->enabled[
"header"];
238 $this->num_info = $a_val;
248 return $this->num_info;
254 final public function setTitle($a_title, $a_icon = 0, $a_icon_alt = 0)
266 $this->description = $a_val;
276 return $this->description;
286 $this->order_field = $a_order_field;
291 return $this->order_field;
296 $this->row_data = $a_data;
301 return $this->row_data;
306 if (is_array($this->row_data))
308 if (count($this->row_data) > 0)
318 $this->prefix = $a_prefix;
332 $a_input_item->setParent($this);
335 $this->filters[] = $a_input_item;
339 $this->optional_filters[] = $a_input_item;
359 if ($item->getPostVar() == $a_post_var)
366 if ($item->getPostVar() == $a_post_var)
381 $this->filter_cols = $a_val;
401 $this->disable_filter_hiding = $a_val;
419 $this->custom_prev_next =
true;
420 $this->custom_prev = $a_prev_link;
421 $this->custom_next = $a_next_link;
432 $this->form_action = $a_form_action;
442 return $this->form_action;
452 $this->formname = $a_formname;
462 return $this->formname;
496 $this->display_as_block = $a_val;
506 return $this->display_as_block;
526 $this->select_all_checkbox = $a_select_all_checkbox;
536 $this->ext_sort = $a_val;
556 $this->filter_cmd = $a_val;
576 $this->reset_cmd = $a_val;
596 $this->ext_seg = $a_val;
617 $this->row_template = $a_template;
618 $this->row_template_dir = $a_template_dir;
628 $this->defaultorderfield = $a_defaultorderfield;
638 return $this->defaultorderfield;
648 $this->defaultorderdirection = $a_defaultorderdirection;
658 return $this->defaultorderdirection;
668 $this->buttons = array();
679 $this->buttons[] = array(
"cmd" => $a_cmd,
"text" => $a_text,
'onclick' => $a_onclick);
692 $this->sel_buttons[] = array(
"sel_var" => $a_sel_var,
"options" => $a_options,
"selected" => $a_default_selection,
"cmd" => $a_cmd,
"text" => $a_text);
706 $this->mi_sel_buttons[] = array(
"sel_var" => $a_sel_var,
"options" => $a_options,
"selected" => $a_default_selection,
"cmd" => $a_cmd,
"text" => $a_text);
718 $this->close_command = $a_link;
729 $this->multi[] = array(
"cmd" => $a_cmd,
"text" => $a_text);
740 $this->hidden_inputs[] = array(
"name" => $a_name,
"value" => $a_value);
751 $this->header_commands[] = array(
"href" => $a_href,
"text" => $a_text,
752 "target" => $a_target,
"img" => $a_img);
762 $this->top_commands = $a_val;
782 final public function addColumn($a_text, $a_sort_field =
"", $a_width =
"",
783 $a_is_checkbox_action_column =
false, $a_class =
"")
785 $this->column[] = array(
787 "sort_field" => $a_sort_field,
789 "is_checkbox_action_column" => $a_is_checkbox_action_column,
792 $this->column_count = count($this->column);
797 return $this->prefix.
"_table_nav";
805 if (is_object($ilUser) && $ilUser->prefs[
"screen_reader_optimization"])
807 $hash =
"#".$this->getTopAnchor();
813 $ilCtrl->setParameter($this->parent_obj,
815 $sort_field.
":".$order_dir.
":".$this->offset);
816 $this->tpl->setVariable(
"TBL_ORDER_LINK",
817 $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd).$hash);
820 $ilCtrl->setParameter($this->parent_obj,
828 $allcolumnswithwidth =
true;
829 foreach ($this->column as $column)
831 if (!strlen($column[
"width"])) $allcolumnswithwidth =
false;
833 if ($allcolumnswithwidth)
835 foreach ($this->column as $column)
837 $this->tpl->setCurrentBlock(
"tbl_colgroup_column");
838 $this->tpl->setVariable(
"COLGROUP_COLUMN_WIDTH", $column[
"width"]);
839 $this->tpl->parseCurrentBlock();
842 foreach ($this->column as $column)
844 if (!$this->enabled[
"sort"] || $column[
"sort_field"] ==
"" || $column[
"is_checkbox_action_column"])
846 $this->tpl->setCurrentBlock(
"tbl_header_no_link");
847 if ($column[
"width"] !=
"")
849 $this->tpl->setVariable(
"TBL_COLUMN_WIDTH_NO_LINK",
" width=\"".$column[
"width"].
"\"");
851 if (!$column[
"is_checkbox_action_column"])
853 $this->tpl->setVariable(
"TBL_HEADER_CELL_NO_LINK",
858 $this->tpl->setVariable(
"TBL_HEADER_CELL_NO_LINK",
862 if ($column[
"class"] !=
"")
864 $this->tpl->setVariable(
"TBL_HEADER_CLASS",
" " . $column[
"class"]);
866 $this->tpl->parseCurrentBlock();
867 $this->tpl->touchBlock(
"tbl_header_th");
870 if (($column[
"sort_field"] == $this->order_field) && ($this->order_direction !=
""))
872 $this->tpl->setCurrentBlock(
"tbl_order_image");
873 $this->tpl->setVariable(
"IMG_ORDER_DIR",
ilUtil::getImagePath($this->order_direction.
"_order.gif"));
874 $this->tpl->setVariable(
"IMG_ORDER_ALT", $this->lng->txt(
"change_sort_direction"));
875 $this->tpl->parseCurrentBlock();
878 $this->tpl->setCurrentBlock(
"tbl_header_cell");
879 $this->tpl->setVariable(
"TBL_HEADER_CELL", $column[
"text"]);
882 if ($column[
"width"] !=
"")
884 $this->tpl->setVariable(
"TBL_COLUMN_WIDTH",
" width=\"".$column[
"width"].
"\"");
887 $lng_sort_column = $this->lng->txt(
"sort_by_this_column");
888 $this->tpl->setVariable(
"TBL_ORDER_ALT",$lng_sort_column);
892 if ($column[
"sort_field"] == $this->order_field)
894 $order_dir = $this->sort_order;
896 $lng_change_sort = $this->lng->txt(
"change_sort_direction");
897 $this->tpl->setVariable(
"TBL_ORDER_ALT",$lng_change_sort);
900 if ($column[
"class"] !=
"")
902 $this->tpl->setVariable(
"TBL_HEADER_CLASS",
" " . $column[
"class"]);
905 $this->tpl->parseCurrentBlock();
906 $this->tpl->touchBlock(
"tbl_header_th");
909 $this->tpl->setCurrentBlock(
"tbl_header");
910 $this->tpl->parseCurrentBlock();
954 if ($this->nav_value ==
"" && $this->
getId() !=
"" && $ilUser->getId() != ANONYMOUS_USER_ID)
958 include_once(
"./Services/Table/classes/class.ilTablePropertiesStorage.php");
961 $tab_prop->getProperty($this->
getId(), $ilUser->getId(),
"order").
":".
962 $tab_prop->getProperty($this->getId(), $ilUser->getId(),
"direction").
":".
963 $tab_prop->getProperty($this->getId(), $ilUser->getId(),
"offset");
966 $nav = explode(
":", $this->nav_value);
984 $this->nav_determined =
true;
991 if ($this->
getId() !=
"" && $ilUser->getId() != ANONYMOUS_USER_ID)
993 include_once(
"./Services/Table/classes/class.ilTablePropertiesStorage.php");
997 $tab_prop->storeProperty($this->
getId(), $ilUser->getId(),
"order",
1002 $tab_prop->storeProperty($this->
getId(), $ilUser->getId(),
"direction",
1008 $tab_prop->storeProperty($this->
getId(), $ilUser->getId(),
"offset",
1024 if (is_object($ilCtrl) && $this->
getId() ==
"")
1029 if(!$this->enabled[
'content'])
1041 $this->
setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1058 if(count($data) > 0)
1060 $this->tpl->addBlockFile(
"TBL_CONTENT",
"tbl_content", $this->row_template,
1061 $this->row_template_dir);
1063 foreach($data as $set)
1065 $this->tpl->setCurrentBlock(
"tbl_content");
1066 $this->css_row = ($this->css_row !=
"tblrow1")
1069 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
1072 $this->tpl->setCurrentBlock(
"tbl_content");
1073 $this->tpl->parseCurrentBlock();
1081 : $lng->txt(
"no_items");
1083 $this->css_row = ($this->css_row !=
"tblrow1")
1087 $this->tpl->setCurrentBlock(
"tbl_no_entries");
1088 $this->tpl->setVariable(
'TBL_NO_ENTRY_CSS_ROW', $this->css_row);
1089 $this->tpl->setVariable(
'TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
1090 $this->tpl->setVariable(
'TBL_NO_ENTRY_TEXT', trim($no_items_text));
1091 $this->tpl->parseCurrentBlock();
1095 if ($this->form_action !=
"")
1098 if (is_object($ilUser) && $ilUser->prefs[
"screen_reader_optimization"])
1100 $hash =
"#".$this->getTopAnchor();
1103 $this->tpl->setCurrentBlock(
"tbl_form_header");
1104 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction().$hash);
1105 $this->tpl->setVariable(
"FORMNAME", $this->
getFormName());
1106 $this->tpl->parseCurrentBlock();
1107 $this->tpl->touchBlock(
"tbl_form_footer");
1139 $this->tpl->setVariable(
"CSS_TABLE",$this->
getStyle(
"table"));
1140 $this->tpl->setVariable(
"DATA_TABLE", (
int) $this->
getIsDataTable());
1141 if ($this->
getId() !=
"")
1143 $this->tpl->setVariable(
"ID",
'id="'.$this->
getId().
'"');
1149 $this->tpl->setCurrentBlock(
"tbl_header_description");
1150 $this->tpl->setVariable(
"TBL_DESCRIPTION", $this->
getDescription());
1151 $this->tpl->parseCurrentBlock();
1158 $this->tpl->touchBlock(
"outer_start_1");
1159 $this->tpl->touchBlock(
"outer_end_1");
1163 $this->tpl->touchBlock(
"outer_start_2");
1164 $this->tpl->touchBlock(
"outer_end_2");
1168 if ($this->enabled[
"title"] && ($this->title !=
""
1169 || $this->icon !=
"" || count($this->header_commands) > 0 ||
1170 $this->headerHTML !=
"" || $this->close_command !=
""))
1172 if ($this->enabled[
"icon"])
1174 $this->tpl->setCurrentBlock(
"tbl_header_title_icon");
1176 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT",$this->icon_alt);
1177 $this->tpl->parseCurrentBlock();
1180 foreach($this->header_commands as
$command)
1182 if ($command[
"img"] !=
"")
1184 $this->tpl->setCurrentBlock(
"tbl_header_img_link");
1185 if ($command[
"target"] !=
"")
1187 $this->tpl->setVariable(
"TARGET_IMG_LINK",
1188 'target="'.$command[
"target"].
'"');
1190 $this->tpl->setVariable(
"ALT_IMG_LINK", $command[
"text"]);
1191 $this->tpl->setVariable(
"HREF_IMG_LINK", $command[
"href"]);
1192 $this->tpl->setVariable(
"SRC_IMG_LINK",
1194 $this->tpl->parseCurrentBlock();
1198 $this->tpl->setCurrentBlock(
"head_cmd");
1199 $this->tpl->setVariable(
"TXT_HEAD_CMD", $command[
"text"]);
1200 $this->tpl->setVariable(
"HREF_HEAD_CMD", $command[
"href"]);
1201 $this->tpl->parseCurrentBlock();
1205 if (isset ($this->headerHTML)) {
1206 $this->tpl->setCurrentBlock(
"tbl_header_html");
1207 $this->tpl->setVariable (
"HEADER_HTML", $this->headerHTML);
1208 $this->tpl->parseCurrentBlock();
1212 if ($this->close_command !=
"")
1214 $this->tpl->setCurrentBlock(
"tbl_header_img_link");
1215 $this->tpl->setVariable(
"ALT_IMG_LINK",$lng->txt(
"close"));
1216 $this->tpl->setVariable(
"HREF_IMG_LINK",$this->close_command);
1218 $this->tpl->parseCurrentBlock();
1221 $this->tpl->setCurrentBlock(
"tbl_header_title");
1222 $this->tpl->setVariable(
"TBL_TITLE",$this->title);
1223 $this->tpl->setVariable(
"TOP_ANCHOR",$this->
getTopAnchor());
1226 $this->tpl->setVariable(
"BLK_CLASS",
"Block");
1228 $this->tpl->parseCurrentBlock();
1232 if ($this->enabled[
"header"])
1237 $this->tpl->touchBlock(
"tbl_table_end");
1239 return $this->tpl->get();
1252 if (count(
$filter) == 0 && count($opt_filter) == 0)
1257 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1260 $tpl->addJavascript(
"./Services/Table/js/ServiceTable.js");
1270 $this->tpl->setCurrentBlock(
"filter_row");
1271 $this->tpl->parseCurrentBlock();
1274 $this->tpl->setCurrentBlock(
"filter_item");
1275 $this->tpl->setVariable(
"OPTION_NAME",
1277 $this->tpl->setVariable(
"F_INPUT_ID",
1278 $item->getFieldId());
1279 $this->tpl->setVariable(
"INPUT_HTML",
1280 $item->getTableFilterHTML());
1281 $this->tpl->parseCurrentBlock();
1288 $this->tpl->touchBlock(
"filter_empty_cell");
1291 $this->tpl->setCurrentBlock(
"filter_row");
1292 $this->tpl->parseCurrentBlock();
1294 $this->tpl->setVariable(
"TXT_FILTER", $lng->txt(
"filter"));
1297 $this->tpl->setVariable(
"TXT_HIDE", $lng->txt(
"hide"));
1299 $this->tpl->setVariable(
"CMD_APPLY", $this->filter_cmd);
1300 $this->tpl->setVariable(
"TXT_APPLY", $lng->txt(
"apply_filter"));
1301 $this->tpl->setVariable(
"CMD_RESET", $this->reset_cmd);
1302 $this->tpl->setVariable(
"TXT_RESET", $lng->txt(
"reset_filter"));
1304 $this->tpl->setCurrentBlock(
"filter_section");
1305 $this->tpl->setVariable(
"FIL_ID", $this->
getId());
1306 if ($this->
getId() !=
"")
1308 $this->tpl->setVariable(
"SAVE_URL",
"./ilias.php?baseClass=ilTablePropertiesStorage&table_id=".
1309 $this->
getId().
"&cmd=hideFilter&user_id=".$ilUser->getId());
1311 $this->tpl->parseCurrentBlock();
1314 include_once(
"./Services/Table/classes/class.ilTablePropertiesStorage.php");
1316 if ($tprop->getProperty($this->getId(), $ilUser->getId(),
"filter") != 1)
1320 $this->tpl->setCurrentBlock(
"filter_hidden");
1321 $this->tpl->setVariable(
"FI_ID", $this->
getId());
1322 $this->tpl->parseCurrentBlock();
1326 $this->tpl->setCurrentBlock(
"filter_activation");
1327 $this->tpl->setVariable(
"TXT_ACTIVATE_FILTER", $lng->txt(
"show_filter"));
1328 $this->tpl->setVariable(
"FILA_ID", $this->
getId());
1329 if ($this->
getId() !=
"")
1331 $this->tpl->setVariable(
"SAVE_URLA",
"./ilias.php?baseClass=ilTablePropertiesStorage&table_id=".
1332 $this->
getId().
"&cmd=showFilter&user_id=".$ilUser->getId());
1334 $this->tpl->parseCurrentBlock();
1350 if ($item->checkInput())
1352 $item->setValueByArray(
$_POST);
1353 $item->writeToSession();
1356 foreach ($opt_filter as $item)
1358 if ($item->checkInput())
1360 $item->setValueByArray(
$_POST);
1361 $item->writeToSession();
1378 if ($item->checkInput())
1380 $item->setValueByArray(
$_POST);
1381 $item->clearFromSession();
1384 foreach ($opt_filter as $item)
1386 if ($item->checkInput())
1388 $item->setValueByArray(
$_POST);
1389 $item->clearFromSession();
1402 foreach ($a_set as
$key => $value)
1404 $this->tpl->setVariable(
"VAL_".strtoupper(
$key), $value);
1420 $this->tpl->setCurrentBlock(
"select_all_checkbox");
1421 $this->tpl->setVariable(
"SELECT_ALL_TXT_SELECT_ALL", $lng->txt(
"select_all"));
1423 $this->tpl->setVariable(
"SELECT_ALL_FORM_NAME", $this->
getFormName());
1424 $this->tpl->setVariable(
"CHECKBOXNAME",
"chb_select_all_" . $this->unique_id);
1425 $this->tpl->parseCurrentBlock();
1429 if ($this->enabled[
"numinfo"] && $this->enabled[
"footer"])
1431 $start = $this->offset + 1;
1438 if ($end > $this->max_count or $this->limit == 0)
1443 if ($this->max_count > 0)
1445 if ($this->lang_support)
1447 $numinfo =
"(".$start.
" - ".$end.
" ".strtolower($this->lng->txt(
"of")).
" ".$this->max_count.
")";
1451 $numinfo =
"(".$start.
" - ".$end.
" of ".$this->max_count.
")";
1454 if ($this->max_count > 0)
1458 $this->tpl->setCurrentBlock(
"tbl_footer_numinfo");
1459 $this->tpl->setVariable(
"NUMINFO", $numinfo);
1460 $this->tpl->parseCurrentBlock();
1467 if ($this->enabled[
"linkbar"] && $this->enabled[
"footer"] && $this->limit != 0
1468 && $this->max_count > 0)
1471 "link" => $this->footer_style,
1472 "prev" => $this->footer_previous,
1473 "next" => $this->footer_next,
1478 $this->tpl->setCurrentBlock(
"tbl_footer_linkbar");
1479 $this->tpl->setVariable(
"LINKBAR", $linkbar);
1480 $this->tpl->parseCurrentBlock();
1488 $this->tpl->setCurrentBlock(
"tbl_footer");
1489 $this->tpl->setVariable(
"COLUMN_COUNT", $this->
getColumnCount());
1492 $this->tpl->setVariable(
"BLK_CLASS",
"Block");
1494 $this->tpl->parseCurrentBlock();
1497 if ($numinfo !=
"" || $linkbar !=
"")
1501 $this->tpl->setCurrentBlock(
"top_numinfo");
1502 $this->tpl->setVariable(
"NUMINFO", $numinfo);
1503 $this->tpl->parseCurrentBlock();
1508 $this->tpl->setCurrentBlock(
"top_linkbar");
1509 $this->tpl->setVariable(
"LINKBAR", $linkbar);
1510 $this->tpl->parseCurrentBlock();
1512 $this->tpl->setCurrentBlock(
"top_navigation");
1513 $this->tpl->setVariable(
"COLUMN_COUNT", $this->
getColumnCount());
1516 $this->tpl->setVariable(
"BLK_CLASS",
"Block");
1518 $this->tpl->parseCurrentBlock();
1535 if (is_object($ilUser) && $ilUser->prefs[
"screen_reader_optimization"])
1537 $hash =
"#".$this->getTopAnchor();
1540 $link = $ilCtrl->getLinkTargetByClass(get_class($this->parent_obj), $this->parent_cmd).
1541 "&".$this->getNavParameter().
"=".
1545 $layout_prev = $lng->txt(
"previous");
1546 $layout_next = $lng->txt(
"next");
1549 if ($this->max_count > $this->
getLimit() || $this->custom_prev_next)
1552 if ($this->custom_prev_next && $this->custom_prev !=
"")
1554 $LinkBar .=
"<a href=\"".$this->custom_prev.$hash.
"\">".$layout_prev.
" </a>";
1556 else if ($this->
getOffset() >= 1 && !$this->custom_prev_next)
1559 $LinkBar .=
"<a href=\"".$link.$prevoffset.$hash.
"\">".$layout_prev.
" </a>";
1563 $LinkBar .=
'<span class="ilTableFootLight">'.$layout_prev.
" </span>";
1569 $LinkBar .=
'<input type="hidden" name="'.$this->getNavParameter().
1574 $pages = intval($this->max_count / $this->
getLimit());
1577 if (($this->max_count % $this->
getLimit()))
1581 $offset_arr = array();
1582 for ($i = 1 ;$i <= $pages ; $i++)
1584 $newoffset = $this->
getLimit() * ($i-1);
1587 $offset_arr[$nav_value] = $i;
1600 if ($this->custom_prev_next && $this->custom_next !=
"")
1603 $LinkBar .=
"<span> | </span>";
1604 $LinkBar .=
"<a href=\"".$this->custom_next.$hash.
"\"> ".$layout_next.
"</a>";
1606 else if (! ( ($this->
getOffset() / $this->
getLimit())==($pages-1) ) && ($pages!=1) &&
1607 !$this->custom_prev_next)
1610 $LinkBar .=
"<span> | </span>";
1612 $LinkBar .=
"<a href=\"".$link.$newoffset.$hash.
"\"> ".$layout_next.
"</a>";
1617 $LinkBar .=
"<span > | </span>";
1618 $LinkBar .=
'<span class="ilTableFootLight"> '.$layout_next.
"</span>";
1621 if (count($offset_arr) && !$this->
getDisplayAsBlock() && !$this->custom_prev_next)
1623 $LinkBar .=
" ".
1624 '<label for="tab_page_sel_'.$a_num.
'">'.$lng->txt(
"select_page").
'</label> '.
1626 $this->
getNavParameter().$a_num, $offset_arr,
false,
true, 0,
"ilEditSelect",
1627 array(
"id" =>
"tab_page_sel_".$a_num)).
1628 ' <input class="ilEditSubmit" type="submit" name="cmd['.$this->parent_cmd.
']" value="'.
1629 $lng->txt(
"ok").
'" /> ';
1642 $hidden_row =
false;
1643 if(count($this->hidden_inputs))
1645 foreach ($this->hidden_inputs as $hidden_input)
1647 $this->tpl->setCurrentBlock(
"tbl_hidden_field");
1648 $this->tpl->setVariable(
"FIELD_NAME", $hidden_input[
"name"]);
1649 $this->tpl->setVariable(
"FIELD_VALUE", $hidden_input[
"value"]);
1650 $this->tpl->parseCurrentBlock();
1653 $this->tpl->setCurrentBlock(
"tbl_hidden_row");
1654 $this->tpl->parseCurrentBlock();
1666 $action_row =
false;
1670 if (count($this->sel_buttons) > 0)
1672 foreach ($this->sel_buttons as $button)
1674 $this->tpl->setCurrentBlock(
"sel_button");
1675 $this->tpl->setVariable(
"SBUTTON_SELECT",
1677 $button[
"options"],
false,
true));
1678 $this->tpl->setVariable(
"SBTN_NAME", $button[
"cmd"]);
1679 $this->tpl->setVariable(
"SBTN_VALUE", $button[
"text"]);
1680 $this->tpl->parseCurrentBlock();
1684 $this->tpl->setCurrentBlock(
"sel_top_button");
1685 $this->tpl->setVariable(
"SBUTTON_SELECT",
1687 $button[
"options"],
false,
true));
1688 $this->tpl->setVariable(
"SBTN_NAME", $button[
"cmd"]);
1689 $this->tpl->setVariable(
"SBTN_VALUE", $button[
"text"]);
1690 $this->tpl->parseCurrentBlock();
1696 $this->sel_buttons[] = array(
"options" => $a_options,
"cmd" => $a_cmd,
"text" => $a_text);
1699 if (count($this->buttons) > 0)
1701 foreach ($this->buttons as $button)
1703 if (strlen($button[
'onclick']))
1705 $this->tpl->setCurrentBlock(
'cmdonclick');
1706 $this->tpl->setVariable(
'CMD_ONCLICK', $button[
'onclick']);
1707 $this->tpl->parseCurrentBlock();
1709 $this->tpl->setCurrentBlock(
"plain_button");
1710 $this->tpl->setVariable(
"PBTN_NAME", $button[
"cmd"]);
1711 $this->tpl->setVariable(
"PBTN_VALUE", $button[
"text"]);
1712 $this->tpl->parseCurrentBlock();
1716 if (strlen($button[
'onclick']))
1718 $this->tpl->setCurrentBlock(
'top_cmdonclick');
1719 $this->tpl->setVariable(
'CMD_ONCLICK', $button[
'onclick']);
1720 $this->tpl->parseCurrentBlock();
1722 $this->tpl->setCurrentBlock(
"plain_top_button");
1723 $this->tpl->setVariable(
"PBTN_NAME", $button[
"cmd"]);
1724 $this->tpl->setVariable(
"PBTN_VALUE", $button[
"text"]);
1725 $this->tpl->parseCurrentBlock();
1734 if(count($this->mi_sel_buttons))
1736 foreach ($this->mi_sel_buttons as $button)
1738 $this->tpl->setCurrentBlock(
"mi_sel_button");
1739 $this->tpl->setVariable(
"MI_BUTTON_SELECT",
1741 $button[
"options"],
false,
true));
1742 $this->tpl->setVariable(
"MI_BTN_NAME", $button[
"cmd"]);
1743 $this->tpl->setVariable(
"MI_BTN_VALUE", $button[
"text"]);
1744 $this->tpl->parseCurrentBlock();
1748 $this->tpl->setCurrentBlock(
"mi_top_sel_button");
1749 $this->tpl->setVariable(
"MI_BUTTON_SELECT",
1751 $button[
"options"],
false,
true));
1752 $this->tpl->setVariable(
"MI_BTN_NAME", $button[
"cmd"]);
1753 $this->tpl->setVariable(
"MI_BTN_VALUE", $button[
"text"]);
1754 $this->tpl->parseCurrentBlock();
1763 if (count($this->multi) > 1 && $this->
dataExists())
1765 $this->tpl->setCurrentBlock(
"tbl_cmd_select");
1767 foreach ($this->multi as $mc)
1769 $sel[$mc[
"cmd"]] = $mc[
"text"];
1771 $this->tpl->setVariable(
"SELECT_CMDS",
1773 $this->tpl->setVariable(
"TXT_EXECUTE", $lng->txt(
"execute"));
1774 $this->tpl->parseCurrentBlock();
1780 $this->tpl->setCurrentBlock(
"tbl_top_cmd_select");
1782 foreach ($this->multi as $mc)
1784 $sel[$mc[
"cmd"]] = $mc[
"text"];
1786 $this->tpl->setVariable(
"SELECT_CMDS",
1788 $this->tpl->setVariable(
"TXT_EXECUTE", $lng->txt(
"execute"));
1789 $this->tpl->parseCurrentBlock();
1794 $this->tpl->setCurrentBlock(
"tbl_single_cmd");
1796 foreach ($this->multi as $mc)
1801 $this->tpl->setVariable(
"TXT_SINGLE_CMD",$txt);
1802 $this->tpl->setVariable(
"SINGLE_CMD",
$cmd);
1803 $this->tpl->parseCurrentBlock();
1809 $this->tpl->setCurrentBlock(
"tbl_top_single_cmd");
1811 foreach ($this->multi as $mc)
1816 $this->tpl->setVariable(
"TXT_SINGLE_CMD",$txt);
1817 $this->tpl->setVariable(
"SINGLE_CMD",
$cmd);
1818 $this->tpl->parseCurrentBlock();
1824 $this->tpl->setCurrentBlock(
"tbl_action_img_arrow");
1826 $this->tpl->setVariable(
"ALT_ARROW", $lng->txt(
"action"));
1827 $this->tpl->parseCurrentBlock();
1831 $this->tpl->setCurrentBlock(
"tbl_top_action_img_arrow");
1833 $this->tpl->setVariable(
"ALT_ARROW", $lng->txt(
"action"));
1834 $this->tpl->parseCurrentBlock();
1840 $this->tpl->setCurrentBlock(
"tbl_action_row");
1841 $this->tpl->parseCurrentBlock();
1844 $this->tpl->setCurrentBlock(
"tbl_top_action_row");
1845 $this->tpl->parseCurrentBlock();
1858 $this->headerHTML = $html;