4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5include_once(
"./Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php");
6include_once(
"./Modules/Portfolio/classes/class.ilPortfolioPage.php");
34 $this->ctrl =
$DIC->ctrl();
35 $this->lng =
$DIC->language();
36 $this->
user = $DIC->user();
40 parent::__construct($a_parent_obj, $a_parent_cmd);
42 $this->portfolio = $a_parent_obj->object;
44 $this->is_template = ($this->portfolio->getType() ==
"prtt");
48 $this->
addColumn($this->lng->txt(
""),
"",
"1");
49 $this->
addColumn($this->lng->txt(
"user_order"));
50 $this->
addColumn($this->lng->txt(
"title"));
51 $this->
addColumn($this->lng->txt(
"type"));
52 $this->
addColumn($this->lng->txt(
"actions"));
55 $this->
setRowTemplate(
"tpl.portfolio_page_row.html",
"Modules/Portfolio");
61 "savePortfolioPagesOrdering",
62 $lng->txt(
"user_save_ordering_and_titles")
67 $lng->loadLanguageModule(
"blog");
77 if (!$this->is_template) {
78 $this->blogs = array();
79 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
81 $root = $tree->readRootId();
83 $root = $tree->getNodeData($root);
84 foreach ($tree->getSubTree($root) as $node) {
85 if ($node[
"type"] ==
"blog") {
86 $this->blogs[$node[
"obj_id"]] = $node[
"wsp_id"];
91 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
92 include_once(
"./Modules/Blog/classes/class.ilObjBlog.php");
105 switch ($a_set[
"type"]) {
107 $this->tpl->setCurrentBlock(
"title_field");
108 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
110 $this->tpl->parseCurrentBlock();
112 $this->tpl->setCurrentBlock(
"action");
113 $this->tpl->setVariable(
"TXT_EDIT",
$lng->txt(
"edit_page"));
119 $this->tpl->setVariable(
121 $ilCtrl->getLinkTargetByClass($this->page_gui,
"edit")
123 $this->tpl->parseCurrentBlock();
124 $this->tpl->setVariable(
"TYPE",
$lng->txt(
"page"));
128 if (!$this->is_template) {
129 $this->tpl->setCurrentBlock(
"title_static");
131 $this->tpl->parseCurrentBlock();
133 $obj_id = (int) $a_set[
"title"];
134 if (isset($this->blogs[$obj_id])) {
135 $node_id = $this->blogs[$obj_id];
144 $link =
$ilCtrl->getLinkTargetByClass(array($this->page_gui,
"ilobjbloggui"),
"render");
146 $this->tpl->setCurrentBlock(
"action");
147 $this->tpl->setVariable(
"TXT_EDIT",
$lng->txt(
"blog_edit"));
148 $this->tpl->setVariable(
"CMD_EDIT", $link);
149 $this->tpl->parseCurrentBlock();
151 $this->tpl->setVariable(
"TYPE",
$lng->txt(
"obj_blog"));
156 if ($this->is_template) {
157 $this->tpl->setCurrentBlock(
"title_field");
158 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
160 $this->tpl->parseCurrentBlock();
162 $this->tpl->setCurrentBlock(
"title_static");
164 $this->tpl->parseCurrentBlock();
165 $this->tpl->setVariable(
"TYPE",
$lng->txt(
"obj_blog"));
170 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
171 $this->tpl->setVariable(
"VAL_ORDER_NR", $a_set[
"order_nr"]);
An exception for terminatinating execution or to throw for unit testing.
Portfolio view gui base class.
static _lookupTitle($a_id)
lookup object title
fillRow($a_set)
Fill table row.
__construct(ilObjPortfolioBaseGUI $a_parent_obj, $a_parent_cmd)
Constructor.
static getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static getGotoLink($a_node_id, $a_obj_id, $a_additional=null)
Tree handler for personal workspace.