forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into release_6-0_xapi
- Loading branch information
Showing
10 changed files
with
205 additions
and
13 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
Services/Dashboard/ItemsBlock/classes/class.ilDashObjectsTableGUI.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */ | ||
|
||
/** | ||
* Classic table for rep object lists, including checkbox | ||
* | ||
* @author [email protected] | ||
*/ | ||
class ilDashObjectsTableGUI extends ilTable2GUI | ||
{ | ||
/** | ||
* @var ilCtrl | ||
*/ | ||
protected $ctrl; | ||
|
||
/** | ||
* @var ilLanguage | ||
*/ | ||
protected $lng; | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
function __construct($a_parent_obj, $a_parent_cmd, $sub_id) | ||
{ | ||
global $DIC; | ||
|
||
$this->id = "dash_obj_".$sub_id; | ||
$this->lng = $DIC->language(); | ||
$this->ctrl = $DIC->ctrl(); | ||
|
||
parent::__construct($a_parent_obj, $a_parent_cmd); | ||
|
||
//$this->setData($this->getItems()); | ||
$this->setTitle($this->lng->txt("")); | ||
|
||
$this->addColumn("", "", "", true); | ||
|
||
$this->setEnableNumInfo(false); | ||
$this->setEnableHeader(false); | ||
|
||
//$this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); | ||
$this->setRowTemplate("tpl.dash_obj_row.html", "Services/Dashboard"); | ||
|
||
//$this->addMultiCommand("", $this->lng->txt("")); | ||
//$this->addCommandButton("", $this->lng->txt("")); | ||
$this->setLimit(9999); | ||
} | ||
|
||
/** | ||
* Get items | ||
* | ||
* @return array[] | ||
*/ | ||
/* | ||
protected function getItems() | ||
{ | ||
$items = []; | ||
return $items; | ||
}*/ | ||
|
||
/** | ||
* Fill table row | ||
*/ | ||
protected function fillRow($a_set) | ||
{ | ||
$tpl = $this->tpl; | ||
$ctrl = $this->ctrl; | ||
$lng = $this->lng; | ||
|
||
$tpl->setVariable("ID", $a_set["ref_id"]); | ||
$tpl->setVariable("ICON", ilObject::_getIcon($a_set["obj_id"])); | ||
$tpl->setVariable("TITLE", $a_set["title"]); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
Services/Dashboard/ItemsBlock/classes/class.ilDashObjectsTableRenderer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */ | ||
|
||
/** | ||
* Dashboard objects table renderer | ||
*/ | ||
class ilDashObjectsTableRenderer | ||
{ | ||
protected $parent_gui; | ||
|
||
/** | ||
* Constructor | ||
* @param $parent_gui | ||
*/ | ||
public function __construct($parent_gui) | ||
{ | ||
$this->parent_gui = $parent_gui; | ||
} | ||
|
||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function render(array $groupedItems): string | ||
{ | ||
$cnt = 0; | ||
$html = ""; | ||
foreach ($groupedItems as $group) { | ||
|
||
$items = $group->getItems(); | ||
if (count($items) > 0) { | ||
$table = new ilDashObjectsTableGUI($this->parent_gui, "render", $cnt++); | ||
$table->setTitle($group->getLabel()); | ||
$table->setData($group->getItems()); | ||
$html .= $table->getHTML(); | ||
} | ||
} | ||
return $html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<tr> | ||
<td> | ||
<input type="checkbox" name="id[]" value="{ID}" /> | ||
<img src="{ICON}" class="ilIcon"> | ||
{TITLE} | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters