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
8 changes: 4 additions & 4 deletions components/ILIAS/COPage/PC/Paragraph/MenuGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,19 @@ public function render(


$numbered_list = $ui->renderer()->render(
$ui->factory()->symbol()->glyph()->numberedlist(null)
$ui->factory()->symbol()->glyph()->numberedlist()
);

$bullet_list = $ui->renderer()->render(
$ui->factory()->symbol()->glyph()->bulletlist(null)
$ui->factory()->symbol()->glyph()->bulletlist()
);

$indent = $ui->renderer()->render(
$ui->factory()->symbol()->glyph()->listindent(null)
$ui->factory()->symbol()->glyph()->listindent()
);

$outdent = $ui->renderer()->render(
$ui->factory()->symbol()->glyph()->listoutdent(null)
$ui->factory()->symbol()->glyph()->listoutdent()
);

// menu
Expand Down
16 changes: 12 additions & 4 deletions components/ILIAS/Calendar/classes/class.ilCalendarDayGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ protected function show(): void
$this->tpl->setCurrentBlock("new_app1");
$this->tpl->setVariable(
'H_NEW_APP_GLYPH',
$this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add($new_app_url))
$this->ui_renderer->render(
$this->ui_factory->link()->standard(
'',
$new_app_url,
)->withSymbol($this->ui_factory->symbol()->glyph()->add())
)
);
$this->tpl->parseCurrentBlock();

Expand Down Expand Up @@ -186,9 +191,12 @@ protected function show(): void
$this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'hour', floor($numeric / 60));
$this->tpl->setVariable(
'NEW_APP_GLYPH',
$this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add(
$this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add')
))
$this->ui_renderer->render(
$this->ui_factory->link()->standard(
'',
$this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add')
)->withSymbol($this->ui_factory->symbol()->glyph()->add())
)
);
$this->tpl->parseCurrentBlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ public function show(): void
$this->tpl->setCurrentBlock("new_app");
$this->tpl->setVariable(
'NEW_GLYPH',
$this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add($new_app_url))
$this->ui_renderer->render(
$this->ui_factory->link()->standard(
'',
$new_app_url
)->withSymbol($this->ui_factory->symbol()->glyph()->add())
)
);
$this->tpl->parseCurrentBlock();

Expand Down
18 changes: 14 additions & 4 deletions components/ILIAS/Calendar/classes/class.ilCalendarWeekGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,14 @@ protected function addAppointmentLink(ilDateTime $date): void

$this->tpl->setCurrentBlock("new_app");
//$this->tpl->setVariable('NEW_APP_LINK',$new_app_url);
$this->tpl->setVariable('NEW_APP_GLYPH', $this->ui_renderer->render(
$this->ui_factory->symbol()->glyph()->add($new_app_url)
));
$this->tpl->setVariable(
'NEW_APP_GLYPH', $this->ui_renderer->render(
$this->ui_factory->link()->standard(
'',
$new_app_url
)->withSymbol($this->ui_factory->symbol()->glyph()->add())
)
);
// $this->tpl->setVariable('NEW_APP_ALT',$this->lng->txt('cal_new_app'));
$this->tpl->parseCurrentBlock();

