4 include_once (
"Services/News/classes/class.ilNewsItemGUIGen.php");
23 $ilCtrl->saveParameter($this,
"add_mode");
30 $lng->LoadLanguageModule(
"news");
42 $a_block_gui->setParentClass(
"ilinfoscreengui");
43 $a_block_gui->setParentCmd(
"showSummary");
52 $a_news_item->setContextObjId($this->ctrl->getContextObjId());
53 $a_news_item->setContextObjType($this->ctrl->getContextObjType());
63 $a_news_item->setContextObjId($this->ctrl->getContextObjId());
64 $a_news_item->setContextObjType($this->ctrl->getContextObjType());
65 $a_news_item->setUserId($ilUser->getId());
68 if (!$news_set->get(
"enable_rss_for_internal"))
70 $a_news_item->setVisibility(
"users");
84 if (!$news_set->get(
"enable_rss_for_internal"))
86 $a_form_gui->removeItemByPostVar(
"news_visibility");
90 $nv = $a_form_gui->getItemByPostVar(
"news_visibility");
116 if (
$_GET[
"add_mode"] ==
"block")
118 $ilCtrl->returnToParent($this);
122 $ilCtrl->redirect($this,
"editNews");
144 $ilCtrl->redirect($this,
"editNews");
164 if (
$_GET[
"add_mode"] ==
"block")
166 $ilCtrl->returnToParent($this);
196 $a_table_gui->setDefaultOrderField(
"creation_date");
197 $a_table_gui->setDefaultOrderDirection(
"desc");
198 $a_table_gui->addCommandButton(
"createNewsItem", $lng->txt(
"add"));
199 $a_table_gui->addMultiCommand(
"confirmDeletionNewsItems", $lng->txt(
"delete"));
200 $a_table_gui->setTitle($lng->txt(
"news"),
"icon_news.gif", $lng->txt(
"news"));
201 $a_table_gui->setSelectAllCheckbox(
"news_id");
217 if (count(
$_POST[
"news_id"]) == 0)
223 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
227 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"deleteNewsItems"));
228 $c_gui->setHeaderText($lng->txt(
"info_delete_sure"));
229 $c_gui->setCancel($lng->txt(
"cancel"),
"editNews");
230 $c_gui->setConfirm($lng->txt(
"confirm"),
"deleteNewsItems");
233 foreach(
$_POST[
"news_id"] as $news_id)
236 $c_gui->addItem(
"news_id[]", $news_id, $news->getTitle(),
240 return $c_gui->getHTML();
253 foreach(
$_POST[
"news_id"] as $news_id)