4 include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolioBaseGUI.php');
27 global $ilNavigationHistory;
29 $this->tpl->getStandardTemplate();
35 $link = $this->ctrl->getLinkTarget($this,
"view");
36 $ilNavigationHistory->addItem($this->node_id, $link,
"prtt");
39 $next_class = $this->ctrl->getNextClass($this);
40 $cmd = $this->ctrl->getCmd(
"view");
44 case 'ilportfoliotemplatepagegui':
54 case "ilinfoscreengui":
60 case "ilcommonactiondispatchergui":
61 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
63 $this->ctrl->forwardCommand($gui);
66 case "ilpermissiongui":
68 $this->tabs_gui->activateTab(
"id_permissions");
69 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
71 $this->ctrl->forwardCommand($perm_gui);
74 case "ilobjectcopygui":
75 include_once
"./Services/Object/classes/class.ilObjectCopyGUI.php";
78 $this->ctrl->forwardCommand($cp);
83 $this->tabs_gui->activateTab(
"export");
84 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
86 $exp_gui->addFormat(
"xml");
87 $this->ctrl->forwardCommand($exp_gui);
90 case "ilobjstylesheetgui":
91 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
92 $this->ctrl->setReturn($this,
"editStyleProperties");
93 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
95 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
97 $style_gui->setCreationMode(
true);
100 if (
$cmd ==
"confirmedDelete")
102 $this->
object->setStyleSheetId(0);
103 $this->
object->update();
106 $ret = $this->ctrl->forwardCommand($style_gui);
108 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
111 $this->
object->setStyleSheetId($style_id);
112 $this->
object->update();
113 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
127 $ilHelp->setScreenIdComponent(
"prtt");
131 $this->tabs_gui->addTab(
"pages",
132 $this->lng->txt(
"content"),
133 $this->ctrl->getLinkTarget($this,
"view"));
138 $this->tabs_gui->addTab(
"id_info",
139 $this->lng->txt(
"info_short"),
140 $this->ctrl->getLinkTargetByClass(array(
"ilobjportfoliotemplategui",
"ilinfoscreengui"),
"showSummary"));
145 $this->tabs_gui->addTab(
"settings",
146 $this->lng->txt(
"settings"),
147 $this->ctrl->getLinkTarget($this,
"edit"));
149 $this->tabs_gui->addTab(
"export",
150 $this->lng->txt(
"export"),
151 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
156 $this->tabs_gui->addNonTabbedLink(
"preview",
157 $this->lng->txt(
"user_profile_preview"),
158 $this->ctrl->getLinkTarget($this,
"preview"));
172 $this->ctrl->setCmd(
"showSummary");
173 $this->ctrl->setCmdClass(
"ilinfoscreengui");
182 global $ilTabs,
$ilErr, $ilToolbar;
184 $ilTabs->activateTab(
"id_info");
188 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
193 $this->lng->loadLanguageModule(
"cntr");
195 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
197 $button->setPrimary(
true);
198 $button->setCaption(
"prtf_create_portfolio_from_template");
199 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
200 $ilToolbar->addButtonInstance($button);
203 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
206 $info->enablePrivateNotes();
214 $info->enableNewsEditing(
false);
218 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
220 if ($enable_internal_rss)
222 $info->setBlockProperty(
"news",
"settings",
true);
223 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
228 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
230 $this->ctrl->forwardCommand($info);
242 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
246 $opts = array(
""=>$this->lng->txt(
"please_select"));
247 foreach($all as $item)
249 $opts[$item[
"id"]] = $item[
"title"];
251 $prtf =
new ilSelectInputGUI($this->lng->txt(
"prtf_create_template_from_portfolio"),
"prtf");
252 $prtf->
setInfo($this->lng->txt(
"prtf_create_template_from_portfolio_info"));
253 $prtf->setOptions($opts);
265 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
272 $this->ctrl->setParameter($this,
"prt_id", $a_new_object->
getId());
273 $this->ctrl->redirect($this,
"view");
280 include_once
"Services/Object/classes/class.ilObjectActivation.php";
281 $this->lng->loadLanguageModule(
'rep');
284 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
288 $act_obj_info = $act_ref_info =
"";
291 $act_obj_info =
' '.$this->lng->txt(
'rep_activation_online_object_info');
292 $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
296 $online->
setInfo($this->lng->txt(
'prtt_activation_online_info').$act_obj_info);
299 $act_type =
new ilCheckboxInputGUI($this->lng->txt(
'rep_visibility_until'),
'access_type');
302 $this->tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
303 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
306 $date = $this->
object->getActivationStartDate();
308 $dur->setStartText($this->lng->txt(
'rep_activation_limited_start'));
309 $date = $this->
object->getActivationEndDate();
311 $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
312 $act_type->addSubItem($dur);
314 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'access_visiblity');
315 $visible->
setInfo($this->lng->txt(
'prtt_activation_limited_visibility_info'));
316 $act_type->addSubItem($visible);
321 $section->setTitle($this->lng->txt(
'properties'));
324 parent::initEditCustomForm($a_form);
329 $a_values[
"online"] = $this->
object->isOnline();
330 $a_values[
"access_type"] = $this->
object->isActivationLimited();
331 $a_values[
"access_visiblity"] = $this->
object->getActivationVisibility();
333 parent::getEditFormCustomValues($a_values);
338 $this->
object->setOnline($a_form->
getInput(
"online"));
341 if($a_form->
getInput(
"access_type"))
343 $this->
object->setActivationLimited(
true);
344 $this->
object->setActivationVisibility($a_form->
getInput(
"access_visiblity"));
347 $this->
object->setActivationStartDate($period->getStart()->get(
IL_CAL_UNIX));
348 $this->
object->setActivationEndDate($period->getEnd()->get(
IL_CAL_UNIX));
352 $this->
object->setActivationLimited(
false);
355 parent::updateCustom($a_form);
372 if(!$a_portfolio_id && $this->
object)
374 $a_portfolio_id = $this->
object->getId();
376 include_once
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
378 $page->setPortfolioId($a_portfolio_id);
390 include_once(
"Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
392 $this->object->getId(),
395 $this->
object->hasPublicComments()
403 return "ilportfoliotemplatepagegui";
408 $old =
new ilRadioOption($this->lng->txt(
"prtf_existing_portfolio"),
"old");
409 $a_tgt->addOption($old);
413 foreach($all as $id => $title)
420 $old->addSubItem($prtf);
423 $a_tgt->setValue(
"old");
439 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
441 $form->setFormAction($this->ctrl->getFormAction($this));
445 $form->addItem($obj);
448 $form->setTitle($this->lng->txt(
"prtf_add_blog").
": ".
449 $this->
object->getTitle());
450 $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
451 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
466 $page->setTitle($form->getInput(
"blog"));
470 $this->ctrl->redirect($this,
"view");
473 $this->tabs_gui->clearTargets();
474 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
475 $this->ctrl->getLinkTarget($this,
"view"));
477 $form->setValuesByPost();
478 $this->tpl->setContent($form->getHtml());
486 function preview($a_return =
false, $a_content =
false, $a_show_notes =
true)
491 $this->lng->loadLanguageModule(
"cntr");
493 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
495 $button->setPrimary(
true);
496 $button->setCaption(
"prtf_create_portfolio_from_template");
497 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
498 $this->tpl->setHeaderActionMenu($button->render());
501 return parent::preview($a_return , $a_content, $a_show_notes);
506 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
507 $this->ctrl->redirectByClass(array(
"ilpersonaldesktopgui",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"create");
510 public static function _goto($a_target)
512 $id = explode(
"_", $a_target);
514 $_GET[
"baseClass"] =
"ilRepositoryGUI";
515 $_GET[
"ref_id"] = $id[0];
516 $_GET[
"cmd"] =
"preview";
518 include(
"ilias.php");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
initDidacticTemplate(ilPropertyFormGUI $a_form)
This class represents an option in a radio group.
afterSave(ilObject $a_new_object)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
GUI class for the workflow of copying objects.
static getPortfoliosOfUser($a_user_id)
Get views of user.
getAccessHandler()
Get access handler.
Class ilObject Basic functions for all objects.
initBlogForm()
Init blog template page form.
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, array $a_recipe=null)
Build template from portfolio and vice versa.
getEditFormCustomValues(array &$a_values)
infoScreenForward()
show information screen
getPageGUIInstance($a_page_id)
Get portfolio template page gui instance.
static _getAllReferences($a_id)
get all reference ids of object
Export User Interface Class.
initCopyPageFormOptions(ilFormPropertyGUI $a_tgt)
if(!is_array($argv)) $options
getId()
get object id public
initEditCustomForm(ilPropertyFormGUI $a_form)
omitLocator($a_omit=true)
getAdditional()
Get Additonal Information.
This class represents a text property in a property form.
Page for portfolio template.
static getAvailablePortfolioTemplates($a_permission="read")
Portfolio template view gui class.
Portfolio view gui base class.
setTabs()
create tabs (repository/workspace switch)
saveBlog()
Create new portfolio blog template page.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
preview($a_return=false, $a_content=false, $a_show_notes=true)
setAdditional($a_additional)
Set Additonal Information.
Class ilObjStyleSheetGUI.
& executeCommand()
execute command
updateCustom(ilPropertyFormGUI $a_form)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Portfolio template page gui class.