4 include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolioBaseGUI.php');
39 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
41 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
44 $this->nav_history = $DIC[
"ilNavigationHistory"];
45 $this->help = $DIC[
"ilHelp"];
46 $this->tabs = $DIC->tabs();
47 $this->toolbar = $DIC->toolbar();
48 $this->
user = $DIC->user();
63 $link = $this->ctrl->getLinkTarget($this,
"view");
64 $ilNavigationHistory->addItem($this->node_id, $link,
"prtt");
67 $next_class = $this->ctrl->getNextClass($this);
68 $cmd = $this->ctrl->getCmd(
"view");
70 switch ($next_class) {
71 case 'ilportfoliotemplatepagegui':
81 case "ilinfoscreengui":
87 case "ilcommonactiondispatchergui":
88 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
90 $this->ctrl->forwardCommand($gui);
93 case "ilpermissiongui":
95 $this->tabs_gui->activateTab(
"id_permissions");
96 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
98 $this->ctrl->forwardCommand($perm_gui);
101 case "ilobjectcopygui":
103 include_once
"./Services/Object/classes/class.ilObjectCopyGUI.php";
105 $cp->setType(
"prtt");
106 $this->ctrl->forwardCommand($cp);
111 $this->tabs_gui->activateTab(
"export");
112 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
114 $exp_gui->addFormat(
"xml");
115 $this->ctrl->forwardCommand($exp_gui);
118 case "ilobjstylesheetgui":
119 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
120 $this->ctrl->setReturn($this,
"editStyleProperties");
121 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
123 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
124 $style_gui->setCreationMode(
true);
127 if ($cmd ==
"confirmedDelete") {
128 $this->
object->setStyleSheetId(0);
129 $this->
object->update();
132 $ret = $this->ctrl->forwardCommand($style_gui);
134 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
136 $this->
object->setStyleSheetId($style_id);
137 $this->
object->update();
138 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
152 $ilHelp->setScreenIdComponent(
"prtt");
155 $this->tabs_gui->addTab(
157 $this->lng->txt(
"content"),
158 $this->ctrl->getLinkTarget($this,
"view")
163 $this->tabs_gui->addTab(
165 $this->lng->txt(
"info_short"),
166 $this->ctrl->getLinkTargetByClass(array(
"ilobjportfoliotemplategui",
"ilinfoscreengui"),
"showSummary")
171 $this->tabs_gui->addTab(
173 $this->lng->txt(
"settings"),
174 $this->ctrl->getLinkTarget($this,
"edit")
177 $this->tabs_gui->addTab(
179 $this->lng->txt(
"export"),
180 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
185 $this->tabs_gui->addNonTabbedLink(
187 $this->lng->txt(
"user_profile_preview"),
188 $this->ctrl->getLinkTarget($this,
"preview")
203 $this->ctrl->setCmd(
"showSummary");
204 $this->ctrl->setCmdClass(
"ilinfoscreengui");
216 $ilTabs->activateTab(
"id_info");
221 $this->lng->loadLanguageModule(
"cntr");
223 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
225 $button->setPrimary(
true);
226 $button->setCaption(
"prtf_create_portfolio_from_template");
227 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
228 $ilToolbar->addButtonInstance($button);
231 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
234 $info->enablePrivateNotes();
241 $info->enableNewsEditing(
false);
244 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
246 if ($enable_internal_rss) {
247 $info->setBlockProperty(
"news",
"settings",
true);
248 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
253 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
255 $this->ctrl->forwardCommand(
$info);
267 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
270 $opts = array(
"" => $this->lng->txt(
"please_select"));
271 foreach ($all as $item) {
272 $opts[$item[
"id"]] = $item[
"title"];
274 $prtf =
new ilSelectInputGUI($this->lng->txt(
"prtf_create_template_from_portfolio"),
"prtf");
275 $prtf->
setInfo($this->lng->txt(
"prtf_create_template_from_portfolio_info"));
276 $prtf->setOptions($opts);
287 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
293 ilUtil::sendSuccess($this->lng->txt(
"prtt_portfolio_created"),
true);
294 $this->ctrl->setParameter($this,
"prt_id", $a_new_object->
getId());
295 $this->ctrl->redirect($this,
"view");
303 include_once
"Services/Object/classes/class.ilObjectActivation.php";
304 $this->lng->loadLanguageModule(
'rep');
307 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
311 $act_obj_info = $act_ref_info =
"";
313 $act_obj_info =
' ' . $this->lng->txt(
'rep_activation_online_object_info');
314 $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
318 $online->
setInfo($this->lng->txt(
'prtt_activation_online_info') . $act_obj_info);
321 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
324 $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
327 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'access_visiblity');
328 $visible->
setInfo($this->lng->txt(
'prtt_activation_limited_visibility_info'));
329 $dur->addSubItem($visible);
332 $section->setTitle($this->lng->txt(
'obj_presentation'));
336 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->addTileImage();
339 parent::initEditCustomForm($a_form);
342 $tit->setInfo($this->lng->txt(
'prtt_title_info'));
347 $a_values[
"online"] = $this->
object->isOnline();
348 $a_values[
"access_period"][
"start"] = $this->
object->getActivationStartDate()
351 $a_values[
"access_period"][
"end"] = $this->
object->getActivationEndDate()
354 $a_values[
"access_visiblity"] = $this->
object->getActivationVisibility();
356 parent::getEditFormCustomValues($a_values);
363 $this->
object->setOnline($a_form->
getInput(
"online"));
367 if ($period->getStart() && $period->getEnd()) {
368 $this->
object->setActivationLimited(
true);
369 $this->
object->setActivationVisibility($a_form->
getInput(
"access_visiblity"));
370 $this->
object->setActivationStartDate($period->getStart()->get(
IL_CAL_UNIX));
371 $this->
object->setActivationEndDate($period->getEnd()->get(
IL_CAL_UNIX));
373 $this->
object->setActivationLimited(
false);
376 parent::updateCustom($a_form);
378 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->saveTileImage();
395 if (!$a_portfolio_id && $this->
object) {
396 $a_portfolio_id = $this->
object->getId();
398 include_once
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
400 $page->setPortfolioId($a_portfolio_id);
412 include_once(
"Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
414 $this->object->getId(),
417 $this->
object->hasPublicComments()
425 return "ilportfoliotemplatepagegui";
432 $hi->setValue(
"old");
459 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
461 $form->setFormAction($this->ctrl->getFormAction($this));
465 $form->addItem($obj);
468 $form->setTitle($this->lng->txt(
"prtf_add_blog") .
": " .
469 $this->
object->getTitle());
470 $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
471 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
485 $page->setTitle(
$form->getInput(
"blog"));
488 ilUtil::sendSuccess($this->lng->txt(
"prtf_blog_page_created"),
true);
489 $this->ctrl->redirect($this,
"view");
492 $this->tabs_gui->clearTargets();
493 $this->tabs_gui->setBackTarget(
494 $this->lng->txt(
"back"),
495 $this->ctrl->getLinkTarget($this,
"view")
498 $form->setValuesByPost();
499 $this->tpl->setContent(
$form->getHtml());
511 $this->lng->loadLanguageModule(
"cntr");
513 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
515 $button->setPrimary(
true);
516 $button->setCaption(
"prtf_create_portfolio_from_template");
517 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
518 $this->tpl->setHeaderActionMenu($button->render());
521 return parent::preview($a_return,
$a_content, $a_show_notes);
526 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
527 $this->ctrl->redirectByClass(array(
"ilpersonaldesktopgui",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"create");
532 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
533 $this->ctrl->redirectByClass(array(
"ilpersonaldesktopgui",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"createFromTemplateDirect");
536 public static function _goto($a_target)
538 $id = explode(
"_", $a_target);
540 $_GET[
"baseClass"] =
"ilRepositoryGUI";
542 $_GET[
"cmd"] =
"preview";
544 include(
"ilias.php");
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
initDidacticTemplate(ilPropertyFormGUI $a_form)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
afterSave(ilObject $a_new_object)
executeCommand()
execute command
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.
initBlogForm()
Init blog template page form.
if(!array_key_exists('StateId', $_REQUEST)) $id
getEditFormCustomValues(array &$a_values)
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, array $a_recipe=null, $copy_all=false)
Build template from portfolio and vice versa.
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.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
if(isset($_POST['submit'])) $form
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.
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
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.
updateCustom(ilPropertyFormGUI $a_form)
prepareOutput($a_show_subobjects=true)
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.