Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ final protected function getTemplate(string $name, bool $purge_unfilled_vars, bo
protected function getTemplatePath(string $name): string
{
$component = $this->getMyComponent();
return "components/ILIAS/UI/src/templates/default/$component/$name";
return "components/ILIAS/UI/templates/default/$component/$name";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function maybeGetTooltipEmbedding(Help\Topic ...$topics): ?array

$get_template = $this->get_template;
$embed_html = static function (string $tooltip_id, string $component_html) use ($tooltips, $get_template): string {
$tpl = $get_template("components/ILIAS/UI/src/templates/default/tpl.tooltip.html", true, true);
$tpl = $get_template("components/ILIAS/UI/templates/default/tpl.tooltip.html", true, true);
$tpl->setVariable("ELEMENT", $component_html);
$tpl->setVariable("TOOLTIP_ID", $tooltip_id);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function testDataTableRenderTableHeader()
{
$renderer = $this->getRenderer();
$data_factory = new \ILIAS\Data\Factory();
$tpl = $this->getTemplateFactory()->getTemplate("components/ILIAS/UI/src/templates/default/Table/tpl.datatable.html", true, true);
$tpl = $this->getTemplateFactory()->getTemplate("components/ILIAS/UI/templates/default/Table/tpl.datatable.html", true, true);
$f = $this->getColumnFactory();
$data = new class () implements ILIAS\UI\Component\Table\DataRetrieval {
public function getRows(
Expand Down Expand Up @@ -251,7 +251,7 @@ public function testDataTableRenderHeaderWithoutSortableColums(): void
{
$renderer = $this->getRenderer();
$data_factory = new \ILIAS\Data\Factory();
$tpl = $this->getTemplateFactory()->getTemplate("components/ILIAS/UI/src/templates/default/Table/tpl.datatable.html", true, true);
$tpl = $this->getTemplateFactory()->getTemplate("components/ILIAS/UI/templates/default/Table/tpl.datatable.html", true, true);
$f = $this->getColumnFactory();
$data = new class () implements ILIAS\UI\Component\Table\DataRetrieval {
public function getRows(
Expand Down Expand Up @@ -326,7 +326,7 @@ public function testDataTableRenderHeaderWithActions(): void
{
$renderer = $this->getRenderer();
$data_factory = new \ILIAS\Data\Factory();
$tpl = $this->getTemplateFactory()->getTemplate("components/ILIAS/UI/src/templates/default/Table/tpl.datatable.html", true, true);
$tpl = $this->getTemplateFactory()->getTemplate("components/ILIAS/UI/templates/default/Table/tpl.datatable.html", true, true);
$f = $this->getColumnFactory();

$url = $data_factory->uri('http://wwww.ilias.de?ref_id=1');
Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/UI/tests/Renderer/AbstractRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function testGetTemplateSuccessfull(): void
);
$r->_getTemplate("tpl.glyph.html", true, false);

$expected = array(realpath(__DIR__ . "/../../../../../components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.html")
$expected = array(realpath(__DIR__ . "/../../../../../components/ILIAS/UI/templates/default/Symbol/tpl.glyph.html")
=> array(true, false)
);

Expand All @@ -205,7 +205,7 @@ public function testGetTemplateUnsuccessfull(): void
$this->expectException(TypeError::class);
$r->_getTemplate("tpl.counter_foo.html", true, false);

$expected = array(realpath(__DIR__ . "/../../components/ILIAS/UI/src/templates/default/Counter/tpl.counter_foo.html")
$expected = array(realpath(__DIR__ . "/../../components/ILIAS/UI/templates/default/Counter/tpl.counter_foo.html")
=> array(true, false)
);
$this->assertEquals($expected, $this->tpl_factory->files);
Expand Down
6 changes: 3 additions & 3 deletions components/ILIAS/UICore/classes/class.ilTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ protected function getTemplatePath(string $a_tplname, string $a_in_module = ''):

$tpl_sub_path = '/templates/default/';
if (str_starts_with($a_tplname, 'components/ILIAS/UI/')) {
$a_in_module = 'components/ILIAS/UI/src';
$a_tplname = str_replace('components/ILIAS/UI/src/templates/default/', '', $a_tplname);
$a_in_module = 'components/ILIAS/UI';
$a_tplname = str_replace('components/ILIAS/UI/templates/default/', '', $a_tplname);
}

if (str_starts_with($a_tplname, $ilias_root)) {
Expand Down Expand Up @@ -378,7 +378,7 @@ protected function getTemplatePath(string $a_tplname, string $a_in_module = ''):
$style = $this->getCurrentStyle();
$base_path .= 'public/Customizing/skin/' . $skin . '/' . $style;

if ($a_in_module === 'components/ILIAS/UI/src') {
if ($a_in_module === 'components/ILIAS/UI') {
$a_in_module = 'UI';
}

Expand Down
10 changes: 5 additions & 5 deletions components/ILIAS/UICore/tests/ilTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ public static function templatePathDataProvider(): array
],
'ui template' => [
'skin' => 'default', 'style' => 'delos', 'file_exists' => true,
'tpl_filename' => 'components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
'tpl_filename' => 'components/ILIAS/UI/templates/default/Input/tpl.standard.html',
'component' => '',
'expected' => $il_root . '/components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
'expected' => $il_root . '/components/ILIAS/UI/templates/default/Input/tpl.standard.html',
],
'ui template from skin' => [
'skin' => 'mySkin', 'style' => 'myStyle', 'file_exists' => true,
'tpl_filename' => 'components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
'tpl_filename' => 'components/ILIAS/UI/templates/default/Input/tpl.standard.html',
'component' => '',
'expected' => $il_root . '/public/Customizing/skin/mySkin/myStyle/UI/Input/tpl.standard.html',
],
'ui template from skin, unaltered' => [
'skin' => 'mySkin', 'style' => 'myStyle', 'file_exists' => false,
'tpl_filename' => 'components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
'tpl_filename' => 'components/ILIAS/UI/templates/default/Input/tpl.standard.html',
'component' => '',
'expected' => $il_root . '/components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
'expected' => $il_root . '/components/ILIAS/UI/templates/default/Input/tpl.standard.html',
],
'trailing slash' => [
'skin' => 'default', 'style' => 'delos', 'file_exists' => true,
Expand Down