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":
59 case "ilcommonactiondispatchergui":
60 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
62 $this->ctrl->forwardCommand($gui);
65 case "ilpermissiongui":
67 $this->tabs_gui->activateTab(
"id_permissions");
68 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
70 $this->ctrl->forwardCommand($perm_gui);
73 case "ilobjectcopygui":
74 include_once
"./Services/Object/classes/class.ilObjectCopyGUI.php";
77 $this->ctrl->forwardCommand($cp);
82 $this->tabs_gui->activateTab(
"export");
83 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
85 $exp_gui->addFormat(
"xml");
86 $this->ctrl->forwardCommand($exp_gui);
89 case "ilobjstylesheetgui":
90 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
91 $this->ctrl->setReturn($this,
"editStyleProperties");
92 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
94 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
96 $style_gui->setCreationMode(
true);
99 if (
$cmd ==
"confirmedDelete")
101 $this->
object->setStyleSheetId(0);
102 $this->
object->update();
105 $ret = $this->ctrl->forwardCommand($style_gui);
107 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
110 $this->
object->setStyleSheetId($style_id);
111 $this->
object->update();
112 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
126 $ilHelp->setScreenIdComponent(
"prtt");
130 $this->tabs_gui->addTab(
"pages",
131 $this->lng->txt(
"content"),
132 $this->ctrl->getLinkTarget($this,
"view"));
137 $this->tabs_gui->addTab(
"id_info",
138 $this->lng->txt(
"info_short"),
139 $this->ctrl->getLinkTargetByClass(array(
"ilobjportfoliotemplategui",
"ilinfoscreengui"),
"showSummary"));
144 $this->tabs_gui->addTab(
"settings",
145 $this->lng->txt(
"settings"),
146 $this->ctrl->getLinkTarget($this,
"edit"));
148 $this->tabs_gui->addTab(
"export",
149 $this->lng->txt(
"export"),
150 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
155 $this->tabs_gui->addNonTabbedLink(
"preview",
156 $this->lng->txt(
"user_profile_preview"),
157 $this->ctrl->getLinkTarget($this,
"preview"));
171 $this->ctrl->setCmd(
"showSummary");
172 $this->ctrl->setCmdClass(
"ilinfoscreengui");
181 global $ilTabs,
$ilErr, $ilToolbar;
183 $ilTabs->activateTab(
"id_info");
187 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
192 $this->lng->loadLanguageModule(
"cntr");
193 $ilToolbar->addButton($this->lng->txt(
"prtf_create_portfolio_from_template"),
194 $this->ctrl->getLinkTarget($this,
"createfromtemplate"),
195 "",
"",
"",
"",
"submit emphsubmit");
198 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
201 $info->enablePrivateNotes();
209 $info->enableNewsEditing(
false);
213 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
215 if ($enable_internal_rss)
217 $info->setBlockProperty(
"news",
"settings",
true);
218 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
223 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
225 $this->ctrl->forwardCommand($info);
237 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
241 $opts = array(
""=>$this->lng->txt(
"please_select"));
242 foreach($all as $item)
244 $opts[$item[
"id"]] = $item[
"title"];
246 $prtf =
new ilSelectInputGUI($this->lng->txt(
"prtf_create_template_from_portfolio"),
"prtf");
247 $prtf->
setInfo($this->lng->txt(
"prtf_create_template_from_portfolio_info"));
248 $prtf->setOptions($opts);
260 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
267 $this->ctrl->setParameter($this,
"prt_id", $a_new_object->
getId());
268 $this->ctrl->redirect($this,
"view");
275 include_once
"Services/Object/classes/class.ilObjectActivation.php";
276 $this->lng->loadLanguageModule(
'rep');
279 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
283 $act_obj_info = $act_ref_info =
"";
286 $act_obj_info =
' '.$this->lng->txt(
'rep_activation_online_object_info');
287 $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
291 $online->
setInfo($this->lng->txt(
'prtt_activation_online_info').$act_obj_info);
294 $act_type =
new ilCheckboxInputGUI($this->lng->txt(
'rep_visibility_until'),
'access_type');
297 $this->tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
298 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
301 $date = $this->
object->getActivationStartDate();
303 $dur->setStartText($this->lng->txt(
'rep_activation_limited_start'));
304 $date = $this->
object->getActivationEndDate();
306 $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
307 $act_type->addSubItem($dur);
309 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'access_visiblity');
310 $visible->
setInfo($this->lng->txt(
'prtt_activation_limited_visibility_info'));
311 $act_type->addSubItem($visible);
316 $section->setTitle($this->lng->txt(
'properties'));
319 parent::initEditCustomForm($a_form);
324 $a_values[
"online"] = $this->
object->isOnline();
325 $a_values[
"access_type"] = $this->
object->isActivationLimited();
326 $a_values[
"access_visiblity"] = $this->
object->getActivationVisibility();
328 parent::getEditFormCustomValues($a_values);
333 $this->
object->setOnline($a_form->
getInput(
"online"));
336 if($a_form->
getInput(
"access_type"))
338 $this->
object->setActivationLimited(
true);
339 $this->
object->setActivationVisibility($a_form->
getInput(
"access_visiblity"));
342 $this->
object->setActivationStartDate($period->getStart()->get(
IL_CAL_UNIX));
343 $this->
object->setActivationEndDate($period->getEnd()->get(
IL_CAL_UNIX));
347 $this->
object->setActivationLimited(
false);
350 parent::updateCustom($a_form);
367 if(!$a_portfolio_id && $this->
object)
369 $a_portfolio_id = $this->
object->getId();
371 include_once
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
373 $page->setPortfolioId($a_portfolio_id);
385 include_once(
"Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
387 $this->object->getId(),
390 $this->
object->hasPublicComments()
398 return "ilportfoliotemplatepagegui";
403 $old =
new ilRadioOption($this->lng->txt(
"prtf_existing_portfolio"),
"old");
404 $a_tgt->addOption($old);
408 foreach($all as $id => $title)
418 $old->addSubItem($prtf);
421 $a_tgt->setValue(
"old");
437 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
439 $form->setFormAction($this->ctrl->getFormAction($this));
443 $form->addItem($obj);
446 $form->setTitle($this->lng->txt(
"prtf_add_blog").
": ".
447 $this->
object->getTitle());
448 $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
449 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
464 $page->setTitle($form->getInput(
"blog"));
468 $this->ctrl->redirect($this,
"view");
471 $this->tabs_gui->clearTargets();
472 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
473 $this->ctrl->getLinkTarget($this,
"view"));
475 $form->setValuesByPost();
476 $this->tpl->setContent($form->getHtml());
484 function preview($a_return =
false, $a_content =
false, $a_show_notes =
true)
489 $this->lng->loadLanguageModule(
"cntr");
490 $url = $this->ctrl->getLinkTarget($this,
"createfromtemplate");
491 $button =
'<a href="'.$url.
'" class="submit emphsubmit">'.
492 $this->lng->txt(
"prtf_create_portfolio_from_template").
'</a>';
493 $this->tpl->setHeaderActionMenu($button);
496 return parent::preview($a_return , $a_content, $a_show_notes);
501 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
502 $this->ctrl->redirectByClass(array(
"ilpersonaldesktopgui",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"create");
507 $id = explode(
"_", $a_target);
509 $_GET[
"baseClass"] =
"ilRepositoryGUI";
510 $_GET[
"ref_id"] = $id[0];
511 $_GET[
"cmd"] =
"preview";
513 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.