44 $this->
setId(
'tos_acceptance_history');
47 parent::__construct($controller, $command);
49 $this->
setTitle($this->lng->txt(
'tos_acceptance_history'));
50 $this->
setFormAction($this->ctrl->getFormAction($controller,
'applyAcceptanceHistoryFilter'));
63 $this->
setRowTemplate(
'tpl.tos_acceptance_history_table_row.html',
'Services/TermsOfService');
80 'txt' => $this->lng->txt(
'tos_tbl_hist_head_acceptance_date'),
87 'txt' => $this->lng->txt(
'tos_tbl_hist_head_login'),
93 'field' =>
'firstname',
94 'txt' => $this->lng->txt(
'tos_tbl_hist_head_firstname'),
100 'field' =>
'lastname',
101 'txt' => $this->lng->txt(
'tos_tbl_hist_head_lastname'),
108 'txt' => $this->lng->txt(
'tos_tbl_hist_head_document'),
114 'field' =>
'criteria',
115 'txt' => $this->lng->txt(
'tos_tbl_hist_head_criteria'),
128 if (
'ts' === $column) {
130 } elseif (
'title' === $column) {
132 } elseif (
'criteria' === $column) {
136 return parent::formatCellValue($column, $row);
144 return '<span class="ilNoDisplay">' . ($this->numRenderedCriteria++) .
'</span>';
156 $criteria = new \ilTermsOfServiceAcceptanceHistoryCriteriaBag($row[
'criteria']);
158 if (0 === count($criteria)) {
159 return $this->lng->txt(
'tos_tbl_hist_cell_not_criterion');
162 foreach ($criteria as $criterion) {
163 $criterionType = $this->criterionTypeFactory->findByTypeIdent($criterion[
'id'],
true);
164 $typeGui = $criterionType->ui($this->lng);
167 $typeGui->getIdentPresentation() .
169 ] = $typeGui->getValuePresentation(
175 $criteriaList = $this->uiFactory
177 ->descriptive($items);
179 return $this->uiRenderer->render([
191 $modal = $this->uiFactory
193 ->lightbox([$this->uiFactory->modal()->lightboxTextPage($row[
'text'], $row[
'title'])]);
195 $titleLink = $this->uiFactory
197 ->shy($row[$column],
'#')
198 ->withOnClick($modal->getShowSignal());
200 return $this->uiRenderer->render([$titleLink, $modal]);
208 if (
'ts' === $column) {
221 $this->lng->txt(
'login') .
'/' . $this->lng->txt(
'email') .
'/' . $this->lng->txt(
'name'),
224 $ul->
setDataSource($this->ctrl->getLinkTarget($this->getParentObject(),
'addUserAutoComplete',
'',
true));
226 $ul->setSubmitFormOnEnter(
true);
228 $ul->readFromSession();
229 $this->filter[
'query'] = $ul->getValue();
231 $this->tpl->addJavaScript(
"./Services/Form/js/Form.js");
232 $duration = new \ilDateDurationInputGUI($this->lng->txt(
'tos_period'),
'period');
233 $duration->setAllowOpenIntervals(
true);
234 $duration->setShowTime(
true);
235 $duration->setStartText($this->lng->txt(
'tos_period_from'));
236 $duration->setEndText($this->lng->txt(
'tos_period_until'));
240 $duration->readFromSession();
241 $this->optional_filter[
'period'] = $duration->getValue();
An entity that renders components to a string output.
setExternalSorting($a_val)
Set external sorting.
setDataSource($href, $a_delimiter=null)
set datasource link for js autocomplete
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.
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)
static initOverlay(ilTemplate $a_main_tpl=null)
Init YUI Overlay module.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
This is how the factory for UI elements looks.
This class represents a text property in a property form.
formatTitle(string $column, array $row)
__construct(\ilTermsOfServiceControllerEnabled $controller, string $command, \ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, Factory $uiFactory, Renderer $uiRenderer)
ilTermsOfServiceAcceptanceHistoryTableGUI constructor.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
getUniqueCriterionListingAttribute()
setFormName($a_formname="")
Set Form name.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static initPanel($a_resize=false, ilTemplate $a_main_tpl=null)
Init yui panel.
Interface ilTermsOfServiceCriterionTypeFactoryInterface.
setFilterCommand($a_val, $a_caption=null)
Set filter command.