1 <?php declare(strict_types=1);
46 $this->
setId(
'tos_acceptance_history');
51 $this->
setTitle($this->lng->txt(
'tos_acceptance_history'));
52 $this->
setFormAction($this->ctrl->getFormAction($controller,
'applyAcceptanceHistoryFilter'));
66 $this->
setRowTemplate(
'tpl.tos_acceptance_history_table_row.html',
'Services/TermsOfService');
83 'txt' => $this->lng->txt(
'tos_tbl_hist_head_acceptance_date'),
90 'txt' => $this->lng->txt(
'tos_tbl_hist_head_login'),
96 'field' =>
'firstname',
97 'txt' => $this->lng->txt(
'tos_tbl_hist_head_firstname'),
103 'field' =>
'lastname',
104 'txt' => $this->lng->txt(
'tos_tbl_hist_head_lastname'),
111 'txt' => $this->lng->txt(
'tos_tbl_hist_head_document'),
117 'field' =>
'criteria',
118 'txt' => $this->lng->txt(
'tos_tbl_hist_head_criteria'),
134 if (
'ts' === $column) {
136 } elseif (
'title' === $column) {
138 } elseif (
'criteria' === $column) {
142 return parent::formatCellValue($column, $row);
150 return '<span class="ilNoDisplay">' . ($this->numRenderedCriteria++) .
'</span>';
166 if (0 === count($criteria)) {
167 return $this->lng->txt(
'tos_tbl_hist_cell_not_criterion');
170 foreach ($criteria as $criterion) {
171 $criterionType = $this->criterionTypeFactory->findByTypeIdent($criterion[
'id'],
true);
172 $typeGui = $criterionType->ui($this->lng);
174 $items[$typeGui->getIdentPresentation() .
181 $criteriaList = $this->uiFactory
183 ->descriptive($items);
185 return $this->uiRenderer->render([
195 protected function formatTitle(
string $column, array $row) : string
197 $modal = $this->uiFactory
199 ->lightbox([$this->uiFactory->modal()->lightboxTextPage($row[
'text'], $row[
'title'])]);
201 $titleLink = $this->uiFactory
203 ->shy($row[$column],
'#')
204 ->withOnClick($modal->getShowSignal());
206 return $this->uiRenderer->render([$titleLink, $modal]);
214 if (
'ts' === $column) {
227 $this->lng->txt(
'login') .
'/' . $this->lng->txt(
'email') .
'/' . $this->lng->txt(
'name'),
230 $ul->setDataSource($this->ctrl->getLinkTarget($this->getParentObject(),
'addUserAutoComplete',
'',
true));
232 $ul->setSubmitFormOnEnter(
true);
234 $ul->readFromSession();
235 $this->filter[
'query'] = $ul->getValue();
239 $duration->setShowTime(
true);
240 $duration->setStartText($this->lng->txt(
'tos_period_from'));
241 $duration->setEndText($this->lng->txt(
'tos_period_until'));
245 $duration->readFromSession();
246 $this->optional_filter[
'period'] = $duration->getValue();
addJavaScript($a_js_file, $a_add_version_parameter=true, $a_batch=2)
An entity that renders components to a string output.
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
formatCellValue(string $column, array $row)
Class ilTermsOfServiceAcceptanceHistoryTableGUI.
Interface ilTermsOfServiceControllerEnabled.
setExternalSegmentation($a_val)
Set external segmentation.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
static initPanel($a_resize=false, ilGlobalTemplateInterface $a_main_tpl=null)
Init yui panel.
Class ilTermsOfServiceCriterionConfig.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
formatCriterionAssignments(string $column, array $row)
Class ilGlobalPageTemplate.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
Class ilTermsOfServiceAcceptanceHistoryCriteriaBag.
This is how the factory for UI elements looks.
formatTitle(string $column, array $row)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
getUniqueCriterionListingAttribute()
static initOverlay(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Overlay module.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
setFormName($a_formname="")
Set Form name.
__construct(Container $dic, ilPlugin $plugin)
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
__construct(ilTermsOfServiceControllerEnabled $controller, string $command, ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, Factory $uiFactory, Renderer $uiRenderer, ilGlobalPageTemplate $globalTemplate)
ilTermsOfServiceAcceptanceHistoryTableGUI constructor.
Interface ilTermsOfServiceCriterionTypeFactoryInterface.
setFilterCommand($a_val, $a_caption=null)
Set filter command.