Expand Down Expand Up @@ -523,7 +528,12 @@ protected function addTimedEvents(array $hours, int $morning_aggr, int $evening_
$new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
$this->tpl->setVariable(
"DAY_NEW_APP_LINK",
$this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add($new_app_url))
$this->ui_renderer->render(
$this->ui_factory->link()->standard(
'',
$new_app_url
)->withSymbol($this->ui_factory->symbol()->glyph()->add())
)
);
$this->tpl->setVariable('DAY_NEW_ID', ++$new_link_counter);
$this->tpl->parseCurrentBlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ protected function fillRow(array $a_set): void
$this->tpl->setCurrentBlock('view');
$this->tpl->setVariable(
"VIEW_DETAILS",
$this->ui->renderer()->render($this->ui->factory()->symbol()->glyph()->enlarge($a_set["_front"]))
$this->ui->renderer()->render(
$this->ui->factory()->link()->standard(
'',
$a_set["_front"]
)->withSymbol($this->ui->factory()->symbol()->glyph()->enlarge())
)
);
$this->tpl->parseCurrentBlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ protected function parseRow(
$this->tpl->setCurrentBlock("team_member_removal_bl");
$this->tpl->setVariable("URL_TEAM_MEMBER_REMOVAL", $url);

$rem_gl = $this->ui_factory->symbol()->glyph()->remove($url);
$rem_gl = $this->ui_factory->link()->standard('', $url)
->withSymbol($this->ui_factory->symbol()->glyph()->remove());
$this->tpl->setVariable(
"TXT_TEAM_MEMBER_REMOVAL",
$this->ui_renderer->render($rem_gl)
Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/Forum/classes/class.ilObjForumGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ private function renderDraftContent(
$tpl->setVariable(
'DOWNLOAD_IMG',
$this->uiRenderer->render(
$this->uiFactory->symbol()->glyph()->attachment($this->lng->txt('forums_download_attachment'))
$this->uiFactory->symbol()->glyph()->attachment()
)
);
if (count($filesOfDraft) > 1) {
Expand Down Expand Up @@ -1298,7 +1298,7 @@ protected function renderPostContent(
$tpl->setVariable(
'DOWNLOAD_IMG',
$this->uiRenderer->render(
$this->uiFactory->symbol()->glyph()->attachment($this->lng->txt('forums_download_attachment'))
$this->uiFactory->symbol()->glyph()->attachment()
)
);
if (count($filesOfPost) > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ public function getHeaderAction(?ilGlobalTemplateInterface $main_tpl = null): st
$f = $this->ui->factory();
$this->addHeaderGlyph(
'tags',
$f->symbol()->glyph()->tag('#')
$f->symbol()->glyph()->tag()
->withCounter($f->counter()->status(count($tags))),
ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js)
);
Expand All @@ -2346,7 +2346,7 @@ public function getHeaderAction(?ilGlobalTemplateInterface $main_tpl = null): st
$f = $this->ui->factory();
$this->addHeaderGlyph(
'notes',
$f->symbol()->glyph()->note('#')
$f->symbol()->glyph()->note()
->withCounter($f->counter()->status((int) $cnt[$this->obj_id][Note::PRIVATE])),
ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js)
);
Expand All @@ -2361,7 +2361,7 @@ public function getHeaderAction(?ilGlobalTemplateInterface $main_tpl = null): st
$f = $this->ui->factory();
$this->addHeaderGlyph(
'comments',
$f->symbol()->glyph()->comment('#')
$f->symbol()->glyph()->comment()
->withCounter($f->counter()->status((int) $cnt[$this->obj_id][Note::PUBLIC])),
ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js)
);
Expand Down
22 changes: 11 additions & 11 deletions components/ILIAS/Like/classes/class.ilLikeGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,15 @@ protected function renderEmoCounters(
$comps = array();
foreach ($this->data->getExpressionTypes() as $k => $txt) {
if ($cnts[$k] > 0) {
$glyph = $this->getGlyphForConst($k, $unavailable);
$glyph = $this->getGlyphForConst($k)->withCounter($f->counter()->status($cnts[$k]));
$comp = $f->button()->shy('', '#')->withSymbol($glyph);
if ($modal_signal !== null) {
$glyph = $glyph->withOnClick($modal_signal);
$comp = $comp->withOnClick($modal_signal);
}
$comps[] = $glyph->withCounter($f->counter()->status($cnts[$k]));
if ($unavailable) {
$comp = $comp->withUnavailableAction();
}
$comps[] = $comp;
}
}

Expand All @@ -193,10 +197,8 @@ protected function renderEmoCounters(
return $tpl->get();
}

protected function getGlyphForConst(
int $a_const,
bool $unavailable = false
): ?\ILIAS\UI\Component\Symbol\Glyph\Glyph {
protected function getGlyphForConst(int $a_const): ?\ILIAS\UI\Component\Symbol\Glyph\Glyph
{
$f = $this->ui->factory();
$like = null;
switch ($a_const) {
Expand All @@ -215,9 +217,6 @@ protected function getGlyphForConst(
case ilLikeData::TYPE_ANGRY: $like = $f->symbol()->glyph()->angry();
break;
}
if ($unavailable) {
$like = $like->withUnavailableAction();
}
return $like;
}

Expand Down Expand Up @@ -332,7 +331,8 @@ public function renderModal(): void
$name
);

$g = $this->getGlyphForConst($exp["expression"], true);
$g = $f->button()->shy('', '#')->withSymbol($this->getGlyphForConst($exp["expression"]))
->withUnavailableAction();
$placeholder = "###" . $exp["expression"] . "###";
$glyph_renderings[$placeholder] = $r->render($g);

Expand Down
32 changes: 18 additions & 14 deletions components/ILIAS/Notes/Note/class.ilNoteGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1364,13 +1364,15 @@ public function getGlyph(): string
$query_url = $ctrl->getLinkTarget($this, "getListHtml", "", true, false);
$comps = array();
$c = $f->counter()->status((int) $cnt);
$comps[] = $f->symbol()->glyph()->comment()->withCounter($c)->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
$code = "$('#$id').attr('data-note-key','$hash');\n";
$code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
$code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
$code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
return $code;
});
$comps[] = $f->button()->shy('', '#')
->withSymbol($f->symbol()->glyph()->comment()->withCounter($c))
->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
$code = "$('#$id').attr('data-note-key','$hash');\n";
$code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
$code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
$code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
return $code;
});
if ($this->ctrl->isAsynch()) {
$html = $r->renderAsync($comps);
} else {
Expand Down Expand Up @@ -1504,13 +1506,15 @@ public function getWidget(): string
$comps = array();
if ($cnt > 0) {
$c = $f->counter()->status((int) $cnt);
$comps[] = $f->symbol()->glyph()->comment()->withCounter($c)->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
$code = "$('#$id').attr('data-note-key','$hash');\n";
$code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
$code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
$code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
return $code;
});
$comps[] = $f->button()->standard( '', '#')
->withSymbol($f->symbol()->glyph()->comment()->withCounter($c))
->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
$code = "$('#$id').attr('data-note-key','$hash');\n";
$code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
$code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
$code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
return $code;
});
$comps[] = $f->divider()->vertical();
$tpl->setVariable("GLYPH", $r->render($comps));
$tpl->setVariable("TXT_LATEST", $this->getLatestItemText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ public static function initializeFrontend(ilGlobalTemplateInterface $page): void
$chatWindowTemplate->setVariable('SUBMIT_ACTION', $renderer->render(
$factory->button()->standard($DIC->language()->txt('chat_osc_send'), 'onscreenchat-submit')
));
$chatWindowTemplate->setVariable('ADD_ACTION', $renderer->render(
$factory->symbol()->glyph()->add('addUser')
));
$add_button = $factory->button()->shy('', 'addUser')
->withSymbol($factory->symbol()->glyph()->add());

$chatWindowTemplate->setVariable('ADD_ACTION', $renderer->render($add_button));
$chatWindowTemplate->setVariable('MINIMIZE_ACTION', $renderer->render(
$factory->button()->minimize()
));
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/OnScreenChat/resources/onscreenchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
const setAttributes = obj => node => Object.entries(obj)
.forEach(([k, v]) => node.setAttribute(k, v));

dummyParent.querySelectorAll('[href="addUser"]').forEach(setAttributes({
dummyParent.querySelectorAll('[data-action="addUser"]').forEach(setAttributes({
"title": il.Language.txt('chat_osc_add_user'),
"data-onscreenchat-add": conversation.id,
"data-toggle": "tooltip",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ public function populateQuestionSpecificFormPart(ilPropertyFormGUI $form): ilPro
$tpl->setVariable('SAVE', $this->lng->txt('save'));
$tpl->setVariable('CANCEL', $this->lng->txt('cancel'));
$tpl->setVariable('ADD_BUTTON', $this->ui_renderer->render(
$this->ui_factory->symbol()->glyph()->add()->withAction('#')
$this->ui_factory->link()->standard('', '#')->withSymbol($this->ui_factory->symbol()->glyph()->add())
));
$tpl->setVariable('REMOVE_BUTTON', $this->ui_renderer->render(
$this->ui_factory->symbol()->glyph()->remove()->withAction('#')
$this->ui_factory->link()->standard('', '#')->withSymbol($this->ui_factory->symbol()->glyph()->remove())
));
$tag_input = new ilTagInputGUI();
$tag_input->setPostVar('taggable');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use ILIAS\TestQuestionPool\ilTestLegacyFormsHelper;
use ILIAS\UI\Renderer;
use ILIAS\UI\Component\Symbol\Glyph\Factory as GlyphFactory;
use ILIAS\UI\Component\Link\Factory as LinkFactory;

/**
* This class represents a single choice wizard property in a property form.
Expand All @@ -39,6 +40,7 @@ class ilAnswerWizardInputGUI extends ilTextInputGUI

protected ilTestLegacyFormsHelper $forms_helper;
protected GlyphFactory $glyph_factory;
protected LinkFactory $button_factory;
protected Renderer $renderer;

/**
Expand All @@ -54,6 +56,7 @@ public function __construct($a_title = "", $a_postvar = "")
global $DIC;

$this->forms_helper = new ilTestLegacyFormsHelper();
$this->link_factory = $DIC->ui()->factory()->link();
$this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
$this->renderer = $DIC->ui()->renderer();

Expand Down Expand Up @@ -315,10 +318,10 @@ public function insert(ilTemplate $a_tpl): void
$tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
$tpl->setVariable("ID", $this->getPostVar() . "[$i]");
$tpl->setVariable("UP_BUTTON", $this->renderer->render(
$this->glyph_factory->up()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->up())
));
$tpl->setVariable("DOWN_BUTTON", $this->renderer->render(
$this->glyph_factory->down()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->down())
));
$tpl->parseCurrentBlock();
}
Expand All @@ -332,10 +335,10 @@ public function insert(ilTemplate $a_tpl): void
$tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
$tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
$tpl->setVariable("ADD_BUTTON", $this->renderer->render(
$this->glyph_factory->add()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->add())
));
$tpl->setVariable("REMOVE_BUTTON", $this->renderer->render(
$this->glyph_factory->remove()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->remove())
));
}
if ($this->getDisabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ public function insert(ilTemplate $a_tpl): void
$tpl->setVariable("DISABLED_POINTS", " disabled=\"disabled\"");
}
$tpl->setVariable("ADD_BUTTON", $this->renderer->render(
$this->glyph_factory->add()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->add())
));
$tpl->setVariable("REMOVE_BUTTON", $this->renderer->render(
$this->glyph_factory->remove()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->remove())
));
$tpl->parseCurrentBlock();
$i++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ public function insert(ilTemplate $a_tpl): void
$tpl->setVariable("UP_ID", "up_{$this->getPostVar()}[{$value->getPosition()}]");
$tpl->setVariable("DOWN_ID", "down_{$this->getPostVar()}[{$value->getPosition()}]");
$tpl->setVariable("UP_BUTTON", $this->renderer->render(
$this->glyph_factory->up()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->up())
));
$tpl->setVariable("DOWN_BUTTON", $this->renderer->render(
$this->glyph_factory->down()->withAction('#')
$this->link_factory->standard('', '#')->withSymbol($this->glyph_factory->down())
));
$tpl->parseCurrentBlock();
}
Expand Down
Loading
Loading