24 include_once (
"Services/News/classes/class.ilNewsItemGUIGen.php");
43 $ilCtrl->saveParameter($this,
"add_mode");
50 $lng->LoadLanguageModule(
"news");
62 $a_block_gui->setParentClass(
"ilinfoscreengui");
63 $a_block_gui->setParentCmd(
"showSummary");
72 $a_news_item->setContextObjId($this->ctrl->getContextObjId());
73 $a_news_item->setContextObjType($this->ctrl->getContextObjType());
83 $a_news_item->setContextObjId($this->ctrl->getContextObjId());
84 $a_news_item->setContextObjType($this->ctrl->getContextObjType());
85 $a_news_item->setUserId($ilUser->getId());
88 if (!$news_set->get(
"enable_rss_for_internal"))
90 $a_news_item->setVisibility(
"users");
104 if (!$news_set->get(
"enable_rss_for_internal"))
106 $a_form_gui->removeItemByPostVar(
"news_visibility");
110 $nv = $a_form_gui->getItemByPostVar(
"news_visibility");
136 if (
$_GET[
"add_mode"] ==
"block")
138 $ilCtrl->returnToParent($this);
142 $ilCtrl->redirect($this,
"editNews");
164 $ilCtrl->redirect($this,
"editNews");
184 if (
$_GET[
"add_mode"] ==
"block")
186 $ilCtrl->returnToParent($this);
216 $a_table_gui->setDefaultOrderField(
"creation_date");
217 $a_table_gui->setDefaultOrderDirection(
"desc");
218 $a_table_gui->addCommandButton(
"createNewsItem", $lng->txt(
"add"));
219 $a_table_gui->addMultiCommand(
"confirmDeletionNewsItems", $lng->txt(
"delete"));
220 $a_table_gui->setTitle($lng->txt(
"news"),
"icon_news.gif", $lng->txt(
"news"));
221 $a_table_gui->setSelectAllCheckbox(
"news_id");
237 if (count($_POST[
"news_id"]) == 0)
243 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
247 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"deleteNewsItems"));
248 $c_gui->setHeaderText($lng->txt(
"info_delete_sure"));
249 $c_gui->setCancel($lng->txt(
"cancel"),
"editNews");
250 $c_gui->setConfirm($lng->txt(
"confirm"),
"deleteNewsItems");
253 foreach($_POST[
"news_id"] as $news_id)
256 $c_gui->addItem(
"news_id[]", $news_id, $news->getTitle(),
260 return $c_gui->getHTML();
273 foreach($_POST[
"news_id"] as $news_id)