ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTrashTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Table/classes/class.ilTable2GUI.php");
5
15{
16
20 function __construct($a_parent_obj, $a_parent_cmd)
21 {
22 global $ilCtrl, $lng, $ilAccess, $lng;
23
24 $this->ref_id = $a_ref_id;
25
26 parent::__construct($a_parent_obj, $a_parent_cmd);
27 //$this->setTitle($lng->txt(""));
28
29 $this->addColumn($this->lng->txt(""), "", "1", 1);
30 $this->addColumn($this->lng->txt("type"), "", "1");
31 $this->addColumn($this->lng->txt("title"), "title");
32 $this->addColumn($this->lng->txt("last_change"), "last_update");
33 $this->setDefaultOrderField("title");
34 $this->setDefaultOrderDirection("asc");
35
36
37 $this->setEnableHeader(true);
38 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
39 $this->setRowTemplate("tpl.trash_list_row.html", "Services/Repository");
40 //$this->disable("footer");
41 $this->setEnableTitle(true);
42 $this->setSelectAllCheckbox("trash_id[]");
43
44 $this->addMultiCommand("undelete",$lng->txt("btn_undelete"));
45 $this->addMultiCommand("confirmRemoveFromSystem", $lng->txt("btn_remove_system"));
46 }
47
51 protected function fillRow($a_set)
52 {
53 global $lng, $objDefinition;
54
55 $img = ilObject::_getIcon($obj_id, "small", $a_set["type"]);
56 if (is_file($img))
57 {
58 $alt = ($objDefinition->isPlugin($a_set["type"]))
59 ? $lng->txt("icon")." ".ilPlugin::lookupTxt("rep_robj", $a_set["type"], "obj_".$a_set["type"])
60 : $lng->txt("icon")." ".$lng->txt("obj_".$a_set["type"]);
61
62 $this->tpl->setVariable("IMG_TYPE", ilUtil::img($img, $alt));
63 }
64 $this->tpl->setVariable("ID", $a_set["ref_id"]);
65 $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
66 $this->tpl->setVariable("VAL_LAST_CHANGE", $a_set["last_update"]);
67 }
68
69}
70?>
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static lookupTxt($a_mod_prefix, $a_pl_id, $a_lang_var)
Lookup language text.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
TableGUI class for.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
fillRow($a_set)
Fill table row.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40