4 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceTableGUI.php';
5 require_once
'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
6 require_once
'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
30 $this->ctrl = $DIC[
'ilCtrl'];
32 $this->
setId(
'tos_agreement_by_lng');
39 parent::__construct($a_parent_obj, $a_parent_cmd);
41 $this->
setTitle($this->lng->txt(
'tos_agreement_by_lng'));
43 $this->
addColumn($this->lng->txt(
'language'),
'language');
44 $this->
addColumn($this->lng->txt(
'tos_agreement'),
'agreement');
45 $this->
addColumn($this->lng->txt(
'tos_agreement_document'),
'agreement_document');
48 foreach ($this->visibleOptionalColumns as
$column) {
49 $this->
addColumn($this->optionalColumns[$column][
'txt'], $column);
52 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj,
'applyAgreementByLanguageFilter'));
54 $this->
setRowTemplate(
'tpl.tos_agreement_by_lng_table_row.html',
'Services/TermsOfService');
58 require_once
'Services/jQuery/classes/class.iljQueryUtil.php';
59 require_once
'Services/YUI/classes/class.ilYuiUtil.php';
74 $cols =
array(
'agreement_document_modification_ts' =>
array(
'txt' => $this->lng->txt(
'tos_last_modified'),
'default' =>
true));
85 foreach ($data[
'items'] as &
$row) {
86 $row[
'language'] = $this->lng->txt(
'meta_l_' . $row[
'language']);
96 if (is_string($row[
'agreement_document']) && strlen($row[
'agreement_document'])) {
99 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document', rawurlencode($row[
'agreement_document']));
100 $row[
'content_link'] = $this->ctrl->getLinkTarget($this->
getParentObject(),
'getAgreementTextByFilenameAsynch',
'',
true,
false);
101 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document',
'');
106 $modal->setHeading($this->lng->txt(
'tos_agreement_document'));
110 $row[
'modal'] = $modal->getHTML();
112 $row[
'missing_agreement_css_class'] =
'warning';
121 return array(
'modal',
'id',
'language',
'agreement',
'missing_agreement_css_class',
'agreement_document',
'content_link',
'img_down',
'language_key');
131 if (
$column ==
'agreement_document') {
132 if (!is_string($row[
$column]) || !strlen($row[$column])) {
133 return $this->lng->txt(
'tos_agreement_document_missing');
135 } elseif (
$column ==
'agreement') {
137 return $this->lng->txt(
'tos_agreement_exists');
139 return $this->lng->txt(
'tos_agreement_missing');
141 } elseif (
$column ==
'agreement_document_modification_ts') {
154 if (
'agreement_document_modification_ts' ==
$column) {
setExternalSorting($a_val)
Set external sorting.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
ilTable2GUI constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
prepareData(array &$data)
setExternalSegmentation($a_val)
Set external segmentation.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
static get($a_glyph, $a_text="")
Get glyph html.
getParentObject()
Get parent object.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static initOverlay(ilTemplate $a_main_tpl=null)
Init YUI Overlay module.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
formatCellValue($column, array $row)
Class ilObjectGUI Basic methods of all Output classes.
getSelectedColumns()
Get selected columns.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static getInstance()
Get instance.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
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.
setFilterCommand($a_val, $a_caption=null)
Set filter command.