4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
23 function __construct($a_parent_obj, $a_parent_cmd, $a_ref_id, $a_type_id)
27 $this->ref_id = $a_ref_id;
28 $this->type_id = $a_type_id;
29 $this->
setId(
"bkobj");
33 include_once
'Modules/BookingManager/classes/class.ilBookingType.php';
35 $this->
setTitle($lng->txt(
"book_objects_list").$type->getTitle());
39 $this->
addColumn($this->lng->txt(
"title"),
"title");
41 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id))
43 $this->
addColumn($this->lng->txt(
"status"));
44 $this->
addColumn($this->lng->txt(
"book_current_user"));
45 $this->
addColumn($this->lng->txt(
"book_period"));
48 $this->
addColumn($this->lng->txt(
"actions"));
51 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
52 $this->
setRowTemplate(
"tpl.booking_object_row.html",
"Modules/BookingManager");
65 include_once
'Modules/BookingManager/classes/class.ilBookingObject.php';
80 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
82 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id))
84 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
88 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id))
90 $this->tpl->setCurrentBlock(
'details');
99 $this->tpl->setVariable(
"TXT_STATUS", $lng->txt(
'book_reservation_status_'.$reservation[
'status']));
101 $this->tpl->setVariable(
"TXT_CURRENT_USER", ilObjUser::_lookupFullName($reservation[
'user_id']));
106 $this->tpl->setVariable(
"TXT_STATUS",
"");
107 $this->tpl->setVariable(
"TXT_CURRENT_USER",
"");
108 $this->tpl->setVariable(
"VALUE_DATE",
"");
111 $this->tpl->parseCurrentBlock();
114 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
116 $alist->setId($a_set[
'booking_object_id']);
117 $alist->setListTitle($lng->txt(
"actions"));
119 $ilCtrl->setParameter($this->parent_obj,
'object_id', $a_set[
'booking_object_id']);
121 if ($a_set[
"schedule_id"])
123 $alist->addItem($lng->txt(
'book_book'),
'book', $ilCtrl->getLinkTarget($this->parent_obj,
'book'));
126 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id))
130 $alist->addItem($lng->txt(
'delete'),
'delete', $ilCtrl->getLinkTarget($this->parent_obj,
'confirmDelete'));
133 $alist->addItem($lng->txt(
'edit'),
'edit', $ilCtrl->getLinkTarget($this->parent_obj,
'edit'));
136 $this->tpl->setVariable(
"LAYER", $alist->getHTML());