4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
21 function __construct($a_parent_obj, $a_parent_cmd, $a_user_id)
25 $this->user_id = (int)$a_user_id;
27 parent::__construct($a_parent_obj, $a_parent_cmd);
29 $this->
setTitle($lng->txt(
"prtf_portfolios"));
31 $this->
addColumn($this->lng->txt(
""),
"",
"1");
32 $this->
addColumn($this->lng->txt(
"title"),
"title",
"50%");
33 $this->
addColumn($this->lng->txt(
"online"),
"is_online");
34 $this->
addColumn($this->lng->txt(
"prtf_default_portfolio"),
"is_default");
35 $this->
addColumn($this->lng->txt(
"actions"));
38 $this->
setRowTemplate(
"tpl.portfolio_row.html",
"Modules/Portfolio");
40 $this->
addMultiCommand(
"confirmPortfolioDeletion", $lng->txt(
"delete"));
41 $this->
addCommandButton(
"saveTitles", $lng->txt(
"prtf_save_status_and_titles"));
45 $lng->loadLanguageModule(
"wsp");
47 include_once(
'./Services/Link/classes/class.ilLink.php');
54 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
57 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
60 $this->shared_objects = $access_handler->getObjectsIShare(
false);
72 $this->tpl->setCurrentBlock(
"title_form");
73 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
75 $this->tpl->parseCurrentBlock();
77 if(in_array($a_set[
"id"], $this->shared_objects))
79 $this->tpl->setCurrentBlock(
"shared");
80 $this->tpl->setVariable(
"TXT_SHARED", $lng->txt(
"wsp_status_shared"));
81 $this->tpl->parseCurrentBlock();
84 $this->tpl->setCurrentBlock(
"chck");
85 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
86 $this->tpl->parseCurrentBlock();
88 $this->tpl->setCurrentBlock(
"edit");
89 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
90 $this->tpl->setVariable(
"STATUS_ONLINE",
91 ($a_set[
"is_online"]) ?
" checked=\"checked\"" :
"");
92 $this->tpl->setVariable(
"VAL_DEFAULT",
93 ($a_set[
"is_default"]) ? $lng->txt(
"yes") :
"");
94 $this->tpl->parseCurrentBlock();
96 $prtf_path =
array(get_class($this->parent_obj),
"ilobjportfoliogui");
98 $ilCtrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id", $a_set[
"id"]);
99 $this->tpl->setCurrentBlock(
"action");
101 $this->tpl->setVariable(
"URL_ACTION",
102 $ilCtrl->getLinkTargetByClass($prtf_path,
"preview"));
103 $this->tpl->setVariable(
"TXT_ACTION", $lng->txt(
"user_profile_preview"));
104 $this->tpl->parseCurrentBlock();
106 $this->tpl->setVariable(
"URL_ACTION",
107 $ilCtrl->getLinkTargetByClass($prtf_path,
"view"));
108 $this->tpl->setVariable(
"TXT_ACTION", $lng->txt(
"prtf_edit_portfolio"));
109 $this->tpl->parseCurrentBlock();
111 $ilCtrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id",
"");
113 if($a_set[
"is_online"])
115 if(!$a_set[
"is_default"])
117 $ilCtrl->setParameter($this->parent_obj,
"prt_id", $a_set[
"id"]);
119 $this->tpl->setVariable(
"URL_ACTION",
120 $ilCtrl->getLinkTarget($this->parent_obj,
"setDefaultConfirmation"));
121 $this->tpl->setVariable(
"TXT_ACTION", $lng->txt(
"prtf_set_as_default"));
122 $this->tpl->parseCurrentBlock();
124 $ilCtrl->setParameter($this->parent_obj,
"prt_id",
"");
128 $this->tpl->setVariable(
"URL_ACTION",
129 $ilCtrl->getLinkTarget($this->parent_obj,
"unsetDefault"));
130 $this->tpl->setVariable(
"TXT_ACTION", $lng->txt(
"prtf_unset_as_default"));
131 $this->tpl->parseCurrentBlock();
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 public
static getPortfoliosOfUser($a_user_id)
Get views of user.
__construct($a_parent_obj, $a_parent_cmd, $a_user_id)
Constructor.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
fillRow($a_set)
Fill table row.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
Access handler for portfolio.
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.