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)
50 $this->
addColumn($this->optionalColumns[$column][
'txt'], $column);
53 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj,
'applyAgreementByLanguageFilter'));
55 $this->
setRowTemplate(
'tpl.tos_agreement_by_lng_table_row.html',
'Services/TermsOfService');
59 require_once
'Services/jQuery/classes/class.iljQueryUtil.php';
60 require_once
'Services/YUI/classes/class.ilYuiUtil.php';
75 $cols =
array(
'agreement_document_modification_ts' =>
array(
'txt' => $this->lng->txt(
'tos_last_modified'),
'default' =>
true));
86 foreach($data[
'items'] as &
$row)
88 $row[
'language'] = $this->lng->txt(
'meta_l_' . $row[
'language']);
98 if(is_string($row[
'agreement_document']) && strlen($row[
'agreement_document']))
102 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document', rawurlencode($row[
'agreement_document']));
103 $row[
'content_link'] = $this->ctrl->getLinkTarget($this->
getParentObject(),
'getAgreementTextByFilenameAsynch',
'',
true,
false);
104 $this->ctrl->setParameter($this->
getParentObject(),
'agreement_document',
'');
109 $modal->setHeading($this->lng->txt(
'tos_agreement_document'));
113 $row[
'modal'] = $modal->getHTML();
117 $row[
'missing_agreement_css_class'] =
'warning';
126 return array(
'modal',
'id',
'language',
'agreement',
'missing_agreement_css_class',
'agreement_document',
'content_link',
'img_down',
'language_key');
136 if(
$column ==
'agreement_document')
138 if(!is_string($row[
$column]) || !strlen($row[$column]))
140 return $this->lng->txt(
'tos_agreement_document_missing');
143 else if(
$column ==
'agreement')
147 return $this->lng->txt(
'tos_agreement_exists');
151 return $this->lng->txt(
'tos_agreement_missing');
154 else if(
$column ==
'agreement_document_modification_ts')
168 if(
'agreement_document_modification_ts' ==
$column)
setExternalSorting($a_val)
Set external sorting.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
Constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
prepareData(array &$data)
setExternalSegmentation($a_val)
Set external segmentation.
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.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
formatCellValue($column, array $row)
Class ilObjectGUI Basic methods of all Output classes.
static formatDate(ilDateTime $date)
Format a date public.
getSelectedColumns()
Get selected columns.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static initPanel($a_resize=false)
Init yui panel.
static getInstance()
Get instance.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static initOverlay()
Init YUI Overlay module.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
static initjQuery($a_tpl=null)
Init jQuery.
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.
setFilterCommand($a_val, $a_caption=null)
Set filter command.