73        $this->dcl_gui_object = $a_dcl_object;
 
   76        $this->record_id = (int) $_REQUEST[
'record_id'];
 
   79        if (!$this->record_obj->hasPermissionToView((
int) 
$_GET[
'ref_id'])) {
 
   81            $ilCtrl->redirectByClass(
'ildclrecordlistgui', 
'listRecords');
 
   85        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
   87        $tpl->setCurrentBlock(
"SyntaxStyle");
 
   89        $tpl->parseCurrentBlock();
 
   91        $tpl->setCurrentBlock(
"ContentStyle");
 
   93        $tpl->parseCurrentBlock();
 
   95        $this->table = $this->record_obj->getTable();
 
   98        include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
 
   99        $repId = $this->dcl_gui_object->getDataCollectionObject()->getId();
 
  100        $objId = (int) $this->record_id;
 
  101        $this->notesGUI = 
new ilNoteGUI($repId, $objId);
 
  102        $this->notesGUI->enablePublicNotes(
true);
 
  103        $this->notesGUI->enablePublicNotesDeletion(
true);
 
  104        $ilCtrl->setParameterByClass(
"ilnotegui", 
"record_id", $this->record_id);
 
  105        $ilCtrl->setParameterByClass(
"ilnotegui", 
"rep_id", $repId);
 
  107        if (isset(
$_GET[
'disable_paging']) && 
$_GET[
'disable_paging']) {
 
  108            $this->is_enabled_paging = 
false;
 
  111        if ($this->is_enabled_paging) {
 
  121        $this->tableview_id = 
$_GET[
'tableview_id'] ? 
$_GET[
'tableview_id'] : $this->table->getFirstTableViewId(
$_GET[
'ref_id']);
 
  122        $ilCtrl->setParameter($this, 
'tableview_id', $this->tableview_id);
 
  123        $ilCtrl->setParameter($this->dcl_gui_object, 
'tableview_id', 
$_GET[
'back_tableview_id'] ? 
$_GET[
'back_tableview_id'] : $this->tableview_id);
 
  126            if ($this->table->getVisibleTableViews(
$_GET[
'ref_id'], 
true)) {
 
  135        $cmdClass = 
$ilCtrl->getCmdClass();
 
  146                        $this->notesGUI->deleteNote();
 
  150                        $this->notesGUI->cancelDelete();
 
  154                        $this->notesGUI->$cmd();
 
  170        $tpl->setContent($table_gui->getHTML());
 
  179        $ilTabs = 
$DIC[
'ilTabs'];
 
  183        $rctpl = 
new ilTemplate(
"tpl.record_view.html", 
false, 
true, 
"Modules/DataCollection");
 
  185        $ilTabs->setTabActive(
"id_content");
 
  187        if (!$this->tableview_id) {
 
  188            $ilCtrl->redirectByClass(
"ildclrecordlistgui", 
"listRecords");
 
  192        include_once(
"class.ilDclDetailedViewDefinitionGUI.php");
 
  194        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  197        $html = $pageObj->getHTML();
 
  198        $rctpl->addCss(
"./Services/COPage/css/content.css");
 
  199        $rctpl->fillCssFiles();
 
  201        foreach (
$table->getRecordFields() as $field) {
 
  203            $pattern = 
'/\[dcliln field="' . preg_quote($field->getTitle(), 
"/") . 
'"\](.*?)\[\/dcliln\]/';
 
  204            if (preg_match($pattern, 
$html)) {
 
  205                $html = preg_replace($pattern, $this->record_obj->getRecordFieldSingleHTML($field->getId(), $this->setOptions(
"$1")), 
$html);
 
  209            $pattern = 
'/\[dclrefln field="' . preg_quote($field->getTitle(), 
"/") . 
'"\](.*?)\[\/dclrefln\]/';
 
  210            if (preg_match($pattern, 
$html)) {
 
  211                $this->currentField = $field;
 
  212                $html = preg_replace_callback($pattern, array( $this, 
"doReplace" ), 
$html);
 
  215            $pattern = 
'/\[ext tableOf="' . preg_quote($field->getTitle(), 
"/") . 
'" field="(.*?)"\]/';
 
  216            if (preg_match($pattern, 
$html)) {
 
  217                $this->currentField = $field;
 
  218                $html = preg_replace_callback($pattern, array( $this, 
"doExtReplace" ), 
$html);
 
  221            $html = str_ireplace(
"[" . $field->getTitle() . 
"]", $this->record_obj->getRecordFieldSingleHTML($field->getId()), 
$html);
 
  223        foreach (
$table->getStandardFields() as $field) {
 
  224            $html = str_ireplace(
"[" . $field->getId() . 
"]", $this->record_obj->getRecordFieldSingleHTML($field->getId()), 
$html);
 
  226        $rctpl->setVariable(
"CONTENT", 
$html);
 
  229        $perma_link = 
new ilPermanentLinkGUI(
"dcl", 
$_GET[
"ref_id"], 
"_" . $this->tableview_id . 
"_" . $this->record_obj->getId());
 
  230        $tpl->setVariable(
'PRMLINK', $perma_link->getHTML());
 
  234        if ($this->is_enabled_paging) {
 
  236            $rctpl->setVariable(
'PREV_NEXT_RECORD_LINKS', $prevNextLinks);
 
  237            $ilCtrl->clearParameters($this); 
 
  238            $rctpl->setVariable(
'FORM_ACTION', 
$ilCtrl->getFormAction($this));
 
  239            $rctpl->setVariable(
'RECORD', $this->lng->txt(
'dcl_record'));
 
  240            $rctpl->setVariable(
'RECORD_FROM_TOTAL', 
sprintf($this->lng->txt(
'dcl_record_from_total'), $this->current_record_position, count($this->record_ids)));
 
  241            $rctpl->setVariable(
'TABLEVIEW_ID', $this->tableview_id);
 
  246        if ($this->record_obj->hasPermissionToEdit((
int) 
$_GET[
'ref_id'])) {
 
  248            $ilCtrl->setParameterByClass(
'ildclrecordeditgui', 
'table_id', $this->table->getId());
 
  249            $ilCtrl->setParameterByClass(
'ildclrecordeditgui', 
'tableview_id', $this->tableview_id);
 
  251            $ilCtrl->saveParameterByClass(
'ildclrecordeditgui', 
'record_id');
 
  252            $button->setUrl(
$ilCtrl->getLinkTargetByClass(
'ildclrecordeditgui', 
'edit'));
 
  253            $button->setCaption($this->lng->txt(
'dcl_edit_record'), 
false);
 
  254            $rctpl->setVariable(
'EDIT_RECORD_BUTTON', $button->render());
 
  259        if ($this->table->getPublicCommentsEnabled()) {
 
  260            $rctpl->setVariable(
'COMMENTS', $this->
renderComments($editComments));
 
  263        $tpl->setContent($rctpl->get());
 
  274        return $this->record_obj->getRecordFieldSingleHTML($this->currentField->getId(), $this->setOptions($found[1]));
 
  285        $ref_rec_ids = $this->record_obj->getRecordFieldValue($this->currentField->getId());
 
  286        if (!is_array($ref_rec_ids)) {
 
  287            $ref_rec_ids = array( $ref_rec_ids );
 
  289        if (!count($ref_rec_ids) || !$ref_rec_ids) {
 
  293        foreach ($ref_rec_ids as $ref_rec_id) {
 
  296        $field = $ref_recs[0]->getTable()->getFieldByTitle($found[1]);
 
  298        $tpl = 
new ilTemplate(
"tpl.reference_list.html", 
true, 
true, 
"Modules/DataCollection");
 
  299        $tpl->setCurrentBlock(
"reference_list");
 
  303                ilUtil::sendInfo(
"Bad Viewdefinition at [ext tableOf=\"" . $found[1] . 
"\" ...]", 
true);
 
  309        foreach ($ref_recs as $ref_record) {
 
  310            $tpl->setCurrentBlock(
"reference");
 
  311            $tpl->setVariable(
"CONTENT", $ref_record->getRecordFieldHTML($field->getId()));
 
  312            $tpl->parseCurrentBlock();
 
  325            return $this->notesGUI->getOnlyCommentsHtml();
 
  327            return $this->notesGUI->editNoteForm();
 
  337        if (!isset(
$_SESSION[
'dcl_record_ids']) || 
$_SESSION[
'dcl_table_id'] != $this->table->getId()) {
 
  342            $this->record_ids = 
$_SESSION[
'dcl_record_ids'];
 
  343            foreach ($this->record_ids as $k => $recId) {
 
  344                if ($recId == $this->record_id) {
 
  346                        $this->prev_record_id = $this->record_ids[$k - 1];
 
  348                    if (($k + 1) < count($this->record_ids)) {
 
  349                        $this->next_record_id = $this->record_ids[$k + 1];
 
  351                    $this->current_record_position = $k + 1;
 
  368        $ilCtrl->setParameter($this, 
'tableview_id', $this->tableview_id);
 
  369        $prevStr = $this->lng->txt(
'dcl_prev_record');
 
  370        $nextStr = $this->lng->txt(
'dcl_next_record');
 
  371        $ilCtrl->setParameter($this, 
'record_id', $this->prev_record_id);
 
  372        $url = 
$ilCtrl->getLinkTarget($this, 
'renderRecord');
 
  375        $ilCtrl->setParameter($this, 
'record_id', $this->next_record_id);
 
  376        $url = 
$ilCtrl->getLinkTarget($this, 
'renderRecord');
 
  391        foreach ($this->record_ids as $k => $recId) {
 
  392            $selected = ($recId == $this->record_id) ? 
" selected" : 
"";
 
  393            $out .= 
"<option value='{$recId}'{$selected}>" . ($k + 1) . 
"</option>";
 
  408        $options[
'link'][
'name'] = $link_name;
 
  421        $this->table->getPartialRecords(
$list->getOrderField(), 
$list->getOrderDirection(), 
$list->getLimit(), 
$list->getOffset(), 
$list->getFilter());
 
  429        return ilObjDataCollectionAccess::hasAccessTo(filter_input(INPUT_GET, 
'ref_id'), $this->table->getId(), $this->tableview_id)
 
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static getTableCache($table_id=0)
static getRecordCache($record_id=0)
Class ilDclDetailedViewDefinitionGUI.
renderComments($edit=false)
renderPrevNextLinks()
Determine and return the markup for the previous/next records.
determineNextPrevRecords()
Find the previous/next record from the current position.
renderSelectOptions()
Render select options.
renderRecord($editComments=false)
loadSession()
If we come from a goto Link we need to build up the session data.
__construct(ilObjDataCollectionGUI $a_dcl_object)
setOptions($link_name)
setOptions string $link_name
Class ilDclBaseFieldModel.
Class ilDclTableViewTableGUI.
static hasWriteAccess($ref, $user_id=0)
Class ilObjDataCollectionGUI.
static getSyntaxStylePath()
get syntax style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Class for permanent links.
special template class to simplify handling of ITX/PEAR
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_REQUEST['delete'])) $list