19 declare(strict_types=1);
47 $this->
setId(
'tos_acceptance_history');
52 $this->
setTitle($this->
lng->txt(
'tos_acceptance_history'));
53 $this->
setFormAction($this->
ctrl->getFormAction($controller,
'applyAcceptanceHistoryFilter'));
67 $this->
setRowTemplate(
'tpl.tos_acceptance_history_table_row.html',
'Services/TermsOfService');
81 'txt' => $this->
lng->txt(
'tos_tbl_hist_head_acceptance_date'),
88 'txt' => $this->
lng->txt(
'tos_tbl_hist_head_login'),
94 'field' =>
'firstname',
95 'txt' => $this->
lng->txt(
'tos_tbl_hist_head_firstname'),
101 'field' =>
'lastname',
102 'txt' => $this->
lng->txt(
'tos_tbl_hist_head_lastname'),
109 'txt' => $this->
lng->txt(
'tos_tbl_hist_head_document'),
115 'field' =>
'criteria',
116 'txt' => $this->
lng->txt(
'tos_tbl_hist_head_criteria'),
126 if (
'ts' === $column) {
128 } elseif (
'title' === $column) {
130 } elseif (
'criteria' === $column) {
134 return parent::formatCellValue($column, $row);
139 return '<span class="ilNoDisplay">' . ($this->numRenderedCriteria++) .
'</span>';
148 if (0 === count($criteria)) {
149 return $this->
lng->txt(
'tos_tbl_hist_cell_not_criterion');
152 foreach ($criteria as $criterion) {
153 $criterionType = $this->criterionTypeFactory->findByTypeIdent($criterion[
'id'],
true);
154 $typeGui = $criterionType->ui($this->
lng);
156 $items[$typeGui->getIdentPresentation() .
163 $criteriaList = $this->uiFactory
165 ->descriptive($items);
167 return $this->uiRenderer->render([
174 $modal = $this->uiFactory
176 ->lightbox([$this->uiFactory->modal()->lightboxTextPage($row[
'text'], $row[
'title'])]);
178 $titleLink = $this->uiFactory
180 ->shy($row[$column],
'#')
181 ->withOnClick($modal->getShowSignal());
183 return $this->uiRenderer->render([$titleLink, $modal]);
188 return 'ts' === $a_field;
194 $this->
lng->txt(
'login') .
'/' . $this->
lng->txt(
'email') .
'/' . $this->
lng->txt(
'name'),
197 $ul->setDataSource($this->
ctrl->getLinkTarget($this->getParentObject(),
'addUserAutoComplete',
'',
true));
199 $ul->setSubmitFormOnEnter(
true);
201 $ul->readFromSession();
202 $this->
filter[
'query'] = $ul->getValue();
206 $duration->setShowTime(
true);
207 $duration->setStartText($this->
lng->txt(
'tos_period_from'));
208 $duration->setEndText($this->
lng->txt(
'tos_period_until'));
212 $duration->readFromSession();
213 $this->optional_filter[
'period'] = $duration->getValue();
An entity that renders components to a string output.
formatCellValue(string $column, array $row)
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
__construct(ilTermsOfServiceControllerEnabled $controller, string $command, ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, Factory $uiFactory, Renderer $uiRenderer, ilGlobalTemplateInterface $globalTemplate)
Class ilTermsOfServiceAcceptanceHistoryTableGUI.
setResetCommand(string $a_val, string $a_caption="")
Interface ilTermsOfServiceControllerEnabled.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
setFormName(string $a_name="")
Class ilTermsOfServiceCriterionConfig.
numericOrdering(string $a_field)
formatCriterionAssignments(string $column, array $row)
setExternalSorting(bool $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setDefaultOrderField(string $a_defaultorderfield)
Class ilTermsOfServiceAcceptanceHistoryCriteriaBag.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setFilterCommand(string $a_val, string $a_caption="")
setDefaultOrderDirection(string $a_defaultorderdirection)
formatTitle(string $column, array $row)
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory
getUniqueCriterionListingAttribute()
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
__construct(Container $dic, ilPlugin $plugin)
static initPanel(bool $a_resize=false, ?ilGlobalTemplateInterface $a_main_tpl=null)
Init yui panel used in Modules/Test, Services/TermsOfService (Jan 2022)
static initOverlay(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Overlay module used in Modules/Test, Services/TermsOfService, Services/Tracking, Services/UIComponent.
setExternalSegmentation(bool $a_val)
Interface ilTermsOfServiceCriterionTypeFactoryInterface.