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';
28 $this->
setId(
'tos_agreement_by_lng');
37 $this->
setTitle($this->lng->txt(
'tos_agreement_by_lng'));
39 $this->
addColumn($this->lng->txt(
'language'),
'language');
40 $this->
addColumn($this->lng->txt(
'tos_agreement'),
'agreement');
41 $this->
addColumn($this->lng->txt(
'tos_agreement_document'),
'agreement_document');
44 foreach($this->visibleOptionalColumns as $column)
46 $this->
addColumn($this->optionalColumns[$column][
'txt'], $column);
49 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj,
'applyAgreementByLanguageFilter'));
51 $this->
setRowTemplate(
'tpl.tos_agreement_by_lng_table_row.html',
'Services/TermsOfService');
55 require_once
'Services/jQuery/classes/class.iljQueryUtil.php';
56 require_once
'Services/YUI/classes/class.ilYuiUtil.php';
71 $cols = array(
'agreement_document_modification_ts' => array(
'txt' => $this->lng->txt(
'tos_last_modified'),
'default' =>
true));
82 foreach($data[
'items'] as &
$row)
84 $row[
'language'] = $this->lng->txt(
'meta_l_' . $row[
'language']);
94 if(is_string($row[
'agreement_document']) && strlen($row[
'agreement_document']))
98 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document', rawurlencode($row[
'agreement_document']));
99 $row[
'content_link'] = $this->ctrl->getLinkTarget($this->
getParentObject(),
'getAgreementTextByFilenameAsynch',
'',
true,
false);
100 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document',
'');
105 $modal->setHeading($this->lng->txt(
'tos_agreement_document'));
108 $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')
133 if(!is_string($row[$column]) || !strlen($row[$column]))
135 return $this->lng->txt(
'tos_agreement_document_missing');
138 else if($column ==
'agreement')
142 return $this->lng->txt(
'tos_agreement_exists');
146 return $this->lng->txt(
'tos_agreement_missing');
149 else if($column ==
'agreement_document_modification_ts')
154 return $row[$column];
163 if(
'agreement_document_modification_ts' == $column)