4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php");
6 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioPage.php");
29 parent::__construct($a_parent_obj, $a_parent_cmd);
31 $this->portfolio = $a_parent_obj->object;
33 $this->is_template = ($this->portfolio->getType() ==
"prtt");
37 $this->
addColumn($this->lng->txt(
""),
"",
"1");
38 $this->
addColumn($this->lng->txt(
"user_order"));
39 $this->
addColumn($this->lng->txt(
"title"));
40 $this->
addColumn($this->lng->txt(
"type"));
41 $this->
addColumn($this->lng->txt(
"actions"));
44 $this->
setRowTemplate(
"tpl.portfolio_page_row.html",
"Modules/Portfolio");
46 $this->
addMultiCommand(
"confirmPortfolioPageDeletion", $lng->txt(
"delete"));
50 $lng->txt(
"user_save_ordering_and_titles"));
54 $lng->loadLanguageModule(
"blog");
64 if(!$this->is_template)
66 $this->blogs =
array();
67 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
73 foreach ($tree->getSubTree($root) as $node)
75 if ($node[
"type"] ==
"blog")
77 $this->blogs[$node[
"obj_id"]] = $node[
"wsp_id"];
82 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
83 include_once(
"./Modules/Blog/classes/class.ilObjBlog.php");
94 switch($a_set[
"type"])
97 $this->tpl->setCurrentBlock(
"title_field");
98 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
100 $this->tpl->parseCurrentBlock();
102 $this->tpl->setCurrentBlock(
"action");
103 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit_page"));
104 $ilCtrl->setParameterByClass($this->page_gui,
105 "ppage", $a_set[
"id"]);
106 $this->tpl->setVariable(
"CMD_EDIT",
107 $ilCtrl->getLinkTargetByClass($this->page_gui,
"edit"));
108 $this->tpl->parseCurrentBlock();
109 $this->tpl->setVariable(
"TYPE", $lng->txt(
"page"));
113 if(!$this->is_template)
115 $this->tpl->setCurrentBlock(
"title_static");
117 $this->tpl->parseCurrentBlock();
119 $obj_id = (int)$a_set[
"title"];
120 if(isset($this->blogs[$obj_id]))
122 $node_id = $this->blogs[$obj_id];
126 $ilCtrl->setParameterByClass($this->page_gui,
127 "ppage", $a_set[
"id"]);
128 $link = $ilCtrl->getLinkTargetByClass(
array($this->page_gui,
"ilobjbloggui"),
"render");
130 $this->tpl->setCurrentBlock(
"action");
131 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"blog_edit"));
132 $this->tpl->setVariable(
"CMD_EDIT", $link);
133 $this->tpl->parseCurrentBlock();
135 $this->tpl->setVariable(
"TYPE", $lng->txt(
"obj_blog"));
140 if($this->is_template)
142 $this->tpl->setCurrentBlock(
"title_field");
143 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
145 $this->tpl->parseCurrentBlock();
147 $this->tpl->setCurrentBlock(
"title_static");
149 $this->tpl->parseCurrentBlock();
150 $this->tpl->setVariable(
"TYPE", $lng->txt(
"obj_blog"));
155 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
156 $this->tpl->setVariable(
"VAL_ORDER_NR", $a_set[
"order_nr"]);
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static _lookupTitle($a_id)
Tree handler for personal workspace.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
fillRow($a_set)
Fill table row.
static getGotoLink($a_node_id, $a_obj_id, $a_additional=null)
getNodeData($a_node_id, $a_tree_pk=null)
get all information of a node.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
Portfolio view gui base class.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
__construct(ilObjPortfolioBaseGUI $a_parent_obj, $a_parent_cmd)
Constructor.
readRootId()
read root id from database