ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSkillLevelResourcesTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 function __construct($a_parent_obj, $a_parent_cmd, $a_skill_id, $a_tref_id,
21 $a_level_id)
22 {
23 global $ilCtrl, $lng, $ilAccess, $lng;
24
25 $this->level_id = $a_level_id;
26
27 include_once("./Services/Skill/classes/class.ilSkillResources.php");
28 $this->resources = new ilSkillResources($a_skill_id, $a_tref_id);
29
30 parent::__construct($a_parent_obj, $a_parent_cmd);
31 $this->setData($this->resources->getResourcesOfLevel($a_level_id));
32 $this->setTitle($lng->txt("resources"));
33
34 $this->addColumn("", "", "1px", true);
35 $this->addColumn($this->lng->txt("type"), "", "1px");
36 $this->addColumn($this->lng->txt("title"), "");
37 $this->addColumn($this->lng->txt("path"));
38
39 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
40 $this->setRowTemplate("tpl.level_resources_row.html", "Services/Skill");
41
42 $this->addMultiCommand("confirmLevelResourcesRemoval", $lng->txt("remove"));
43 //$this->addCommandButton("", $lng->txt(""));
44 }
45
49 protected function fillRow($a_set)
50 {
51 global $lng, $tree;
52
53 $ref_id = $a_set["rep_ref_id"];
55
56 $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($obj_id));
57 $this->tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($obj_id, "tiny")));
58 $this->tpl->setVariable("ID", $ref_id);
59
60 $path = $tree->getPathFull($ref_id);
61 $path_items = array();
62 foreach ($path as $p)
63 {
64 if ($p["type"] != "root" && $p["child"] != $ref_id)
65 {
66 $path_items[] = $p["title"];
67 }
68 }
69 $this->tpl->setVariable("PATH", implode($path_items, " > "));
70 }
71
72}
73?>
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
TableGUI class for skill level resources.
__construct($a_parent_obj, $a_parent_cmd, $a_skill_id, $a_tref_id, $a_level_id)
Constructor.
Manages resources for skills.
Class ilTable2GUI.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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
$ref_id
Definition: sahs_server.php:39
$path
Definition: index.php:22