/** * Show a list of all rooms. */ public function showRoomsObject() { if (!$this->permission->checkPrivilege(PRIVC::ACCESS_ROOMS)) { ilUtil::sendFailure($this->lng->txt("rep_robj_xrs_no_permission_for_action")); $this->ctrl->redirectByClass('ilinfoscreengui', 'showSummary', 'showSummary'); return false; } $roomsTable = new ilRoomSharingRoomsTableGUI($this, 'showRooms', $this->ref_id); $roomsTable->initFilter(); $roomsTable->getItems($roomsTable->getCurrentFilter()); $toolbar = new ilToolbarGUI(); if ($this->permission->checkPrivilege(PRIVC::ADD_ROOMS)) { $toolbar->addButton($this->lng->txt('rep_robj_xrs_add_room'), $this->ctrl->getLinkTargetByClass('ilroomsharingroomgui', 'addRoom')); } // the commands (functions) to be called when the correspondent buttons are clicked $roomsTable->setResetCommand("resetRoomFilter"); $roomsTable->setFilterCommand("applyRoomFilter"); $this->tpl->setContent($toolbar->getHTML() . $roomsTable->getHTML()); }
/** * Displays the results for the given input. */ public function showSearchResults() { $new_search_toolbar = $this->createNewSearchToolbar(); $search_form = $this->createForm(); $rooms_table = new ilRoomSharingRoomsTableGUI($this, "showSearchResults", $this->ref_id); $rooms_table->setTitle($this->lng->txt("search_results")); $rooms_table->getItems($this->getFormInput($search_form)); $this->tpl->setContent($new_search_toolbar->getHTML() . $rooms_table->getHTML()); }