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");
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";
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");
405 $this->
object->hasPublicComments()
413 return "ilportfoliotemplatepagegui";
420 $hi->setValue(
"old");
447 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
449 $form->setFormAction($this->ctrl->getFormAction($this));
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"));
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");
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)
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
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.
__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.
Create styles array
The data for the language used.
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...
Create new PHPExcel object
obj_idprivate
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
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Portfolio template page gui class.