4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
26 public function __construct($a_parent_obj, $a_parent_cmd, $a_user_id)
30 $this->ctrl = $DIC->ctrl();
31 $this->lng = $DIC->language();
32 $this->
user = $DIC->user();
34 $lng = $DIC->language();
36 $this->user_id = (int) $a_user_id;
38 parent::__construct($a_parent_obj, $a_parent_cmd);
42 $this->
addColumn($this->lng->txt(
""),
"",
"1");
43 $this->
addColumn($this->lng->txt(
"title"),
"title",
"50%");
44 $this->
addColumn($this->lng->txt(
"online"),
"is_online");
45 $this->
addColumn($this->lng->txt(
"prtf_default_portfolio"),
"is_default");
46 $this->
addColumn($this->lng->txt(
"actions"));
49 $this->
setRowTemplate(
"tpl.portfolio_row.html",
"Modules/Portfolio");
56 $lng->loadLanguageModule(
"wsp");
58 include_once(
'./Services/Link/classes/class.ilLink.php');
65 include_once
"Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
68 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
71 $this->shared_objects = $access_handler->getObjectsIShare(
false);
84 $this->tpl->setCurrentBlock(
"title_form");
85 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
87 $this->tpl->parseCurrentBlock();
89 if (in_array($a_set[
"id"], $this->shared_objects)) {
90 $this->tpl->setCurrentBlock(
"shared");
91 $this->tpl->setVariable(
"TXT_SHARED",
$lng->txt(
"wsp_status_shared"));
92 $this->tpl->parseCurrentBlock();
95 $this->tpl->setCurrentBlock(
"chck");
96 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
97 $this->tpl->parseCurrentBlock();
99 $this->tpl->setCurrentBlock(
"edit");
100 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
101 $this->tpl->setVariable(
103 ($a_set[
"is_online"]) ?
" checked=\"checked\"" :
"" 105 $this->tpl->setVariable(
107 ($a_set[
"is_default"]) ?
$lng->txt(
"yes") :
"" 109 $this->tpl->parseCurrentBlock();
111 $prtf_path = array(get_class($this->parent_obj),
"ilobjportfoliogui");
113 $ilCtrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id", $a_set[
"id"]);
114 $this->tpl->setCurrentBlock(
"action");
116 $this->tpl->setVariable(
118 $ilCtrl->getLinkTargetByClass($prtf_path,
"preview")
120 $this->tpl->setVariable(
"TXT_ACTION",
$lng->txt(
"user_profile_preview"));
121 $this->tpl->parseCurrentBlock();
123 $this->tpl->setVariable(
125 $ilCtrl->getLinkTargetByClass($prtf_path,
"view")
127 $this->tpl->setVariable(
"TXT_ACTION",
$lng->txt(
"prtf_edit_portfolio"));
128 $this->tpl->parseCurrentBlock();
130 $ilCtrl->setParameterByClass(
"ilobjportfoliogui",
"prt_id",
"");
132 if ($a_set[
"is_online"]) {
133 if (!$a_set[
"is_default"]) {
134 $ilCtrl->setParameter($this->parent_obj,
"prt_id", $a_set[
"id"]);
136 $this->tpl->setVariable(
138 $ilCtrl->getLinkTarget($this->parent_obj,
"setDefaultConfirmation")
140 $this->tpl->setVariable(
"TXT_ACTION",
$lng->txt(
"prtf_set_as_default"));
141 $this->tpl->parseCurrentBlock();
143 $ilCtrl->setParameter($this->parent_obj,
"prt_id",
"");
145 $this->tpl->setVariable(
147 $ilCtrl->getLinkTarget($this->parent_obj,
"unsetDefault")
149 $this->tpl->setVariable(
"TXT_ACTION",
$lng->txt(
"prtf_unset_as_default"));
150 $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.
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.
Access handler for portfolio.