4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
31 $this->pool = $a_parent_obj->object;
32 $this->ref_id = $a_ref_id;
33 $this->
setId(
"bkrsv");
37 $this->
setTitle($lng->txt(
"book_reservations_list"));
39 $this->
addColumn($this->lng->txt(
"title"));
40 $this->
addColumn($this->lng->txt(
"book_period"));
41 $this->
addColumn($this->lng->txt(
"user"));
42 $this->
addColumn($this->lng->txt(
"status"));
43 $this->
addColumn($this->lng->txt(
"actions"));
47 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
48 $this->
setRowTemplate(
"tpl.booking_reservation_row.html",
"Modules/BookingManager");
54 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
66 include_once
"Modules/BookingManager/classes/class.ilBookingType.php";
67 $options = array(
""=>$this->lng->txt(
'book_all'));
70 $options[$item[
"booking_type_id"]] = $item[
"title"];
73 $item->setOptions($options);
74 $this->filter[
"type"] = $item->getValue();
76 $options = array(
""=>$this->lng->txt(
'book_all'));
81 $options[$loop] = $this->lng->txt(
'book_reservation_status_'.$loop);
85 $options[$loop] = $this->lng->txt(
'book_not').
' '.$this->lng->txt(
'book_reservation_status_'.-$loop);
89 $item->setOptions($options);
90 $this->filter[
"status"] = $item->getValue();
93 $this->filter[
"fromto"] = $item->getDate();
103 if($this->filter[
"type"])
105 $filter[
"type"] = $this->filter[
"type"];
107 if($this->filter[
"status"])
109 $filter[
"status"] = $this->filter[
"status"];
111 if($this->filter[
"fromto"][
"from"] || $this->filter[
"fromto"][
"to"])
113 if($this->filter[
"fromto"][
"from"])
117 if($this->filter[
"fromto"][
"to"])
135 include_once
"Modules/BookingManager/classes/class.ilBookingObject.php";
150 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
151 $this->tpl->setVariable(
"RESERVATION_ID", $a_set[
"booking_reservation_id"]);
158 $this->tpl->setVariable(
"TXT_STATUS", $lng->txt(
'book_reservation_status_'.$a_set[
'status']));
161 $this->tpl->setVariable(
"TXT_CURRENT_USER", ilObjUser::_lookupFullName($a_set[
'user_id']));
163 $ilCtrl->setParameter($this->parent_obj,
'user_id', $a_set[
'user_id']);
164 $this->tpl->setVariable(
"HREF_PROFILE", $ilCtrl->getLinkTarget($this->parent_obj,
'showprofile'));
165 $ilCtrl->setParameter($this->parent_obj,
'user_id',
'');
171 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
173 $alist->setId($a_set[
'booking_reservation_id']);
174 $alist->setListTitle($lng->txt(
"actions"));
176 $ilCtrl->setParameter($this->parent_obj,
'reservation_id', $a_set[
'booking_reservation_id']);
178 if($ilAccess->checkAccess(
'write',
'', $this->ref_id))
192 $alist->addItem($lng->txt(
'book_set_in_use'),
'in_use', $ilCtrl->getLinkTarget($this->parent_obj,
'rsvInUse'));
193 $alist->addItem($lng->txt(
'book_set_cancel'),
'cancel', $ilCtrl->getLinkTarget($this->parent_obj,
'rsvCancel'));
197 $alist->addItem($lng->txt(
'book_set_not_in_use'),
'not_in_use', $ilCtrl->getLinkTarget($this->parent_obj,
'rsvNotInUse'));
202 $alist->addItem($lng->txt(
'book_set_cancel'),
'cancel', $ilCtrl->getLinkTarget($this->parent_obj,
'rsvCancel'));
205 $this->tpl->setVariable(
'LAYER', $alist->getHTML());