76 $this->ctrl = $DIC->ctrl();
77 $this->lng = $DIC->language();
78 $this->
user = $DIC->user();
79 $this->access = $DIC->access();
80 $this->ref_id = $a_ref_id;
82 $this->pool_id = $a_pool_id;
86 $this->user_id_to_book = (int)
$_GET[
'bkusr'];
88 $this->ctrl->redirect($a_parent_obj, $a_parent_cmd);
91 $user_name = $user_name_data[
'lastname'] .
", " . $user_name_data[
'firstname'];
93 $this->ctrl->redirect($a_parent_obj,
'render');
96 $this->
setId(
"bkaobj" . $a_ref_id);
98 parent::__construct($a_parent_obj, $a_parent_cmd);
100 $this->
setTitle($this->lng->txt(
"book_assign_object") .
": " . $user_name);
102 $this->
addColumn($this->lng->txt(
"title"),
"title");
103 $this->
addColumn($this->lng->txt(
"description"));
105 $this->
addColumn($this->lng->txt(
"available"));
107 $this->
addColumn($this->lng->txt(
"action"));
115 $this->
setRowTemplate(
"tpl.booking_assign_object_row.html",
"Modules/BookingManager");
128 foreach ($obj_items as $item) {
131 $this->ctrl->setParameterByClass(
'ilbookingobjectgui',
'bkusr', $this->user_id_to_book);
132 $this->ctrl->setParameterByClass(
'ilbookingobjectgui',
'object_id', $item[
'booking_object_id']);
135 'object_id' => $item[
'booking_object_id'],
136 'title' => $item[
'title'],
137 'description' => $item[
'description'],
139 'url_assign' => $this->ctrl->getLinkTargetByClass(
"ilbookingobjectgui",
'book')
141 $this->ctrl->setParameterByClass(
'ilbookingobjectgui',
'bkusr',
'');
142 $this->ctrl->setParameterByClass(
'ilbookingobjectgui',
'object_id',
'');
143 $this->ctrl->setParameterByClass(
'ilbookingobjectgui',
'part_view',
'');
156 $this->tpl->setCurrentBlock(
"available");
157 $this->tpl->setVariable(
"TXT_AVAILABLE", $a_set[
'nr_items']);
158 $this->tpl->parseCurrentBlock();
160 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
'title']);
161 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
'description']);
162 $this->tpl->setVariable(
"TXT_ACTION", $this->lng->txt(
"book_assign"));
163 $this->tpl->setVariable(
"URL_ACTION", $a_set[
'url_assign']);
getItems()
Gather data and build rows.
static _lookupName($a_user_id)
lookup user name
static getList($a_pool_id, $a_title=null)
Get list of booking objects for given type.
__construct(ilBookingParticipantGUI $a_parent_obj, $a_parent_cmd, $a_ref_id, $a_pool_id)
Constructor.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
fillRow($a_set)
Fill table row.
List objects / booking pool assignment.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilBookingParticipantGUI.
static getObjectReservationForUser($a_object_id, $a_user_id, $a_multi=false)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
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.
static numAvailableFromObjectNoSchedule($a_obj_id)
setEnableHeader($a_enableheader)
Set Enable Header.