4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
23 $this->perm_ref_id = $a_perm_ref_id;
26 $this->
addColumn($lng->txt(
"news_news_item_content"));
27 $this->
addColumn($lng->txt(
"news_attached_to"));
31 $this->
addColumn($lng->txt(
"last_update"));
48 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
51 if ($a_set[
"user_id"] > 0)
53 $this->tpl->setCurrentBlock(
"user_info");
54 $user_obj =
new ilObjUser($a_set[
"user_id"]);
55 $this->tpl->setVariable(
"VAL_AUTHOR", $user_obj->getLogin());
56 $this->tpl->setVariable(
"TXT_AUTHOR", $lng->txt(
"author"));
57 $this->tpl->parseCurrentBlock();
61 if ($enable_internal_rss)
63 $this->tpl->setCurrentBlock(
"access");
64 $this->tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
66 ($a_set[
"priority"] == 0 &&
68 0, $a_set[
"context_obj_id"])))
70 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
74 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
76 $this->tpl->parseCurrentBlock();
80 if ($a_set[
"creation_date"] != $a_set[
"update_date"])
82 $this->tpl->setCurrentBlock(
"ni_update");
83 $this->tpl->setVariable(
"TXT_LAST_UPDATE", $lng->txt(
"last_update"));
84 $this->tpl->setVariable(
"VAL_LAST_UPDATE",
86 $this->tpl->parseCurrentBlock();
90 $this->tpl->setVariable(
"VAL_CREATION_DATE",
92 $this->tpl->setVariable(
"TXT_CREATED", $lng->txt(
"created"));
95 $this->tpl->setVariable(
"VAL_TITLE", $a_set[
"title"]);
98 if ($a_set[
"content"] !=
"")
100 $this->tpl->setCurrentBlock(
"content");
101 $this->tpl->setVariable(
"VAL_CONTENT",
103 $this->tpl->parseCurrentBlock();
106 $perm_ref_id = ($this->perm_ref_id > 0)
110 if ($ilAccess->checkAccess(
"write",
"", $perm_ref_id))
112 $this->tpl->setCurrentBlock(
"edit");
113 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
114 $ilCtrl->setParameterByClass(
"ilnewsitemgui",
"news_item_id", $a_set[
"id"]);
115 $this->tpl->setVariable(
"CMD_EDIT",
116 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNewsItem"));
117 $this->tpl->parseCurrentBlock();
121 $this->tpl->setVariable(
"CONTEXT",
122 $lng->txt(
"obj_".$a_set[
"context_obj_type"]).
":<br />".
125 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);