4include_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);
122 $style_gui->omitLocator();
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";
294 $this->ctrl->setParameter($this,
"prt_id", $a_new_object->
getId());
295 $this->ctrl->redirect($this,
"view");
302 include_once
"Services/Object/classes/class.ilObjectActivation.php";
303 $this->lng->loadLanguageModule(
'rep');
306 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
310 $act_obj_info = $act_ref_info =
"";
312 $act_obj_info =
' ' . $this->lng->txt(
'rep_activation_online_object_info');
313 $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
317 $online->setInfo($this->lng->txt(
'prtt_activation_online_info') . $act_obj_info);
320 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
322 $dur->setShowTime(
true);
323 $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
326 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'access_visiblity');
327 $visible->setInfo($this->lng->txt(
'prtt_activation_limited_visibility_info'));
328 $dur->addSubItem($visible);
331 $section->setTitle($this->lng->txt(
'properties'));
334 parent::initEditCustomForm($a_form);
339 $a_values[
"online"] = $this->
object->isOnline();
340 $a_values[
"access_period"][
"start"] = $this->
object->getActivationStartDate()
343 $a_values[
"access_period"][
"end"] = $this->
object->getActivationEndDate()
346 $a_values[
"access_visiblity"] = $this->
object->getActivationVisibility();
348 parent::getEditFormCustomValues($a_values);
353 $this->
object->setOnline($a_form->
getInput(
"online"));
357 if ($period->getStart() && $period->getEnd()) {
358 $this->
object->setActivationLimited(
true);
359 $this->
object->setActivationVisibility($a_form->
getInput(
"access_visiblity"));
360 $this->
object->setActivationStartDate($period->getStart()->get(
IL_CAL_UNIX));
361 $this->
object->setActivationEndDate($period->getEnd()->get(
IL_CAL_UNIX));
363 $this->
object->setActivationLimited(
false);
366 parent::updateCustom($a_form);
383 if (!$a_portfolio_id && $this->
object) {
384 $a_portfolio_id = $this->
object->getId();
386 include_once
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
388 $page->setPortfolioId($a_portfolio_id);
400 include_once(
"Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
402 $this->object->getId(),
405 $this->object->hasPublicComments()
413 return "ilportfoliotemplatepagegui";
420 $hi->setValue(
"old");
429 $prtf->setRequired(
true);
447 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
449 $form->setFormAction($this->ctrl->getFormAction($this));
452 $obj->setRequired(
true);
453 $form->addItem($obj);
456 $form->setTitle($this->lng->txt(
"prtf_add_blog") .
": " .
457 $this->object->getTitle());
458 $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
459 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
470 if (
$form->checkInput() && $this->checkPermissionBool(
"write")) {
473 $page->setTitle(
$form->getInput(
"blog"));
477 $this->ctrl->redirect($this,
"view");
480 $this->tabs_gui->clearTargets();
481 $this->tabs_gui->setBackTarget(
482 $this->lng->txt(
"back"),
483 $this->ctrl->getLinkTarget($this,
"view")
486 $form->setValuesByPost();
487 $this->tpl->setContent(
$form->getHtml());
499 $this->lng->loadLanguageModule(
"cntr");
501 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
503 $button->setPrimary(
true);
504 $button->setCaption(
"prtf_create_portfolio_from_template");
505 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
506 $this->tpl->setHeaderActionMenu($button->render());
509 return parent::preview($a_return,
$a_content, $a_show_notes);
514 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
515 $this->ctrl->redirectByClass(array(
"ilpersonaldesktopgui",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"create");
518 public static function _goto($a_target)
520 $id = explode(
"_", $a_target);
522 $_GET[
"baseClass"] =
"ilRepositoryGUI";
524 $_GET[
"cmd"] =
"preview";
526 include(
"ilias.php");
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
@classDescription Date and time handling
Export User Interface Class.
Portfolio view gui base class.
getAdditional()
Get Additonal Information.
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, array $a_recipe=null)
Build template from portfolio and vice versa.
Portfolio template view gui class.
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
saveBlog()
Create new portfolio blog template page.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
getPageGUIInstance($a_page_id)
Get portfolio template page gui instance.
getType()
Functions that must be overwritten.
initDidacticTemplate(ilPropertyFormGUI $a_form)
Show didactic template types.
setTabs()
create tabs (repository/workspace switch)
infoScreenForward()
show information screen
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
initBlogForm()
Init blog template page form.
executeCommand()
execute command
static getAvailablePortfolioTemplates($a_permission="read")
static getPortfoliosOfUser($a_user_id)
Get views of user.
Class ilObjStyleSheetGUI.
executeCommand()
execute command
setTabs()
create tabs (repository/workspace switch)
getAccessHandler()
Get access handler.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static _getAllReferences($a_id)
get all reference ids of object
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Portfolio template page gui class.
Page for portfolio template.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(isset($_POST['submit'])) $form