Ejemplo n.º 1
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("build");
     $tplBlocks = array();
     /* get all blocks for this worksheet */
     $blocks = $worksheet->getBlocks();
     foreach ($blocks as $block) {
         $tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getBuildViewHtml(), "type" => $block->getType(), "order" => $block->getOrder());
     }
     if (count($blocks) == 0) {
         $tplBlocks = false;
     }
     $tpl->assign("blocks", $tplBlocks);
     $tpl->display("Build.template.html");
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Eine Aufgabe hinzufügen", "link" => PATH_URL . "worksheet/AddBlock/" . $this->id), array("name" => "Arbeitsblatt veröffentlichen", "link" => PATH_URL . "worksheet/Deploy/" . $this->id)));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/Build/" . $this->id)));
     return $frameResponseObject;
 }
Ejemplo n.º 2
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("view");
     $tplBlocks = array();
     /* get all blocks for this worksheet */
     $blocks = $worksheet->getBlocks();
     foreach ($blocks as $block) {
         $tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getViewHtml(), "type" => $block->getType(), "order" => $block->getOrder());
     }
     if (count($blocks) == 0) {
         $tplBlocks = false;
     }
     $tpl->assign("blocks", $tplBlocks);
     $tpl->display("View.template.html");
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Arbeitsblätter korrigieren", "link" => PATH_URL . "worksheet/CopyList/" . $this->id), array("name" => "Arbeitsblatt ausfüllen", "link" => PATH_URL . "worksheet/StartEdit/" . $this->id)));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/View/" . $this->id)));
     return $frameResponseObject;
 }
Ejemplo n.º 3
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_exit) {
             $object = $object->get_exit();
             $this->id = $object->get_id();
         }
     } else {
         $object = $currentUser->get_trashbin();
         $this->id = $object->get_id();
     }
     if ($object && $object instanceof \steam_container) {
         $objects = $object->get_inventory();
     } else {
         $objects = array();
     }
     $this->getExtension()->addJS();
     $this->getExtension()->addCSS();
     $title = "Papierkorb";
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Papierkorb leeren", "ajax" => array("onclick" => array("command" => "EmptyTrashbin", "params" => array("fromNameSpace" => "Trashbin"), "requestType" => "popup", "namespace" => "explorer")))));
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("trashbinWrapper");
     $loader->setMessage("Lade Daten ...");
     $loader->setCommand("loadContent");
     $loader->setParams(array("id" => $this->id));
     $loader->setElementId("trashbinWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle($title);
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($loader);
     return $frameResponseObject;
 }
Ejemplo n.º 4
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $this->getExtension()->addJS();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("newArtefacts"), "ajax" => array("onclick" => array("command" => "newArtefactForm", "namespace" => "portfolio", "params" => "", "requestType" => "popup")))));
     //		array("name" => "Bild anfügen<img src=\"{$editIcon}\">", "command" => "EditMessageImage", "namespace" => "forum", "params" => "{'messageObjectId':'{$this->id}','forum':'{$forumId}'}", "type" => "popup");
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Artefacts"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Competences"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("Artefacts"), "link" => $this->getExtension()->getExtensionUrl() . "ManageArtefacts/")));
     $tabBar->setActiveTab(2);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams($this->params);
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Manage Artefacts");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 5
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("edit");
     $worksheet->validateStatus(2);
     $tplBlocks = array();
     /* get all blocks for this worksheet */
     $blocks = $worksheet->getBlocks();
     foreach ($blocks as $block) {
         $tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getCorrectHtml(), "type" => $block->getType(), "order" => $block->getOrder());
     }
     if (count($blocks) == 0) {
         $tplBlocks = false;
     }
     $tpl->assign("blocks", $tplBlocks);
     $tpl->display("Correct.template.html");
     $sourceWorksheet = new \Worksheet\Worksheet($this->source);
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Arbeitsblatt zurückgeben", "link" => "javascript: worksheet_finish('" . $this->source . "')"), array("name" => "Speichern", "link" => "javascript: worksheet_save()")));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Arbeitsblatt zurückgeben", "link" => "javascript: worksheet_finish('" . $this->source . "')"), array("name" => "Speichern", "link" => "javascript: worksheet_save()")));
     $frameResponseObject->addWidget($actionBar);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $sourceWorksheet->getName(), "link" => PATH_URL . "worksheet/View/" . $this->source), array("name" => "Arbeitsblätter korrigieren", "link" => PATH_URL . "worksheet/CopyList/" . $this->source), array("name" => $worksheet->getName())));
     return $frameResponseObject;
 }
Ejemplo n.º 6
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Portfolios"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("portfoliosWrapper");
     $loader->setMessage("loading portfolios ...");
     $loader->setCommand("loadPortfolios");
     $loader->setParams(array());
     $loader->setElementId("portfoliosWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Manage Portfolios");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 7
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolio = \PortfolioModel::getById($this->portfolioId);
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("link" => "javascript:history.back()", "name" => "zurück"), array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Belege des Portfolios »" . $portfolio->getName() . "«"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams(array(0 => $this->portfolioId));
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Belege verwalten");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 8
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_document) {
             $mimetype = $object->get_attribute(DOC_MIME_TYPE);
             $objName = $object->get_name();
             $objDesc = trim($object->get_attribute(OBJ_DESC));
             if ($objDesc === 0 || $objDesc === "") {
                 $name = $objName;
             } else {
                 $name = $objDesc . " (" . $objName . ")";
             }
             $actionBar = new \Widgets\ActionBar();
             $actionBar->setActions(array(array("name" => "Anzeigen", "link" => PATH_URL . "Explorer/ViewDocument/" . $this->id . "/"), array("name" => "Bearbeiten", "link" => PATH_URL . "Explorer/EditDocument/" . $this->id . "/"), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
             $contentText = new \Widgets\TextareaCode();
             $contentText->setWidth(945);
             $contentText->setRows(50);
             $contentText->setData($object);
             $contentText->setContentProvider(\Widgets\DataProvider::contentProvider());
             $clearer = new \Widgets\Clearer();
             // 				$html = "";
             // 				if ($mimetype == "image/png" || $mimetype == "image/jpeg" || $mimetype == "image/gif") {  // Image
             // 					$html = "<div style=\"text-align:center\"><img style=\"max-width:100%\" title=\"{$name}\" alt=\"Bild: {$name}\" src=\"" . PATH_URL . "Download/Document/" . $this->id . "/\"></div>";
             // 				} else if ($mimetype == "text/html") {
             // 					$html = strip_tags($object->get_content(),"<h1><h2><h3><h4><h5><p><a><div><style><b><i><strong><img>");
             // 				} else if (strstr($mimetype, "text")) {
             // 					$html = "<pre>{$object->get_content()}</pre>";
             // 				} else {
             // 					header("location: " . PATH_URL . "Download/Document/" . $this->id . "/");
             // 				}
             // 				$rawHtml = new \Widgets\RawHtml();
             // 				$rawHtml->setHtml($html);
             //$rawHtml->addWidget($breadcrumb);
             //$rawHtml->addWidget($environment);
             //$rawHtml->addWidget($loader);
             $frameResponseObject->setTitle($name);
             $frameResponseObject->addWidget($actionBar);
             //$frameResponseObject->addWidget($rawHtml);
             $frameResponseObject->addWidget($contentText);
             $frameResponseObject->addWidget($clearer);
             return $frameResponseObject;
         }
     } else {
         ExtensionMaster::getInstance()->send404Error();
     }
 }
Ejemplo n.º 9
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_exit) {
             $object = $object->get_exit();
             $this->id = $object->get_id();
         }
     } else {
         $object = $currentUser->get_attribute("USER_BOOKMARKROOM");
         $this->id = $object->get_id();
     }
     if ($object && $object instanceof \steam_container) {
         $objects = $object->get_inventory();
     } else {
         $objects = array();
     }
     $this->getExtension()->addJS();
     $this->getExtension()->addCSS();
     $title = "Lesezeichen";
     $bookmarkParentFolderId = $currentUser->get_attribute("USER_BOOKMARKROOM")->get_id();
     if ($this->id != $bookmarkParentFolderId) {
         $title .= " - " . $object->get_name();
     }
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array("", array("name" => "<img src=\"" . PATH_URL . "explorer/asset/icons/mimetype/reference_folder.png\"></img> " . $title . " ")));
     //$bookmarkIcon = \Bookmarks::getInstance()->getAssetUrl() . "icons/bookmark.png";
     //$breadcrumb = new \Widgets\Breadcrumb();
     //$breadcrumb->setData(array(array("name"=>"<img src=\"{$bookmarkIcon}\"> Lesezeichenordner")));
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Ordner anlegen", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => $this->id), "requestType" => "popup")))));
     //$actionBar->setActions(array(array("name"=>"Neu", "ajax"=>array("onclick"=>array("command"=>"newelement"))), array("name"=>"Eigenschaften", "link"=>PATH_URL."explorer/properties/"), array("name"=>"Rechte", "link"=>PATH_URL."explorer/rights/")));
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("bookmarksWrapper");
     $loader->setMessage("Lade Lesezeichen ...");
     $loader->setCommand("loadBookmarks");
     $loader->setParams(array("id" => $this->id));
     $loader->setElementId("bookmarksWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Lesezeichen");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($loader);
     return $frameResponseObject;
 }
Ejemplo n.º 10
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_exit) {
             $object = $object->get_exit();
             $this->id = $object->get_id();
         }
     } else {
         $object = \School\Model\FolderSchoolBookmark::getSchoolBookmarkFolderObject();
         $this->id = $object->get_id();
     }
     if ($object && $object instanceof \steam_container) {
         $objects = $object->get_inventory();
     } else {
         $objects = array();
     }
     $this->getExtension()->addJS();
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => "Schul-Lesezeichenordner")));
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Neues Lesezeichen", "link" => "#"), array("name" => "Ordner anlegen", "link" => "#")));
     //	$actionBar->setActions(array(array("name"=>"Neues Lesezeichen", "ajax"=>array("onclick"=>array("command"=>"newBookmark", "params"=>array("id"=>$this->id), "requestType"=>"popup"))), array("name"=>"Ordner anlegen", "ajax"=>array("onclick"=>array("command"=>"createFolder", "params"=>array("id"=>$this->id), "requestType"=>"popup")))));
     //$actionBar->setActions(array(array("name"=>"Neu", "ajax"=>array("onclick"=>array("command"=>"newelement"))), array("name"=>"Eigenschaften", "link"=>PATH_URL."explorer/properties/"), array("name"=>"Rechte", "link"=>PATH_URL."explorer/rights/")));
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("schoolBookmarksWrapper");
     $loader->setMessage("Lade meine Schule...");
     $loader->setCommand("loadSchoolBookmarks");
     $loader->setParams(array("id" => $this->id));
     $loader->setElementId("schoolBookmarksWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Meine Schule");
     $frameResponseObject->setHeadline(array(array("name" => "DIESE SEITE FUNTIONIERT NACH DEM NÄCHSTEN UPDATE.")));
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($loader);
     return $frameResponseObject;
 }
Ejemplo n.º 11
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("build");
     if (!isset($_POST['confirm'])) {
         $tpl->display("Deploy.template.html");
     } else {
         $newWorksheet = $worksheet->deploy();
         $_SESSION["confirmation"] = "Das Arbeitsblatt wurde veröffentlicht.";
         header("Location: " . PATH_URL . "worksheet/View/" . $newWorksheet->getId());
     }
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Eine Aufgabe hinzufügen", "link" => PATH_URL . "worksheet/AddBlock/" . $this->id), array("name" => "Arbeitsblatt verteilen", "link" => PATH_URL . "worksheet/Deploy/" . $this->id)));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/Edit/" . $this->id)));
     return $frameResponseObject;
 }
Ejemplo n.º 12
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     /*	if (isset($this->params[1])) {
     			$object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
     			$parent = $object->get_environment();
     			if ($parent instanceof \steam_container) {
     				$doc = $parent->get_object_by_name($this->params[1]);
     				if ($doc instanceof \steam_document) {
     					header("location: " . PATH_URL . "Download/Document/" . $doc->get_id());
     					exit;
     				}
     			}
     			\ExtensionMaster::getInstance()->send404Error();
     			exit;
     		}*/
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         $objName = $object->get_name();
         if ($object instanceof \steam_docextern) {
             $actionBar = new \Widgets\ActionBar();
             $actionBar->setActions(array(array("name" => "URL in neuem Fenster öffnen", "link" => "javascript:window.open('{$object->get_attribute("DOC_EXTERN_URL")}');")));
             $rawHtml = new \Widgets\RawHtml();
             $rawHtml->setHtml("<iframe height=\"800px\" width=\"100%\" src=\"{$object->get_attribute("DOC_EXTERN_URL")}\" scrolling=\"yes\"></iframe>");
             $frameResponseObject->setTitle($objName);
             $frameResponseObject->addWidget($actionBar);
             $frameResponseObject->addWidget($rawHtml);
             return $frameResponseObject;
         } else {
             if ($object instanceof \steam_document) {
                 $mimetype = $object->get_attribute(DOC_MIME_TYPE);
                 $objDesc = trim($object->get_attribute(OBJ_DESC));
                 $actionBar = new \Widgets\ActionBar();
                 $actionBar->setActions(array(array("name" => "Herunterladen", "link" => PATH_URL . "Download/Document/" . $this->id . "/" . $objName), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
                 if ($objDesc === 0 || $objDesc === "") {
                     $name = $objName;
                 } else {
                     $name = $objDesc . " (" . $objName . ")";
                 }
                 $html = "";
                 if ($mimetype == "image/png" || $mimetype == "image/jpeg" || $mimetype == "image/jpg" || $mimetype == "image/gif") {
                     // Image
                     $html = "<div style=\"text-align:center\"><img style=\"max-width:100%\" title=\"{$name}\" alt=\"Bild: {$name}\" src=\"" . PATH_URL . "Download/Document/" . $this->id . "/\"></div>";
                 } else {
                     if ($mimetype == "text/html") {
                         $actionBar->setActions(array(array("name" => "Bearbeiten", "link" => PATH_URL . "Explorer/EditDocument/" . $this->id . "/"), array("name" => "Quelltext", "link" => PATH_URL . "Explorer/CodeEditDocument/" . $this->id . "/"), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
                         //$html = "<B>Hello</I> How are <U> you?</B>";
                         $html = cleanHTML($object->get_content());
                         $dirname = dirname($object->get_path()) . "/";
                         preg_match_all('/href="([%a-z0-9.-_\\/]*)"/iU', $html, $matches);
                         $orig_matches = $matches[0];
                         $path_matches = $matches[1];
                         foreach ($path_matches as $key => $path) {
                             $path = urldecode($path);
                             if (parse_url($path, PHP_URL_SCHEME) != null) {
                                 continue;
                             }
                             $ref_object = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $dirname . $path);
                             if ($ref_object instanceof \steam_object) {
                                 $new_path = PATH_URL . "explorer/index/" . $ref_object->get_id();
                             } else {
                                 $new_path = PATH_URL . "404/";
                             }
                             $html = str_replace($orig_matches[$key], "href=\"" . $new_path . "\"", $html);
                         }
                         preg_match_all('/src="([%a-z0-9.\\-_\\/]*)"/iU', $html, $matches);
                         $orig_matches = $matches[0];
                         $path_matches = $matches[1];
                         foreach ($path_matches as $key => $path) {
                             $path = urldecode($path);
                             if (parse_url($path, PHP_URL_SCHEME) != null) {
                                 continue;
                             }
                             $ref_object = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $dirname . $path);
                             if ($ref_object instanceof \steam_object) {
                                 $new_path = PATH_URL . "Download/Document/" . $ref_object->get_id();
                             } else {
                                 $new_path = PATH_URL . "styles/standard/images/404.jpg";
                             }
                             $html = str_replace($orig_matches[$key], "src=\"" . $new_path . "\"", $html);
                         }
                         //	die;
                         //	$html = preg_replace('/href="([a-z0-9.-_\/]*)"/iU', 'href="' . $config_webserver_ip . '/tools/get.php?object=' . $current_path . '$1"', $html);
                         //	$html = preg_replace('/src="([a-z0-9.\-_\/]*)"/iU', 'src="' . $config_webserver_ip . '/tools/get.php?object=' . $current_path . '$1"', $html);
                     } else {
                         if (strstr($mimetype, "text")) {
                             $bidDokument = new \BidDocument($object);
                             $actionBar->setActions(array(array("name" => "Bearbeiten", "link" => PATH_URL . "Explorer/EditDocument/" . $this->id . "/"), array("name" => "Herunterladen", "link" => PATH_URL . "Download/Document/" . $this->id . "/"), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
                             //$html = "<pre>{$object->get_content()}</pre>";
                             $html = $bidDokument->get_content();
                         } else {
                             header("location: " . PATH_URL . "Download/Document/" . $this->id . "/");
                         }
                     }
                 }
                 $rawHtml = new \Widgets\RawHtml();
                 $rawHtml->setHtml($html);
                 //$rawHtml->addWidget($breadcrumb);
                 //$rawHtml->addWidget($environment);
                 //$rawHtml->addWidget($loader);
                 $frameResponseObject->setTitle($name);
                 $frameResponseObject->addWidget($actionBar);
                 $frameResponseObject->addWidget($rawHtml);
                 return $frameResponseObject;
             }
         }
     } else {
         header("location: " . PATH_URL . "404/");
     }
 }
Ejemplo n.º 13
0
 public function getHtmlForObjectId(\FrameResponseObject $frameResponseObject)
 {
     $rawHtml = new \Widgets\RawHtml();
     $objectId = $this->id;
     if (isset($this->params[1])) {
         $from = $this->params[1];
     } else {
         $from = 0;
     }
     $steam = $GLOBALS["STEAM"]->get_id();
     $currentRoom = \steam_factory::get_object($steam, $objectId);
     $this->object = $currentRoom;
     $currentRoomPath = $currentRoom->get_path(1);
     $currentRoomData = $currentRoom->get_attributes(array(OBJ_NAME, OBJ_DESC), 1);
     $steamUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $steamUserId = $steamUser->get_id();
     //check if user may write in this folder
     $writeAllowed = $currentRoom->check_access_write($steamUser, 1);
     //get inventory and inventorys attributes if allowed to
     $allowed = $currentRoom->check_access_read($steamUser, 1);
     $result = $GLOBALS["STEAM"]->buffer_flush();
     $writeAllowed = $result[$writeAllowed];
     $allowed = $result[$allowed];
     $currentRoomPath = $result[$currentRoomPath];
     $currentRoomData = $result[$currentRoomData];
     $currentRoomDisplayName = str_replace("'s workarea", "", stripslashes($currentRoomData[OBJ_NAME]));
     if (isset($currentRoomData[OBJ_DESC]) && $currentRoomData[OBJ_DESC] != "") {
         $currentRoomDisplayName = $currentRoomData[OBJ_DESC];
     }
     $currentRoomDisplayName = str_replace("s workroom.", "", $currentRoomDisplayName);
     $numberOfThumbs = 10;
     //forces a stable navigation structure
     $from -= $from % $numberOfThumbs;
     //navigation commands
     $picCount = sizeof($currentRoom->get_inventory());
     $to = $from + ($numberOfThumbs - 1);
     if ($from >= $picCount) {
         $from = $picCount - 1 - ($picCount - 1) % $numberOfThumbs;
     }
     if ($to >= $picCount) {
         $to = $picCount - 1;
     }
     if ($allowed && $currentRoom instanceof \steam_container) {
         if ($from >= 0 && $to >= $numberOfThumbs - 1) {
             $inventory = $currentRoom->get_inventory_paged($from, $to);
         } else {
             $inventory = $currentRoom->get_inventory_paged(0, $numberOfThumbs - 1);
         }
     } else {
         $inventory = array();
     }
     //$contentJS = $this->loadTemplate("overlay.template.js");
     //add css
     //	\Gallery::getInstance()->addCSS();
     //add js
     //	\Gallery::getInstance()->addJS();
     //\lms_portal::get_instance()->add_javascript_src("JQuery", PATH_URL . "gallery/js/jquery.min.js");
     //	\lms_portal::get_instance()->add_javascript_src("JQuery", PATH_URL . "gallery/js/jquery.colorbox.js");
     //	\lms_portal::get_instance()->add_javascript_src("JQuery", PATH_URL . "gallery/js/colorbox.control.js");
     //TODO: overlay.template.js not working - overlay to start gallery missing
     //$this->addJS("overlay.template.js");
     $tpl = \Gallery::getInstance()->loadTemplate("gallery.template.html");
     //$tpl= new \HTML_TEMPLATE_IT();
     //$tpl->loadTemplateFile(\Gallery::getInstance()->getExtensionPath()."ui/html/gallery.template.html");
     $tpl->setVariable("IMAGEURL", \Gallery::getInstance()->getAssetUrl() . "image/round_green_play_button_4044.jpg");
     $tpl->setVariable("FROM", max($from + 1, 1));
     $tpl->setVariable("TO", min($to + 1, $picCount));
     $tpl->setVariable("PIC_COUNT", $picCount);
     $pagemin = $from - $numberOfThumbs;
     $pagemin = max($pagemin, 0);
     //Navigation
     $backlink = "<a href=\"" . PATH_URL . "gallery/index/" . $objectId . "/" . $pagemin . "\" class=\"pagingleft\"><img alt=\"Zurück\" title=\"Zurück\" src=\"" . \Gallery::getInstance()->getAssetUrl() . "/icons/top_seq_prev_on.gif\"></a>";
     if ($from == 0) {
         $backlink = "<a href=\"\" class=\"pagingleft\"><img alt=\"Zurück\" title=\"Zur&uuml;ck\" src=\"" . \Gallery::getInstance()->getAssetUrl() . "/icons/top_seq_prev_off.gif\"></a>";
         $tpl->setVariable("BACKLINK", $backlink);
     } else {
         $tpl->setVariable("BACKLINK", $backlink);
     }
     $pagemax = min($to, $picCount - 1);
     $forwardlink = "<a href=\"" . PATH_URL . "gallery/index/" . $objectId . "/" . ($pagemax + 1) . "\" class=\"pagingleft\"><img alt=\"Zurück\" title=\"Zurück\" src=\"" . \Gallery::getInstance()->getAssetUrl() . "/icons/top_seq_next_on.gif\"></a>";
     if ($to >= $picCount - 1) {
         $forwardlink = "<a href=\"\" class=\"pagingright\"><img alt=\"Vor\" title=\"Vor\" src=\"" . \Gallery::getInstance()->getAssetUrl() . "/icons/top_seq_next_off.gif\">";
         $tpl->setVariable("FORWARDLINK", $forwardlink);
     } else {
         $tpl->setVariable("FORWARDLINK", $forwardlink);
     }
     //Rights
     foreach ($inventory as $item) {
         $tnr[$item->get_id()] = array();
         $tnr[$item->get_id()]["creator"] = $item->get_creator(1);
         $tnr[$item->get_id()]["item_write_access"] = $item->check_access_write($GLOBALS["STEAM"]->get_current_steam_user(), 1);
         $tnr[$item->get_id()]["item_read_access"] = $item->check_access_read($GLOBALS["STEAM"]->get_current_steam_user(), 1);
     }
     $result = $GLOBALS["STEAM"]->buffer_flush();
     $creators = array();
     $itemWriteAccess = array();
     $itemReadAccess = array();
     foreach ($inventory as $item) {
         $creators[$item->get_id()] = $result[$tnr[$item->get_id()]["creator"]];
         $itemWriteAccess[$item->get_id()] = $result[$tnr[$item->get_id()]["item_write_access"]];
         $itemReadAccess[$item->get_id()] = $result[$tnr[$item->get_id()]["item_read_access"]];
     }
     \steam_factory::load_attributes($steam, $inventory, array(OBJ_NAME, OBJ_DESC, OBJ_KEYWORDS, DOC_MIME_TYPE, "bid:description"));
     // If you want to use further Methods of caching e.g. PHP PEARs Cache_Lite
     // insert caching mechanisms in here...
     // below this, the steam connector is no longer used...
     $undisplayedPicCount = 0;
     //GET RIGHTS
     $sanction = $currentRoom->get_sanction();
     $attrib = $this->object->get_attributes(array(OBJ_NAME, OBJ_DESC, "bid:doctype"));
     $bid_doctype = isset($attrib["bid:doctype"]) ? $attrib["bid:doctype"] : "";
     $docTypeQuestionary = strcmp($attrib["bid:doctype"], "questionary") == 0;
     $docTypeMessageBoard = $this->object instanceof \steam_messageboard;
     // in questionaries the write right is limited to insert rights only
     if ($docTypeQuestionary) {
         $SANCTION_WRITE_FOR_CURRENT_OBJECT = SANCTION_INSERT;
     } else {
         if ($docTypeMessageBoard) {
             $SANCTION_WRITE_FOR_CURRENT_OBJECT = SANCTION_ANNOTATE;
         } else {
             $SANCTION_WRITE_FOR_CURRENT_OBJECT = SANCTION_WRITE | SANCTION_EXECUTE | SANCTION_MOVE | SANCTION_INSERT | SANCTION_ANNOTATE;
         }
     }
     $sanctionFlag = false;
     if (isset($sanction[$steamUserId])) {
         if ($sanction[$steamUserId] >= $SANCTION_WRITE_FOR_CURRENT_OBJECT) {
             $sanctionFlag = true;
         }
     }
     $env = $currentRoom->get_environment();
     if ($env instanceof \steam_room) {
         $envSanction = $env->get_sanction();
         if (isset($envSanction[$steamUserId])) {
             if ($envSanction[$steamUserId] >= $SANCTION_WRITE_FOR_CURRENT_OBJECT) {
                 $sanctionFlag = true;
             }
         }
     }
     $currentRoomCreater = $currentRoom->get_creator();
     $currentRoomCreaterId = $currentRoomCreater->get_id();
     if ($currentRoomCreaterId == $steamUserId) {
         $sanctionFlag = true;
     }
     for ($i = 0; $i < count($inventory); $i++) {
         $tpl->setCurrentBlock("ITEM");
         $item = $inventory[$i];
         if ($sanctionFlag) {
             $tpl->setVariable("REMOVE_ICON", \Gallery::getInstance()->getAssetUrl() . "icons/trash.png");
             $tpl->setVariable("ITEM_PATH_URL2", PATH_URL);
             $tpl->setVariable("ITEM_THUMBNAIL_ID2", $item->get_id());
         }
         $tpl->setVariable("FULLSCREEN_ICON", \Gallery::getInstance()->getAssetUrl() . "icons/image_fullscreen.png");
         $tpl->setVariable("SAVE_ICON", \Gallery::getInstance()->getAssetUrl() . "icons/image_save.png");
         $tpl->setVariable("EDIT_ICON", \Gallery::getInstance()->getAssetUrl() . "icons/image_properties.gif");
         $popupMenu = new \Widgets\PopupMenu();
         $popupMenu->setData($item);
         $popupMenu->setElementId("gallery-overlay");
         $tpl->setVariable("POPUP_MENU", $popupMenu->getHtml());
         $rawHtml->addWidget($popupMenu);
         // Skip image if rights are insufficient
         if (!$itemReadAccess[$item->get_id()]) {
             $undisplayedPicCount++;
             continue;
         }
         $itemName = $item->get_attribute(OBJ_NAME);
         $itemDescription = $item->get_attribute(OBJ_DESC);
         $itemKeywords = implode(", ", $item->get_attribute(OBJ_KEYWORDS));
         $itemMimetype = $item->get_attribute(DOC_MIME_TYPE);
         //set Item
         $tpl->setVariable("OBJECT_ID", $item->get_id());
         $tpl->setVariable("OBJECT_NAME", $itemName);
         $tpl->setVariable("OBJECT_DESC", $itemDescription);
         $tpl->setVariable("OBJECT_KEYWORDS", $itemKeywords);
         // render a steam_document
         if ($item instanceof \steam_document) {
             //care for documents not to be displayed in the browser
             if ($itemMimetype === "image/gif" || $itemMimetype === "image/jpg" || $itemMimetype === "image/jpeg" || $itemMimetype === "image/png") {
                 $tpl->setVariable("ITEM_PATH_URL", PATH_URL);
                 $tpl->setVariable("ITEM_THUMBNAIL_ID", $item->get_id());
                 $tpl->setVariable("ITEM_BIGTHUMB_ID", $item->get_id());
                 if ($i - $undisplayedPicCount == 0) {
                     $tpl->setVariable("FIRST_GALLERY_ID", $item->get_id());
                 }
                 $tpl->parse("ITEM");
             }
         }
     }
     //set invisible items for colorbox
     for ($i = 0; $i < count($inventory); $i++) {
         $tpl->setCurrentBlock("INV");
         $item = $inventory[$i];
         // Skip image if rights are insufficient
         if (!$itemReadAccess[$item->get_id()]) {
             $undisplayedPicCount++;
             continue;
         }
         $itemName = $item->get_attribute(OBJ_NAME);
         $itemDescription = $item->get_attribute(OBJ_DESC);
         $itemKeywords = implode(", ", $item->get_attribute(OBJ_KEYWORDS));
         $itemMimetype = $item->get_attribute(DOC_MIME_TYPE);
         // set display name
         $objectDisplayName = $itemName;
         if ($itemDescription === 0) {
             $itemDescription = "";
         }
         $tpl->setVariable("OBJECT_NAME", $objectDisplayName);
         $tpl->setVariable("OBJECT_DESC", $itemDescription);
         // render a steam_document
         if ($item instanceof \steam_document) {
             //care for documents not to be displayed in the browser
             if ($itemMimetype === "image/gif" || $itemMimetype === "image/jpg" || $itemMimetype === "image/jpeg" || $itemMimetype === "image/png") {
                 $tpl->setVariable("ITEM_PATH_URL", PATH_URL);
                 $tpl->setVariable("ITEM_THUMBNAIL_ID", $item->get_id());
                 $tpl->parse("INV");
             }
         }
     }
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Neues Bild", "ajax" => array("onclick" => array("command" => "Addpicture", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "Properties", "params" => array("id" => $this->id), "requestType" => "popup", "namespace" => "explorer"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup", "namespace" => "explorer")))));
     $css = self::auslesen(PATH_URL . "gallery/css/style.css");
     $js = self::auslesen(PATH_URL . "gallery/js/code.js");
     $rawHtml->setCss($css);
     $rawHtml->setJs($js);
     $rawHtml->setHtml($tpl->get());
     if ($sanctionFlag) {
         $frameResponseObject->addWidget($actionBar);
     }
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 14
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("Profile"), "link" => $this->getExtension()->getExtensionUrl() . "profile/"), array("name" => gettext("Groups"), "link" => $this->getExtension()->getExtensionUrl() . "groups/"), array("name" => gettext("File Uploads"), "link" => $this->getExtension()->getExtensionUrl() . "Fileupload/"), array("name" => gettext("Blogs"), "link" => $this->getExtension()->getExtensionUrl() . "Blog/")));
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Portfolio/"), "link" => $this->getExtension()->getExtensionUrl() . "Myportfolio/"), array("name" => gettext("Blog"))));
        $tabBar = new \Widgets\TabBar();
        $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => gettext("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "myportfolio/"), array("name" => gettext("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
        $clearer = new \Widgets\Clearer();
        $input = new \Widgets\TextInput();
        $grid = new \Widgets\Grid();
        $grid->setData(array("headline" => array(array("name" => \Portfolio::getInstance()->getText("BLOG Number"), "colspan" => "2")), "rows" => array(array(array("content" => \Portfolio::getInstance()->getText("Blog Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Body"), "type" => "label"), array("content" => $input, "type" => "value")))));
        $actionBar2 = new \Widgets\ActionBar();
        $actionBar2->setActions(array(array("name" => \Portfolio::getInstance()->getText("Attach Files"), "link" => $this->getExtension()->getExtensionUrl() . ""), array("name" => gettext("Save"), "link" => $this->getExtension()->getExtensionUrl() . "")));
        $html = <<<end
\t    


<style type="text/css">


</style>


<div class="actionBar">
    
\t<a href="../Editview/"class="button">File Uploads</a>
\t
\t<a href="" class="button">Blog</a>
\t
</div>
<div class="headline">
\t<h1>User's Blog </h1>
</div>

<ul class="tabBar">
        
    <li class="tabIn"><a href="./..">Dashboard</a></li>
        
    <li class="tabIn"><a href="../profile/">Profile</a></li>
        
    <li class="tabOut"><a href="">Portfolio</a></li>
        
    <li class="tabIn"><a href="../groups/">Groups</a></li>
    
    <li style="clear: left;">
</li></ul>

<br>



<table class="grid" cellspacing="0" cellpadding="5" width="100%">

\t <tr>
\t\t\t<th class="group" colspan="2">Blog...(NUMBER)</th>
\t </tr>
\t <tr>
<td class="label">Title</td>
\t<td class="value">
\t\t<input type="text" value="blogs_title" disabled="" size="30" >
</td>
<tr>

<td class="label">Body</td>
<td class="value">
<textarea wrap="virtual" rows="10" style="width: 95%;" name="values[USER_PROFILE_DSC]"></textarea>
<br>
<a class="textformat_button" title="boldface" href="javascript:insert('[b]', '[/b]', 'formular', 'values[USER_PROFILE_DSC]')">
<b>B</b>
</a>
<a class="textformat_button" title="italic" href="javascript:insert('[i]', '[/i]', 'formular', 'values[USER_PROFILE_DSC]')">
<i>I</i>
</a>
<a class="textformat_button" title="underline" href="javascript:insert('[u]', '[/u]', 'formular', 'values[USER_PROFILE_DSC]')">
<u>U</u>
</a>
<a class="textformat_button" title="strikethrough" style="text-decoration: line-through;" href="javascript:insert('[s]', '[/s]', 'formular', 'values[USER_PROFILE_DSC]')">S</a>
<a class="textformat_button" title="image" href="javascript:insert('[img]http://', '[/img]', 'formular', 'values[USER_PROFILE_DSC]')">IMG</a>
<a class="textformat_button" title="web link" href="javascript:insert('[url=http://]', '[/url]', 'formular', 'values[USER_PROFILE_DSC]')">URL</a>
<a class="textformat_button" title="email link" href="javascript:insert('[mail=@]', '[/mail]', 'formular', 'values[USER_PROFILE_DSC]')">MAIL</a>
</td>
</tr>
\t
\t</td>
\t</tr>
\t </table>
\t <div class="actionBar">
    
\t<a href=""class="button">Attach Files</a>
\t<a href=""class="button">Connect Web</a>
</div>
<div class="buttons">
<a class="button">Save</a>
</div>
       

end;
        $frameResponseObject->setTitle("Blog");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        //$frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($breadcrumb);
        //$frameResponseObject->addWidget($tabBar);
        $frameResponseObject->addWidget($clearer);
        $frameResponseObject->addWidget($grid);
        $frameResponseObject->addWidget($actionBar2);
        //$frameResponseObject->addWidget($content);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 15
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("new artefact"), "ajax" => array("onclick" => array("command" => "newElement", "params" => array("newElement" => "newElement"), "requestType" => "popup"))), array("name" => \Portfolio::getInstance()->getText("new portfolio"), "ajax" => array("onclick" => array("command" => "NewArtefactForm", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Meine Portfolios"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => gettext("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "myportfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $globalArtefacsBox = new \Widgets\Box();
     $globalArtefacsBox->setTitle("Alle Belege");
     $globalArtefacsBox->setTitleLink($this->getextension()->getExtensionUrl() . "ManageArtefacts/");
     $globalArtefacsBox->setContent(count(\Artefacts::getAllArtefacts()));
     /*
     $artefactsLoader = new \Widgets\Loader();
     $artefactsLoader->setWrapperId("artefactsWrapper");
     $artefactsLoader->setMessage("loading artefacts ...");
     $artefactsLoader->setCommand("loadArtefacts");
     $artefactsLoader->setParams(array());
     $artefactsLoader->setElementId("artefactsWrapper");
     $artefactsLoader->setType("updater");
     */
     $frameResponseObject->setTitle("Portfolio");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($globalArtefacsBox);
     $frameResponseObject->addWidget($clearer);
     $portfolios = \PortfolioModel::getMyPortfolios();
     foreach ($portfolios as $key => $portfolio) {
         $loader = new \Widgets\Loader();
         $loader->setWrapperId("portfolioWrapper" . $key);
         $loader->setMessage("loading portfolio infos...");
         $loader->setCommand("loadPortfolio");
         $loader->setParams(array($portfolio->getId()));
         $loader->setElementId("portfolioWrapper" . $key);
         $loader->setType("updater");
         $frameResponseObject->addWidget($loader);
     }
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
     /*
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name"=>gettext("Profile"), "link"=>$this->getExtension()->getExtensionUrl() . "profile/"), array("name"=>gettext("Groups"), "link"=>$this->getExtension()->getExtensionUrl() . "groups/"), array("name"=>gettext("File Uploads"), "link"=>$this->getExtension()->getExtensionUrl()."Fileupload/"),array("name"=>gettext("Blogs"), "link"=>$this->getExtension()->getExtensionUrl() . "Blog/")));
     
     
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name"=>gettext("My Views"))));
     
     
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name"=>gettext("Dashboard"), "link"=>$this->getextension()->getExtensionUrl()."/"), array("name"=>gettext("Portfolio"), "link"=>$this->getExtension()->getExtensionUrl() . "myportfolio/"), array("name"=>gettext("Shared Portfolios"), "link"=>$this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     
     $clearer = new \Widgets\Clearer();
     
     $boxManage = new \Widgets\PortfolioViewBox();
     $boxManage->setTitle(gettext("Manage Artefacts"));
     $boxManage->setTitleLink($this->getExtension()->getExtensionUrl() . "ManageArtefacts/");
     $boxManage->setContent("this view helps in uploading and managing of desired artefacts");
     //$boxManage->setButtons(array(array("name"=>"Edit", "link"=>$this->getextension()->getExtensionUrl()."ManageArtefacts/"), array("name"=>"Manage Acess", "link"=>'')));
     
     
     $boxDiscuss = new \Widgets\PortfolioViewBox();
     $boxDiscuss->setTitle(gettext("Discuss View"));
     $boxDiscuss->setTitleLink($this->getextension()->getExtensionUrl()."ViewChart/");
     $boxDiscuss->setContent("Discuss view shows what other have commeted about ur artefacts.if needed this content  can be edited");
     $boxDiscuss->setButtons(array(array("name"=>"Edit", "link"=>"#"), array("name"=>"Manage Acess", "link"=>$this->getextension()->getExtensionUrl()."ManageArtefacts/")));
     
     $boxcompetence = new \Widgets\PortfolioViewBox();
     $boxcompetence->setTitle(gettext("Competence View"));
     $boxcompetence->setTitleLink($this->getextension()->getExtensionUrl()."ViewCompetence/");
     $boxcompetence->setContent(" Competence view shows the grading of artifacts on the basis of comments given by friends and other group members");
     $boxcompetence->setButtons(array(array("name"=>"Edit", "link"=>"#"), array("name"=>"Manage Acess", "link"=>"#")));
     
     
     
     $frameResponseObject->setTitle("Groups");
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($boxManage);
     $frameResponseObject->addWidget($boxDiscuss);
     $frameResponseObject->addWidget($boxcompetence);
     
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
     */
 }
Ejemplo n.º 16
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Portfolio/"), "link" => $this->getExtension()->getExtensionUrl() . "Myportfolio/"), array("name" => \Portfolio::getInstance()->getText("File Upload"))));
        $tabBar = new \Widgets\TabBar();
        $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "myportfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
        $clearer = new \Widgets\Clearer();
        $upload = new \Widgets\UploadFile();
        $upload->setLabel(\Portfolio::getInstance()->getText("Upload File"));
        $menu = new \Widgets\DropdownBox();
        $menu->setLabel(\Portfolio::getInstance()->getText("type of group"));
        $menu->addOption(\Portfolio::getInstance()->getText("New Folder"));
        $menu->addOption(\Portfolio::getInstance()->getText("Folder 1"));
        $menu->addOption(\Portfolio::getInstance()->getText("Folder 2"));
        $actionBar2 = new \Widgets\ActionBar();
        $actionBar2->setActions(array(array("name" => \Portfolio::getInstance()->getText("Save"), "link" => $this->getExtension()->getExtensionUrl() . ""), array("name" => gettext("Cancel"), "link" => $this->getExtension()->getExtensionUrl() . "")));
        $html = <<<end




<style type="text/css">

.uploadform td {
    font-size: 0.9167em;
    line-height: 1.3333em;
}

</style>

<div class="headline">
\t<h1>File Upload</h1>
</div>





<ul class="tabBar">
        
    <li class="tabIn"><a href="./..">Dashboard</a></li>
        
    <li class="tabIn"><a href="../profile/">Profile</a></li>
        
    <li class="tabOut"><a href="../myportfolio/">Portfolio</a></li>
        
    <li class="tabIn"><a href="../groups/">Groups</a></li>
    
    <li style="clear: left;">
</li></ul>
<br>
Portfolio > file upload <br><br>
<td class="label" Upload File:</td>


<div>
<tr class="uploadform">
<th>
<p>
File:
<input type="file" size="45" name="filename1">
</p>

<p>
 Folder:
<td class="value">
<select name="values[OBJ_DESC]">
<option value=""></option>
<option value="New Folder" selected="selected">New Folder</option>
<option value="Folder 1">Folder 1</option>
<option value="Folder 2">Folder 2</option>
<option value="Folder 3">Folder 3</option>
</select>
</td>
<br>
<br>
<br>
<input type="submit" value="Submit" name=".submit">
</form>
end;
        $frameResponseObject->setTitle("Fileupload");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        //$frameResponseObject->addWidget($tabBar);
        $frameResponseObject->addWidget($clearer);
        $frameResponseObject->addWidget($upload);
        $frameResponseObject->addWidget($clearer);
        $frameResponseObject->addWidget($menu);
        $frameResponseObject->addWidget($actionBar2);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 17
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $rawHtml = new \Widgets\RawHtml();
     $forumId = $this->forumId;
     $category_id = $this->id;
     $myExtension = \Forum::getInstance();
     $myExtension->addCSS("style_topics.css");
     //******************************************************
     //** sTeam Server Connection
     //******************************************************
     $steam = $GLOBALS["STEAM"];
     /** log-in user */
     $steamUser = \lms_steam::get_current_user();
     /** id of the log-in user */
     $steamUserId = $steamUser->get_id();
     /** the login user name */
     $steamUserLoginName = $steamUser->get_name();
     $steamUserName = $steamUser->get_full_name();
     /** the current category */
     $category = \steam_factory::get_object($steam->get_id(), $category_id);
     /** additional required attributes */
     $categoryAttributes = $category->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME, "bid:description", "DOC_LAST_MODIFIED", "DOC_USER_MODIFIED"), 1);
     /** the content of the current category */
     $categoryContent = $category->get_content(1);
     /** the creater of the current category */
     $categoryCreator = $category->get_creator(1);
     /** the current forum */
     $forum = $category->get_annotating(1);
     $category_allowed_write = $category->check_access_write($steamUser, 1);
     $category_allowed_read = $category->check_access_read($steamUser, 1);
     $category_allowed_annotate = $category->check_access_annotate($steamUser, 1);
     // flush the buffer
     $result = $steam->buffer_flush();
     $categoryAttributes = $result[$categoryAttributes];
     $categoryContent = $result[$categoryContent];
     $categoryCreator = $result[$categoryCreator];
     $categoryCreatorId = $categoryCreator->get_id();
     $categoryAttributes["DOC_USER_MODIFIED"]->get_attributes(array(OBJ_NAME), 1);
     $forum = $result[$forum];
     $category_allowed_write = $result[$category_allowed_write];
     $category_allowed_read = $result[$category_allowed_read];
     $category_allowed_annotate = $result[$category_allowed_annotate];
     $category_allowed_sanction = $category->check_access(SANCTION_SANCTION);
     /** the environment of the forum object */
     $forumEnvironment = $forum->get_environment();
     /** additional required attributes */
     $forumEnvironmentAttributes = $forumEnvironment->get_attributes(array(OBJ_NAME, OBJ_DESC), 1);
     /** additional required attributes */
     $forumAttributes = $forum->get_attributes(array(OBJ_NAME, OBJ_DESC, "bid:description", "bid_forum_subtitle"), 1);
     /** the creator of the forum */
     $forumCreator = $forum->get_creator(1);
     /** attributes of the creator of the category */
     $categoryCreatorAttributes = $categoryCreator->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_ICON), 1);
     $result = $steam->buffer_flush();
     $forumAttributes = $result[$forumAttributes];
     $forumCreator = $result[$forumCreator];
     $categoryCreatorAttributes = $result[$categoryCreatorAttributes];
     $forumEnvironmentAttributes = $result[$forumEnvironmentAttributes];
     /** attributes of the creator of the forum object */
     $forumCreatorAttributes = $forumCreator->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_ICON), 1);
     $result = $steam->buffer_flush();
     $forumCreatorAttributes = $result[$forumCreatorAttributes];
     $forumCreatorId = $forumCreator->get_id();
     //\Forum::getInstance()->addCSS();
     if ($category_allowed_read) {
         $messages = $category->get_annotations(false, 1);
         $result = $steam->buffer_flush();
         $messages = $result[$messages];
         sort($messages);
         if (count($messages) > 0) {
             foreach ($messages as $message) {
                 if (!empty($message)) {
                     $id = $message->get_id();
                     $messageAttributes[$id] = $message->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME, "DOC_LAST_MODIFIED", "DOC_USER_MODIFIED"), 1);
                     $messageAccessWrite[$id] = $message->check_access_write($steamUser, 1);
                     $messageContent[$id] = $message->get_content(1);
                     $messageCreator[$id] = $message->get_creator(1);
                 }
             }
             $result = $steam->buffer_flush();
             foreach ($messages as $message) {
                 $id = $message->get_id();
                 $messageAttributes[$id] = $result[$messageAttributes[$id]];
                 $messageContent[$id] = $result[$messageContent[$id]];
                 $messageCreator[$id] = $result[$messageCreator[$id]];
                 $messageCreator[$id]->get_attributes(array(OBJ_NAME), 1);
                 $messageAttributes[$id]["DOC_USER_MODIFIED"]->get_attributes(array(OBJ_NAME), 1);
                 $messageAccessWrite[$id] = $result[$messageAccessWrite[$id]];
             }
             $result = $steam->buffer_flush();
         }
     }
     //START CHECK RIGHTS OF THE CURRENT USER
     //$isReplyEditable= $category->get_attribute("bid:forum:is_editable");
     //if(trim($isReplyEditable) == "checked"){
     //	$isReplyEditable=true;
     //} else{
     //	$isReplyEditable=false;
     //}
     $isForumCreator = false;
     $isTopicCreator = false;
     $canAnnotate = $category_allowed_write || $category_allowed_annotate;
     $canRead = $category_allowed_read;
     $hasSanctionRights = $category_allowed_sanction;
     if ($forumCreatorId == $steamUserId) {
         $isForumCreator = true;
         $isTopicCreator = true;
         $canAnnotate = true;
         $canRead = true;
     } elseif ($categoryCreatorId == $steamUserId) {
         $isTopicCreator = true;
         $canAnnotate = true;
         $canRead = true;
     } elseif ($canAnnotate) {
         $canRead = true;
     }
     //END CHECK RIGHTS OF THE CURRENT USER
     $content = \Forum::getInstance()->loadTemplate("forumShowTopic.template.html");
     $addIcon = \Forum::getInstance()->getAssetUrl() . "icons/new.gif";
     $editIcon = \Forum::getInstance()->getAssetUrl() . "icons/message_edit.gif";
     $deleteIcon = \Forum::getInstance()->getAssetUrl() . "icons/message_delete.gif";
     if ($category_allowed_read) {
         $content->setVariable("FORUM_NAME", $forumAttributes["OBJ_DESC"]);
         $content->setVariable("CATEGORIE_NAME", $categoryAttributes[OBJ_DESC]);
         $content->setVariable("FORUM_OWNER", $forumCreator->get_full_name());
         $content->setVariable("FORUM_OWNER_URL", PATH_URL . "profile/index/" . $forumCreator->get_name());
         $content->setVariable("CATEGORIE_DESCRIPTION", $categoryAttributes["bid:description"]);
         $content->setVariable("CATEGORIE_CREATOR", $categoryCreator->get_full_name());
         $content->setVariable("CATEGORIE_CREATION_TIME", date("j.m.Y G:i", $categoryAttributes['OBJ_CREATION_TIME']));
         $content->setVariable("CATEGORIE_CREATOR_URL", PATH_URL . "profile/index/" . $categoryCreator->get_name());
         $content->setVariable("CATEGORIE_CONTENT", $categoryContent);
         if ($canAnnotate) {
             $popupMenu = new \Widgets\PopupMenu();
             $popupMenu->setData($category);
             $popupMenu->setElementId("overlay_menu");
             $popupMenu->setParams(array(array("key" => "forum", "value" => $forumId), array("key" => "category", "value" => $category_id)));
             $content->setVariable("POPUP_MENU", $popupMenu->getHtml());
             $rawHtml->addWidget($popupMenu);
         }
         if ($categoryAttributes[OBJ_CREATION_TIME] != $categoryAttributes["DOC_LAST_MODIFIED"]) {
             if (strlen(trim($categoryContent)) > 0) {
                 $content->setVariable("AUTHOR_EDIT", $categoryAttributes["DOC_USER_MODIFIED"]->get_full_name());
                 $content->setVariable("TIMESTAMP_EDIT", date("j.m.Y G:i", $categoryAttributes["DOC_LAST_MODIFIED"]));
             } else {
                 $content->setVariable("AUTHOR_DELETE", $categoryAttributes["DOC_USER_MODIFIED"]->get_full_name());
                 $content->setVariable("TIMESTAMP_DELETE", date("j.m.Y G:i", $categoryAttributes["DOC_LAST_MODIFIED"]));
             }
         }
         $column_width = 763;
         if ($category->get_attribute("bid:forum:category:picture_id") !== 0) {
             $picture_width = $category->get_attribute("bid:forum:category:picture_width") != 0 ? $category->get_attribute("bid:forum:category:picture_width") : "";
             if (extract_percentual_length($picture_width) == "") {
                 $bare_picture_width = extract_length($picture_width);
                 if ($bare_picture_width == "") {
                     $picture_width = "";
                 } else {
                     if ($bare_picture_width > $column_width - 25) {
                         $picture_width = $column_width - 25;
                     }
                 }
             }
             $content->setVariable("MESSAGE_PICTURE_URL1", getDownloadUrlForObjectId($category->get_attribute("bid:forum:category:picture_id")));
             if ($category->get_attribute("bid:forum:category:picture_alignment") !== "none") {
                 $content->setVariable("MESSAGE_PICTURE_ALIGNMENT1", $category->get_attribute("bid:forum:category:picture_alignment"));
             } else {
                 $content->setVariable("MESSAGE_PICTURE_ALIGNMENT1", "");
             }
             $content->setVariable("MESSAGE_PICTURE_WIDTH1", $picture_width);
         }
         if (is_array($messages) && isset($messages)) {
             if (count($messages) > 0) {
                 $content->setVariable("EXISTS_REPLY", "Antworten");
             }
             foreach ($messages as $message) {
                 $id = $message->get_id();
                 $content->setCurrentBlock("message");
                 $content->setVariable("MESSAGE_CONTENT", $messageContent[$id]);
                 $content->setVariable("MESSAGE_CREATOR", $messageCreator[$id]->get_full_name());
                 $content->setVariable("MESSAGE_CREATOR_PROFILE", PATH_URL . "profile/index/" . $messageCreator[$id]->get_name());
                 $content->setVariable("MESSAGE_CREATION_TIME", date("j.m.Y G:i", $messageAttributes[$id][OBJ_CREATION_TIME]));
                 $content->setVariable("MESSAGE_NAME", $messageAttributes[$id][OBJ_DESC]);
                 $content->setVariable("MES_ID", "message_" . $id);
                 if ($messageAttributes[$id][OBJ_CREATION_TIME] != $messageAttributes[$id]["DOC_LAST_MODIFIED"]) {
                     if (strlen(trim($messageContent[$id])) > 0) {
                         $content->setVariable("AUTHOR_MES_EDIT", $messageAttributes[$id]["DOC_USER_MODIFIED"]->get_full_name());
                         $content->setVariable("TIMESTAMP_MES_EDIT", date("j.m.Y G:i", $messageAttributes[$id]["DOC_LAST_MODIFIED"]));
                     } else {
                         $content->setVariable("AUTHOR_MES_DELETE", $messageAttributes[$id]["DOC_USER_MODIFIED"]->get_full_name());
                         $content->setVariable("TIMESTAMP_MES_DELETE", date("j.m.Y G:i", $messageAttributes[$id]["DOC_LAST_MODIFIED"]));
                     }
                 }
                 if ($canAnnotate) {
                     $popupMenu2 = new \Widgets\PopupMenu();
                     $popupMenu2->setData($message);
                     $popupMenu2->setElementId("overlay_menu2");
                     $popupMenu2->setParams(array(array("key" => "forum", "value" => $forumId), array("key" => "category", "value" => $category_id)));
                     $content->setVariable("POPUP_MENU2", $popupMenu2->getHtml());
                     $rawHtml->addWidget($popupMenu2);
                 }
                 if ($message->get_attribute("bid:forum:category:picture_id") !== 0) {
                     $content->setCurrentBlock("BLOCK_MESSAGE_PICTURE");
                     $picture_width = $message->get_attribute("bid:forum:category:picture_width") != "0" ? trim($message->get_attribute("bid:forum:category:picture_width")) : "";
                     if (extract_percentual_length($picture_width) == "") {
                         $bare_picture_width = extract_length($picture_width);
                         if ($bare_picture_width == "") {
                             $picture_width = "";
                         } else {
                             if ($bare_picture_width > $column_width - 25) {
                                 $picture_width = $column_width - 25;
                             }
                         }
                     }
                     $content->setVariable("MESSAGE_PICTURE_URL", getDownloadUrlForObjectId($message->get_attribute("bid:forum:category:picture_id")));
                     if ($message->get_attribute("bid:forum:category:picture_alignment") !== "none") {
                         $content->setVariable("MESSAGE_PICTURE_ALIGNMENT", $message->get_attribute("bid:forum:category:picture_alignment"));
                     } else {
                         $content->setVariable("MESSAGE_PICTURE_ALIGNMENT", "");
                     }
                     $content->setVariable("MESSAGE_PICTURE_WIDTH", $picture_width);
                 }
                 $content->parse("message");
             }
         }
     } else {
         $content->setVariable("NO_ACCESS", "Sie haben keine Berechtigung diesen Inhalt zu betrachten!\n\t\t\tBitte wenden Sie sich an die Forumsverwaltung!");
     }
     $rawHtml->setHtml($content->get());
     $actions = array();
     if ($canAnnotate) {
         $actions[] = array("name" => "Antworten", "ajax" => array("onclick" => array("command" => "newReply", "params" => array("id" => $this->id, "forum" => $forumId), "requestType" => "popup")));
     }
     if ($isForumCreator) {
         //$actions[] = array("name" => "Eigenschaften", "ajax"=>array("onclick"=>array("command"=>"EditTopic", "params"=>array("id"=>$this->id ,"forum" => $forumId), "requestType"=>"popup")));
     }
     //if($category->check_access(SANCTION_SANCTION,$steamUser)){
     //if($isForumCreator || $hasSanctionRights){
     //	$actions[] = array("name"=>"Rechte", "ajax"=>array("onclick"=>array("command"=>"Sanctions", "params"=>array("id"=>$this->id) , "requestType"=>"popup", "namespace"=>"explorer")));
     //}
     $frameResponseObject->setTitle("Forum - " . $forumAttributes["OBJ_DESC"] . " - Thema - " . $categoryAttributes["OBJ_DESC"] . " ");
     $parent = $forum->get_environment();
     if ($parent instanceof \steam_container) {
         $parentLink = PATH_URL . "explorer/Index/" . $parent->get_id();
     } else {
         $parentLink = "";
     }
     $title = $categoryAttributes[OBJ_DESC];
     //	$breadcrumb = new \Widgets\Breadcrumb();
     //	$breadcrumb->setData(array($parentLink, array("name" => "<img src=\"".PATH_URL."explorer/asset/icons/mimetype/".deriveIcon(\Explorer::getInstance())."\"></img> " . $title . " " . \Explorer\Model\Sanction::getMarkerHtml(\Explorer::getInstance(), false))));
     $actionbar = new \Widgets\ActionBar();
     $actionbar->setActions($actions);
     //	$explorerId=$forum->get_environment()->get_id();
     //$frameResponseObject->setHeadline(array(array("name" =>"Zurück zu ". $forumAttributes["OBJ_DESC"], "link" => PATH_URL ."forum/index/". $forumId)));
     $widget = new \Widgets\RawHtml();
     $html = '<div id="backToForum">Zurück zu ';
     $html1 = '<a href="' . PATH_URL . "forum/index/" . $forumId . '">';
     $html2 = $forum->get_name() . '</a></div>';
     $widget->setHtml($html . $html1 . $html2);
     $frameResponseObject->addWidget($widget);
     $frameResponseObject->addWidget($actionbar);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 18
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $portfolioExtension = \Portfolio::getInstance();
        $content = $portfolioExtension->loadTemplate("portfolio.template.html");
        $portfolio = \Portfolio\Model\Portfolio::getInstanceForUser($this->user);
        $rawHtml = new \Widgets\RawHtml();
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => "Kompetenzportfolio")));
        $infobar = new \Widgets\InfoBar();
        $infobar->setHeadline("");
        $infobar->addParagraph(<<<END
Mithilfe dieses Kompetenzportfolio-Systems können  zentrale chemieberufliche
Kompetenzen zur Bilanzierung gesichtet, bestimmt, geordnet und dokumentiert werden.<br><br>
Das Kompetenzportfolio ist durch seine Bilanzierungs- und Dokumentationsfunktionen 
dafür geeignet, Ausbilder, Dozenten, Auszubildende, Schüler, Personalreferenten oder 
Angestellte von Berufen der chemischen Industrie bei Fragestellungen der Aus- und 
Weiterbildungseignung/-vorbereitung , der Anrechnung von Aus- und Weiterbildungszielen,
der Personalauswahl, der Personalentwicklung, der Berufswahl sowie bei der Bewerbung zu unterstützen.\t\t\t\t
END
);
        $content->setVariable("INFOBAR", $infobar->getHtml());
        // Profilbild
        $captionImage = new \Widgets\CaptionImage();
        $captionImage->setLink(PATH_URL . "user/index/" . $this->user->get_name() . "/");
        $captionImage->setLinkText($this->user->get_attribute("USER_FIRSTNAME") . " " . $this->user->get_attribute("USER_FULLNAME"));
        $captionImage->setImageSrc(\lms_user::get_user_image_url(140, 185, $this->user->get_attribute("OBJ_ICON")));
        $captionImage->setImageAlt(gettext("Profile Image"));
        $captionImage->setImageTitle(gettext("Complete your Profile"));
        $content->setVariable("PROFILEIMAGE", $captionImage->getHtml());
        $rawHtml->addWidget($captionImage);
        // schulische Abschlüsse
        $schoolBox = \Portfolio\Model\EntrySchool::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $schoolBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($schoolBox);
        // berufliche Abschlüsse
        $jobBox = \Portfolio\Model\EntryEducation::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $jobBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($jobBox);
        /*		$jobBox = new \Widgets\Box();
        		$jobBox->setId(\PortfolioHome::getInstance()->getId());
        		$jobBox->setTitle(\Portfolio::getInstance()->getText("Berufliche Aus- und Weiterbildungsgänge"));
        		$jobBox->setTitleLink(PATH_URL . "portfolio/");
        		$html = <<<END
        		<div style="text-align: center; color: gray; font-size: 80%">
        			Hier können relevante Informationen zu den beruflichen Aus- und Weiterbildungsgängen (wie die Art des Ausbildungsberufes sowie ggf. des Weiterbildungsberufes) hinterlegt, erläutert und belegt werden.
        		</div>
        		<br>
        		<div style="border: 3px dotted lightblue; padding: 5px; background-color: #ffe">
        			Ausbildungsberuf: <em>Chemikant</em> <br>
        			durchschnittliche Abschlussnote: <em>Gut (2)</em> <br>
        			Jahrgang: <em>2005</em> <br>
        			Ausbildungsbetrieb: <em>Bayer</em> <br>
        			Ausbildungsstätte: <em>Infracor</em> <br>
        			Bemerkung: <em>Schwerpunkt Anlagen</em>
        			<br clear=all>
        			<div style="float: right; display: inline">
        				<a href="">Eintrag bearbeiten</a> |
        				<a href="">Beleg anfügen</a> 
        			</div>
        			<br clear=all>
        			Kompetenzen:<br><br>
        			<em>Tätigkeitsfeld II (Chemische/biologische Produktionsverfahren vorbereiten/planen, durchführen und optimieren)</em><br>
        			<div style="font-size:80%">Das Tätigkeitsfeld beinhaltet Kompetenzen, die für die erfolgreiche Planung, Durchführung, Optimierung und Dokumentation chemischer/biologischer Produktionsverfahren vorhanden sein sollten.</div>
        			<div style="font-size:80%; text-align:right">Kompetenzniveau (gemäß DQR): 4<br>
        			Er/Sie ist in der Lage  kompetenzbezogene Aufgabenstellungen im Rahmen der Vorbereitung/Planung, Durchführung und Optimierung von chemischer/biologischer Produktionsverfahren (bspw. Feststoffe zu zerkleinern und klassieren)  auch unter sich verändernden und nicht eindeutigen Rahmenbedingungen selbständig zu planen, zu bearbeiten, ggf. hierbei auftretende Probleme zu lösen sowie Arbeitsergebnisse unter Beachtung von Wechselwirkungen zu beurteilen.     
        			</div>
        			<hr>
        END;
        		$html .= $this->getKompetenzHtml("II.1", "Kann betriebsübliche verfahrenstechnische mechanische Grundoperationen durchführen");
        		$html .= $this->getKompetenzHtml("II.2", "Kann betriebsübliche verfahrenstechnische thermische Grundoperationen durchführen");
        		$html .= "<br clear=all><br><em>Tätigkeitsfeld III</em><hr>";
        		$html .= $this->getKompetenzHtml("III.1", "Kann betriebsübliche Arbeitsmitteln (z.B. Fördersysteme, Werkstoffe, Anlagenteile und Geräte usw.) handhaben, pflegen, instandhalten sowie  funktionell relevante Faktoren (z.B. Korrosion, Verschleiß usw.) beurteilen");
        		$html .= $this->getKompetenzHtml("III.2", "Kann Installationstechnische Arbeiten (z.B. Rohre und Rohrleitungsteile verbinden und abdichten) planen und durchführen");
        		$html .="<br clear=all></div>";
        		$jobBox->setContent($html);
        		$jobBox->setContentMoreLink(PATH_URL . "portfolio/");
        		$content->setCurrentBlock("PORTFOLIO_BOX");
        		$content->setVariable("PORTFOLIO_CONTENT", $jobBox->getHtml());
        		$content->parse("PORTFOLIO_BOX");
        		$rawHtml->addWidget($jobBox);*/
        // Studium
        $studyBox = \Portfolio\Model\EntryAcademic::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $studyBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($studyBox);
        // Zertifikate
        $certBox = \Portfolio\Model\EntryCertificate::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $certBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($certBox);
        // Berufserfahrung
        $practiceBox = \Portfolio\Model\EntryEmployment::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $practiceBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($practiceBox);
        /*		$practiceBox = new \Widgets\Box();
        		$practiceBox->setId(\PortfolioHome::getInstance()->getId());
        		$practiceBox->setTitle(\Portfolio::getInstance()->getText("Berufliche Erfahrungen"));
        		$practiceBox->setTitleLink(PATH_URL . "portfolio/");
        		$html = <<<END
        		<div style="text-align: center; color: gray; font-size: 80%">
        			Hier können relevante Informationen zu den beruflichen Erfahrungen (Art der Erfahrung) hinterlegt, erläutert und belegt werden.
        		</div>
        		<br>
        		<div style="border: 3px dotted lightblue; padding: 5px; background-color: #ffe">
        			Art: <em>Praktikum oder Beschäftigung</em> <br>
        			Betrieb: <em>Bayer</em> <br>
        			Dauer: <em>2 Jahr</em> <br>
        			Position: <em>Chemikant</em><br>
        			Bemerkung: <em>Schwerpunkt Anlagen</em>
        			<br clear=all>
        			<div style="float: right; display: inline">
        				<a href="">Eintrag bearbeiten</a> |
        				<a href="">Beleg anfügen</a> 
        			</div>
        			<br clear=all>
        			Kompetenzen:<br><br>
        			<em>Tätigkeitsfeld II (Chemische/biologische Produktionsverfahren vorbereiten/planen, durchführen und optimieren)</em><br>
        			<div style="font-size:80%">Das Tätigkeitsfeld beinhaltet Kompetenzen, die für die erfolgreiche Planung, Durchführung, Optimierung und Dokumentation chemischer/biologischer Produktionsverfahren vorhanden sein sollten.</div>
        			<div style="font-size:80%; text-align:right">Kompetenzniveau (gemäß DQR): 4<br>
        			Er/Sie ist in der Lage  kompetenzbezogene Aufgabenstellungen im Rahmen der Vorbereitung/Planung, Durchführung und Optimierung von chemischer/biologischer Produktionsverfahren (bspw. Feststoffe zu zerkleinern und klassieren)  auch unter sich verändernden und nicht eindeutigen Rahmenbedingungen selbständig zu planen, zu bearbeiten, ggf. hierbei auftretende Probleme zu lösen sowie Arbeitsergebnisse unter Beachtung von Wechselwirkungen zu beurteilen.     
        			</div>
        			<hr>
        END;
        		$html .= $this->getKompetenzHtml("II.1<br><div style=\"font-size:60%\">Chemikant</div>", "Kann betriebsübliche verfahrenstechnische mechanische Grundoperationen durchführen");
        		$html .="<br clear=all>
        		<div style=\"float: right; display: inline\">
        				<a href=\"\">Kompetenzen verwalten</a> 
        		</div>
        		<br clear=all>
        		</div>";
        		$practiceBox->setContent($html);
        		$practiceBox->setContentMoreLink(PATH_URL . "portfolio/");
        		$content->setCurrentBlock("PORTFOLIO_BOX");
        		$content->setVariable("PORTFOLIO_CONTENT", $practiceBox->getHtml());
        		$content->parse("PORTFOLIO_BOX");
        		$rawHtml->addWidget($practiceBox);*/
        // Sonstige
        $otherBox = \Portfolio\Model\EntryOther::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $otherBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($otherBox);
        $frameResponseObject->setTitle("Kompetenzportfolio");
        $frameResponseObject->addWidget($breadcrumb);
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => "Bildungsbiographie", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Kompetenzübersicht", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Diskussionen", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Kompetenzmodell", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Import der Belege", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Export der Belege", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Drucken", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => "1"), "requestType" => "popup")))));
        $frameResponseObject->addWidget($actionBar);
        $rawHtml->setHtml($content->get());
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 19
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Portfolio/"), "link" => $this->getExtension()->getExtensionUrl() . "Myportfolio/"), array("name" => \Portfolio::getInstance()->getText("My Friends and Groups"))));
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("Search"), "link" => $this->getExtension()->getExtensionUrl() . "Searchgroups/"), array("name" => \Portfolio::getInstance()->getText("Create New"), "link" => $this->getExtension()->getExtensionUrl() . "Creategroups/")));
        $menu = new \Widgets\DropdownBox();
        $menu->setLabel(\Portfolio::getInstance()->getText("Type Of Group"));
        $menu->addOption(\Portfolio::getInstance()->getText("All Groups"));
        $menu->addOption(\Portfolio::getInstance()->getText("Groups Made by me"));
        $menu->addOption(\Portfolio::getInstance()->getText("Groups i am Connected"));
        $boxGroup = new \Widgets\PortfolioViewBox();
        $boxGroup->setTitle(\Portfolio::getInstance()->getText("Group One"));
        $boxGroup->setContent(" Shows the details about the group.number of members connected,etc.");
        $boxGroup->setButtons(array(array("name" => "Dlete Group", "link" => "#")));
        $clearer = new \Widgets\Clearer();
        $boxGroup2 = new \Widgets\PortfolioViewBox();
        $boxGroup2->setTitle(\Portfolio::getInstance()->getText("Group two name"));
        $boxGroup2->setContent(" Shows the details about the group.number of members connected,etc.");
        $boxGroup2->setButtons(array(array("name" => "Dlete Group", "link" => "#")));
        $html = <<<end



<style type="text/css">

select {
    border: 1px solid #D1D1D1;
}

select {
    margin-right: 0.25em;
    padding: 0.16em;
    }
    
   .box_view {
\t\tborder: 1px solid #ccc;
\t\tmargin: 5px 10px 15px 10px;
\t\tbackground-color: #ccffcc;
\t\twidth: 85%;
\t\tpadding:10px;
\t\tfloat: left;
}

a, a:link, a:active, a:visited {
    color: #3092CE;
    text-decoration: none;
    }
</style>



<div class="headline">
\t<h1>My Friends and Groups</h1>
</div>

<div class="actionBar">
    
\t<a href="../Searchgroups/" class="button">Search</a>
\t
\t<a href="../Creategroups/" class="button">Create New</a>
\t
\t<a href="" class="button">Add Friend</a>
\t
</div>



<select tabindex="1" name="options" id="filter_options" class="select autofocus">
\t<option selected="selected" value="all">All Groups</option>
\t<option value="admin">Groups made by me</option>
\t<option value="member">Groups i am connected to </option>
\t<option value="invite">Groups I'm Invited To(shows pending group requests)</option>
</select>

<br>


<td><div class="box_view">

     <h2><a href="">Group name 1</a></h3>
     <p>Shows the details about the group.number of members connected,etc.</p>
     
     <div class="buttons">

<a class="button" ">Delete Group</a>
</div>
     
<td>
</div>
<td><div class="box_view">

     <h2><a href="">Group name 2</a></h3>
     <p>Shows the details about the group.number of members connected,etc.</p>
      
     <div class="buttons">

<a class="button" ">Delete Group</a>
</div>
     
<td>


</div>

end;
        $frameResponseObject->setTitle("Groups");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        $frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($clearer);
        $frameResponseObject->addWidget($menu);
        $frameResponseObject->addWidget($clearer);
        $frameResponseObject->addWidget($boxGroup);
        $frameResponseObject->addWidget($boxGroup2);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 20
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Profile/"), array("name" => \Portfolio::getInstance()->getText("Edit Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Editprofile/")));
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("Qualification"), "link" => $this->getExtension()->getExtensionUrl() . "Qualificationprofile/"), array("name" => \Portfolio::getInstance()->getText("Employment History"), "link" => $this->getExtension()->getExtensionUrl() . "Employmentprofile/")));
        $input = new \Widgets\TextInput();
        $grid = new \Widgets\Grid();
        $grid->setData(array("headline" => array(array("name" => \Portfolio::getInstance()->getText("Edit Information"), "colspan" => "2")), "rows" => array(array(array("content" => \Portfolio::getInstance()->getText("First Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Last Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Profession:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Email Id:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Describe Yourself:"), "type" => "label"), array("content" => $input, "type" => "value")))));
        $html = <<<end




<style type="text/css">


</style>

<div class="headline">
\t<h1>Edit Profile</h1>
</div>

<div class="actionBar">
    
\t<a href="#" class="button">Edit profile</a>
\t
\t<a href="../qualificationprofile/" class="button">Qualification icon</a>
\t
\t<a href="../employmentprofile/" class="button">Employment History</a>
\t
</div>

<ul class="tabBar">
        
    <li class="tabIn"><a href="./..">Dashboard</a></li>
        
    <li class="tabOut"><a href="../profile/">Profile</a></li>
        
    <li class="tabIn"><a href="../myportfolio/">Portfolio</a></li>
        
    <li class="tabIn"><a href="../groups/">Groups</a></li>
    
    <li style="clear: left;">
</li></ul>
<br>

<table class="grid" cellspacing="0" cellpadding="5" width="100%">

\t <tr>
\t\t\t<th class="group" colspan="2">Personal Information</th>
\t </tr>
\t <tr>
<td class="label">First name:</td>
\t<td class="value">
\t\t<input type="text" value="User_name" disabled="" size="30" >
</td>
<tr>
<td class="label">Last name:</td>
<td class="value">
<input type="text" value="Chopra" disabled="disabled" size="30" name="user_full_name">
</td>
</tr>
<tr>
<td class="label">Profession:</td>
<td class="value">
<select name="values[OBJ_DESC]">
<option value=""></option>
<option selected="selected" value="Management">Management</option>
<option value="Engineer">Engineer</option>
<option value="others">otherst</option>
</select>
</td>
</tr>
<tr>
<td class="label">Describe yourself:</td>
<td class="value">
<textarea wrap="virtual" rows="10" style="width: 95%;" name="values[USER_PROFILE_DSC]"></textarea>
<br>
<a class="textformat_button" title="boldface" href="javascript:insert('[b]', '[/b]', 'formular', 'values[USER_PROFILE_DSC]')">
<b>B</b>
</a>
<a class="textformat_button" title="italic" href="javascript:insert('[i]', '[/i]', 'formular', 'values[USER_PROFILE_DSC]')">
<i>I</i>
</a>
<a class="textformat_button" title="underline" href="javascript:insert('[u]', '[/u]', 'formular', 'values[USER_PROFILE_DSC]')">
<u>U</u>
</a>
<a class="textformat_button" title="strikethrough" style="text-decoration: line-through;" href="javascript:insert('[s]', '[/s]', 'formular', 'values[USER_PROFILE_DSC]')">S</a>
<a class="textformat_button" title="image" href="javascript:insert('[img]http://', '[/img]', 'formular', 'values[USER_PROFILE_DSC]')">IMG</a>
<a class="textformat_button" title="web link" href="javascript:insert('[url=http://]', '[/url]', 'formular', 'values[USER_PROFILE_DSC]')">URL</a>
<a class="textformat_button" title="email link" href="javascript:insert('[mail=@]', '[/mail]', 'formular', 'values[USER_PROFILE_DSC]')">MAIL</a>
</td>
</tr>
\t
\t</td>
\t</tr>
\t </table>

end;
        $frameResponseObject->setTitle("Editprofile");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        $frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($grid);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 21
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        if (!$this->artefactId) {
            print "no object id given!";
            exit;
        }
        $artefact = \Artefacts::getById($this->artefactId);
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("link" => "javascript:history.back()", "name" => "zurück")));
        $tabBar = new \Widgets\TabBar();
        $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Competences"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("Artefacts"), "link" => $this->getExtension()->getExtensionUrl() . "ManageArtefacts/"), array("name" => $artefact->getName(), "link" => "#")));
        $tabBar->setActiveTab(3);
        $competences = \CompetenceRaster::getCompetences();
        $jobs = \CompetenceRaster::getJobs();
        $facets = \CompetenceRaster::getFacets();
        $activities = \CompetenceRaster::getActivityFields();
        $html = "<br>";
        $htmlPre = "";
        $htmlPost = "";
        //		$jswrapper = new \Widgets\JSWrapper();
        $htmlPost .= <<<END
\t\t<br>
    <h1>Weitere Kompetenzen zuordnen</h1>
\tSuche: <input id="search" type="text" value="" title="Suche mit Enter-Taste bestätigen."/>
    <select id="jobs">
END;
        $htmlPost .= '<option value="undefined">Job Auswahl</option>';
        foreach ($jobs as $job) {
            $htmlPost .= '<option value="' . $job->name . '">' . $job->name . ": " . $job->description . '</option>';
        }
        $htmlPost .= "</select>";
        //		$htmlPost .= <<<END
        //
        //    </select>
        //    <select id="facets">
        //END
        //		;
        //
        //		$htmlPost .= '<option value="undefined">Facette Auswahl</option>';
        //		foreach ($facets as $facet) {
        //			$htmlPost .= '<option value="' . $facet->short . '">' . $facet->short .": ". $facet->name .  '</option>';
        //		}
        $htmlPost .= <<<END
    
    <select style="width:175px;" id="activities">
END;
        $htmlPost .= '<option value="undefined">Fertigkeiten Auswahl</option>';
        foreach ($activities as $activity) {
            $htmlPost .= '<option value="' . $activity->index . '">' . $activity->index . ": " . $activity->name . '</option>';
        }
        $htmlPost .= <<<END
    
    </select>
END;
        $htmlPre .= '<h1>Zugeordnete Kompetenzen</h1><div id="itemsChecked"><table id="checkedRows" width=100% class="grid">';
        $htmlPre .= '<tr id="headline">
				<td>Index</td>
				<td>Beschreibung</td>
				<td></td>
			</tr>';
        //				<td>Activity</td>
        //				<td>Facet</td>
        //				<td>Index</td>
        //				<td>Description</td>
        $htmlPost .= '<div id="items"><table id="uncheckedRows" width=100% class="grid">';
        $htmlPost .= '<tr id="headline">
				<td>Index</td>
				<td>Beschreibung</td>
				<td></td>
			</tr>';
        foreach ($competences as $competence) {
            $checked = key_exists($competence->short, $artefact->getCompetencesStrings()) ? " checked=\"true\"" : "";
            $tmp = "<tr short=\"{$competence->short}\" job=\"{$competence->job}\" facet=\"{$competence->facet}\" activity=\"{$competence->activity}\">\n\t\t\t\t\t\t<td>{$competence->short}</td>\n\t\t\t\t\t\t<td>{$competence->name}</td>\n\t\t\t\t\t\t<td><input value=\"{$competence->short}\" type=\"checkbox\" name=\"selected[]\"{$checked}></td>\n\t\t\t\t\t\t</tr>";
            //						<td>{$competence->job}</td>
            //						<td>{$competence->activity}</td>
            //						<td>{$competence->facet}</td>
            //						<td>{$competence->index}</td>
            //						<td>{$competence->description}</td>
            if ($checked != "") {
                $htmlPre .= $tmp;
            } else {
                $htmlPost .= $tmp;
            }
        }
        $htmlPre .= '</table>';
        $htmlPost .= '<tr id="nothing">
				<td align="center">Keine Kompetenzen gefunden welche den Kriterien entsprechen</td>
			</tr>';
        $html .= $htmlPre . $htmlPost;
        $html .= <<<END
</table>
</div>
<script type="text/javascript">
jQuery.expr[':'].Contains = function(a, i, m) { 
  return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0; 
};

\$("#items").fadeOut();

function filter(){
\t\$("#items").fadeOut();
\tactivity = \$('select[id="activities"] option:selected').val();
    job = \$('select[id="jobs"] option:selected').val();
    facet = \$('select[id="facets"] option:selected').val();
    search = \$('input[id="search"]').val();
    \$("#items").find("tr").show();
    if (job != "undefined"){
    \t\$("#items").find('tr[job!='+job+']').hide();
    \t}
    if (activity != "undefined"){
    \t\$("#items").find('tr[activity!='+activity+']').hide();
    \t}
//    if (facet != "undefined"){
//    \t\$("#items").find('tr[facet!='+facet+']').hide();
//    \t}
    if (search != ""){
    \t\$("#items").find("tr").not('tr:Contains('+search+')').hide();
    \t}
    if (\$("#items").find('tr:visible').length == 0){
    \t\$("#items").find('tr[id="nothing"]').show();
\t} else {
    \t\$("#items").find('tr[id="headline"]').show();
\t}
    
    \$("#items").fadeIn();
}

\$("input[type='text']").keyup( function(e) {
    if (e.keyCode == 13) {
\t\tfilter();
    }
});
\$('select[id="jobs"]').change(function() {
\tfilter();
});
\$('select[id="activities"]').change(function() {
\tfilter();
});
//\$('select[id="facets"]').change(function() {
//\tfilter();
//});

<!-- listener for each checkbox -->
\$(':checkbox').change(function() {
   sendRequest("UpdateCompetence", {"artefactId": "{$this->artefactId}", "competence": \$(this).val(), "checked": \$(this).prop("checked")}, "", "data");
   if (\$(this).prop("checked")){
\t   row = \$('tr[short="'+\$(this).val()+'"]').fadeOut().detach();
\t   row.appendTo(\$('#checkedRows > tbody:last')).fadeIn();
\t} else {
\t   row = \$('tr[short="'+\$(this).val()+'"]').fadeOut().detach();
\t   row.prependTo(\$('#uncheckedRows > tbody:first')).fadeIn();
   }
   
});

//<!-- for a save button -->
//var data = { 'selected[][]' : []};
//\$("#items").find(":checked").each(function() {
//  data['selected[][]'].push(\$(this).val());
//});
//sendRequest("UpdateCompetence", {"artefactid": "{$this->id}", "competence": \$(this).val(), "checked": data}, "", "data");
</script>
END;
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        //		$frameResponseObject->addWidget($jswrapper);
        $frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($tabBar);
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 22
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $rawHtml = new \Widgets\RawHtml();
     $steam = $GLOBALS["STEAM"];
     $objectId = $this->id;
     $myExtension = \Forum::getInstance();
     $forumObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $steamUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $lastSessionTime = $steamUser->get_attribute("bid:last_session_time");
     $lastSessionTime = is_array($lastSessionTime) ? intval($lastSessionTime[0]) : intval(time());
     /** check the rights of the log-in user */
     $forum_allowed_write = $forumObject->check_access(SANCTION_SANCTION, $steamUser);
     $forum_allowed_read = $forumObject->check_access_read($steamUser);
     $forum_allowed_annotate = $forumObject->check_access_annotate($steamUser);
     if (!$forum_allowed_read) {
         throw new \Exception("You have no permission to read this forum", E_USER_RIGHTS);
     }
     $forumAttributes = $forumObject->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME, "bid:description", "bid:forum_subscription"));
     $categories = $forumObject->get_annotations();
     $forumAnnotations = $categories;
     foreach ($categories as $category) {
         $id = $category->get_id();
         $categoryAttributes[$id] = $category->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME, "bid:description"), 1);
         $messages[$id] = $category->get_annotations(false, 1);
         $categoryCreator[$id] = $category->get_creator(1);
     }
     $result = $steam->buffer_flush();
     foreach ($categories as $category) {
         $id = $category->get_id();
         $messages[$id] = $result[$messages[$id]];
         $categoryMessageCount[$id] = count($messages[$id]);
         sort($messages[$id]);
         if ($categoryMessageCount[$id] > 0) {
             $categoryLastMessageAttributes[$id] = end($messages[$id])->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME), 1);
             $categoryLastMessageCreator[$id] = end($messages[$id])->get_creator(1);
         }
         $categoryAttributes[$id] = $result[$categoryAttributes[$id]];
         $categoryCreator[$id] = $result[$categoryCreator[$id]];
         $categoryCreator[$id]->get_attributes(array(OBJ_NAME), 1);
     }
     $result = $steam->buffer_flush();
     foreach ($categories as $category) {
         $id = $category->get_id();
         if ($categoryMessageCount[$id] > 0) {
             $categoryLastMessageAttributes[$id] = $result[$categoryLastMessageAttributes[$id]];
             $categoryLastMessageCreator[$id] = $result[$categoryLastMessageCreator[$id]];
             $categoryLastMessageCreator[$id]->get_attributes(array(OBJ_NAME), 1);
         }
     }
     $result = $steam->buffer_flush();
     $myExtension->addCSS();
     $content = $myExtension->loadTemplate("forumIndex.template.html");
     $content->setCurrentBlock('BLOCK_FORUM_HEAD');
     $content->setVariable("FORUM_HEADING", urldecode($forumAttributes["OBJ_NAME"]));
     $content->setVariable("FORUM_UNDERTITLE", $forumAttributes["OBJ_DESC"] !== 0 ? $forumAttributes["OBJ_DESC"] : "");
     $content->setVariable("FORUM_DESCRIPTION", $forumAttributes["bid:description"] !== 0 ? $forumAttributes["bid:description"] : "");
     $content->parse('BLOCK_FORUM_HEAD');
     // sort all forum topics
     usort($forumAnnotations, "sortTopicsByDate");
     if (count($forumAnnotations) == 0) {
         $content->setVariable("NO_CONTENT", "Dieses Forum enthält keine Themen.");
     } else {
         foreach ($forumAnnotations as $annotation) {
             $content->setCurrentBlock('BLOCK_FORUM_CONTENT');
             $content->setVariable("TOPIC", $annotation->get_attribute("OBJ_DESC"));
             $content->setVariable("TOPIC_AUTHOR", getCleanName($annotation->get_attribute("DOC_USER_MODIFIED")));
             $content->setVariable("TOPIC_DATE", getReadableDate($annotation->get_attribute("OBJ_CREATION_TIME")));
             $content->setVariable("LINK_SHOW_TOPIC", PATH_URL . "forum/showTopic/" . $objectId . "/" . $annotation->get_id());
             $count = count($annotation->get_annotations());
             $content->setVariable("REPLY_COUNT", $count);
             if ($count > 0) {
                 $content->setVariable("LAST_REPLY_TOPIC", $categoryLastMessageAttributes[$annotation->get_id()][OBJ_DESC]);
                 $content->setVariable("LAST_REPLY_DATE", date("d.m.Y G:i", $annotation->get_attribute("OBJ_LAST_CHANGED")));
                 $content->setVariable("LAST_REPLY_USER", getCleanName($annotation->get_attribute("DOC_USER_MODIFIED")));
                 $lastPostTime = $annotation->get_attribute("OBJ_CREATION_TIME");
                 if ($lastSessionTime < $lastPostTime) {
                     $imageUrl = \Forum::getInstance()->getAssetUrl() . "icons/new_message_info.gif";
                     //$content->setVariable("NEW_IMAGE", '<img src="'.$imageUrl.'" title="Neue Antworten.">');
                 }
             }
             //	$popupMenu= new \Widgets\PopupMenu();
             //	$popupMenu->setData($annotation);
             //	$popupMenu->setElementId("overlay_menu");
             //	$popupMenu->setParams(array(array("key" => "forum", "value" => $objectId)));
             //	$content->setVariable("POPUP_MENU", $popupMenu->getHtml());
             //	$rawHtml->addWidget($popupMenu);
             $content->parse('BLOCK_FORUM_CONTENT');
         }
     }
     $actionBar = new \Widgets\ActionBar();
     $actions = array();
     if ($forum_allowed_annotate) {
         $actions[] = array("name" => "Neues Thema", "ajax" => array("onclick" => array("command" => "newTopic", "params" => array("id" => $this->id), "requestType" => "popup")));
     }
     if ($forum_allowed_write) {
         $actions[] = array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "Properties", "params" => array("id" => $this->id), "requestType" => "popup", "namespace" => "explorer")));
         $actions[] = array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup", "namespace" => "explorer")));
     }
     $actionBar->setActions($actions);
     //$breadcrumb = new \Widgets\Breadcrumb();
     //$breadcrumb->setData(array($currentRoom));
     $frameResponseObject->setTitle("Forum - " . $forumAttributes["OBJ_DESC"]);
     $rawHtml->setHtml($content->get());
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 23
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $artefact = \Artefacts::getById($this->artefactId);
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("link" => "javascript:history.back()", "name" => "zurück"), array("name" => \Portfolio::getInstance()->getText("Beleg hinzufügen"), "ajax" => array("onclick" => array("command" => "UploadArtefactMessage", "params" => array("id" => $this->artefactId), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     //	$breadcrumb->setData(array(array("name"=>gettext("Manage Artefacts"))));
     //	$breadcrumb->setData(array($artefact->getRoom()));
     $breadcrumb->setData(array(array("name" => $artefact->getName())));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Competences"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("Artefacts"), "link" => $this->getExtension()->getExtensionUrl() . "ManageArtefacts/"), array("name" => $artefact->getName(), "link" => "#")));
     $tabBar->setActiveTab(3);
     $clearer = new \Widgets\Clearer();
     /*
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams(array());
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     */
     $boxTip = new \Widgets\Box();
     $boxTip->setTitle(\Portfolio::getInstance()->getText("Content of your Artefact"));
     $boxTip->setContent($artefact->getName() . "<br>" . +$artefact->getDescription());
     //		$content = "<pre>";
     $content = "";
     //		$attributes = $artefact->get_attributes();
     //		foreach ($attributes as $attribute) {
     //			$content .= $attribute . "<br>";
     //		}
     $content .= "Mime Type : " . $artefact->getMimeType() . "<br>";
     //		$content .= "</pre>";
     $boxTip->setContent($content);
     $boxInfo = new \Widgets\Box();
     $boxInfo->setTitle(\Portfolio::getInstance()->getText("Last Changes"));
     $boxInfo->setContent("TODO: Keine Änderungen vorhanden");
     $boxDownload = new \Widgets\Box();
     $boxDownload->setTitle(\Portfolio::getInstance()->getText("Download Artefact"));
     $boxDownload->setContent("<a href>TODO: Download</a>");
     $boxDiscuss = new \Widgets\PortfolioViewBox();
     $boxDiscuss->setTitle(\Portfolio::getInstance()->getText("Discuss View"));
     $boxDiscuss->setTitleLink($this->getextension()->getExtensionUrl() . "ViewChart/");
     $boxDiscuss->setContent("Discuss view shows what other have commeted about your artefacts.if needed this content  can be edited");
     $boxDiscuss->setButtons(array(array("name" => "Edit", "link" => "#"), array("name" => "Manage Acess", "link" => $this->getextension()->getExtensionUrl() . "ManageArtefacts/")));
     $boxCompetences = new \Widgets\PortfolioViewBox();
     $boxCompetences->setTitle(\Portfolio::getInstance()->getText("Competences"));
     $htmlCompetences = "";
     $competences = $artefact->getCompetences();
     foreach ($competences as $competence) {
         $htmlCompetences .= "<br>" . $competence->short . ": " . $competence->name;
     }
     $boxCompetences->setContent($htmlCompetences);
     $url = \ExtensionMaster::getInstance()->getUrlForObjectId($artefact->get_id(), "competences");
     $boxCompetences->setButtons(array(array("name" => "Set Competences", "link" => $url)));
     $frameResponseObject->setTitle("Manage Artefacts");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($boxTip);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($boxInfo);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($boxDownload);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($boxCompetences);
     $frameResponseObject->addWidget($clearer);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 24
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $workplanExtension = \Workplan::getInstance();
     $workplanExtension->addJS();
     $user = $GLOBALS["STEAM"]->get_current_steam_user();
     $portal = \lms_portal::get_instance();
     $objectID = $this->params[0];
     $workplanContainer = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectID);
     // move workplan to group workroom if form was submitted
     if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["move"])) {
         $values = $_POST["values"];
         $groupID = $values["groupid"];
         $newgroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $groupID);
         $newroom = $newgroup->get_workroom();
         $workplanContainer->set_attribute("WORKPLAN_GROUP", $groupID);
         $workplanContainer->move($newroom);
         $portal->set_confirmation("Projektplan " . $workplanContainer->get_name() . " erfolgreich in Gruppe " . $newgroup->get_name() . " verschoben.");
     }
     if (is_object($workplanContainer) && $workplanContainer instanceof \steam_room) {
         $content = $workplanExtension->loadTemplate("workplan_users.template.html");
         $content->setCurrentBlock("BLOCK_CONFIRMATION");
         $content->setVariable("CONFIRMATION_TEXT", "NONE");
         $content->parse("BLOCK_CONFIRMATION");
         $confirmationBar = new \Widgets\RawHtml();
         $confirmationBar->setHtml($content->get());
         $frameResponseObject->addWidget($confirmationBar);
         // if current user has required rights display actionbar
         if ($workplanContainer->get_creator()->get_id() == $user->get_id()) {
             $actionBar = new \Widgets\ActionBar();
             $actionBar->setActions(array(array("name" => "Mitarbeiter bearbeiten", "link" => "javascript:changeUsers(" . $objectID . ")")));
             $frameResponseObject->addWidget($actionBar);
         }
         $tabBar = new \Widgets\TabBar();
         $tabBar->setTabs(array(array("name" => "Überblick", "link" => $this->getExtension()->getExtensionUrl() . "overview/" . $objectID), array("name" => "Tabelle", "link" => $this->getExtension()->getExtensionUrl() . "listView/" . $objectID), array("name" => "Gantt-Diagramm", "link" => $this->getExtension()->getExtensionUrl() . "ganttView/" . $objectID), array("name" => "Mitarbeiter", "link" => $this->getExtension()->getExtensionUrl() . "users/" . $objectID), array("name" => "Snapshots", "link" => $this->getExtension()->getExtensionUrl() . "snapshots/" . $objectID)));
         $tabBar->setActiveTab(3);
         $frameResponseObject->addWidget($tabBar);
         $content = $workplanExtension->loadTemplate("workplan_users.template.html");
         $content->setCurrentBlock("BLOCK_USERS_LIST");
         $content->setVariable("WORKPLAN_USERS_ELEMENT_NAME", "Name");
         $content->setVariable("WORKPLAN_USERS_ELEMENT_ROLE", "Rolle");
         $content->setVariable("WORKPLAN_USERS_ELEMENT_RESSOURCE", "Ressourcenwert");
         // check if workplan is in group and save the right users in array (sorted according to their role)
         $group = 0;
         if (in_array("WORKPLAN_GROUP", $workplanContainer->get_attribute_names())) {
             $group = $workplanContainer->get_attribute("WORKPLAN_GROUP");
         }
         if ($group == 0) {
             $users = array();
             array_push($users, $workplanContainer->get_creator());
         } else {
             $groupObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $group);
             $users = array();
             $normalusers = array();
             $groupusers = $groupObject->get_members();
             array_push($users, $workplanContainer->get_creator());
             for ($count = 0; $count < count($groupusers); $count++) {
                 if ($groupusers[$count]->get_id() != $workplanContainer->get_creator()->get_id()) {
                     if (in_array("WORKPLAN_" . $groupusers[$count]->get_id() . "_LEADER", $workplanContainer->get_attribute_names())) {
                         array_push($users, $groupusers[$count]);
                     } else {
                         array_push($normalusers, $groupusers[$count]);
                     }
                 }
             }
             $users = array_merge($users, $normalusers);
         }
         // display found users sorted according to their role
         for ($count = 0; $count < count($users); $count++) {
             $content->setCurrentBlock("BLOCK_USERS_ELEMENT");
             $content->setVariable("WORKPLAN_USERS_ELEMENT_NAME_VALUE", $users[$count]->get_full_name());
             $content->setVariable("WORKPLAN_USERS_ELEMENT_RESSOURCE_VALUE", $workplanContainer->get_attribute("WORKPLAN_" . $users[$count]->get_id() . "_RESSOURCE"));
             if ($workplanContainer->get_creator()->get_id() == $users[$count]->get_id()) {
                 $content->setVariable("WORKPLAN_USERS_ELEMENT_ROLE_VALUE", "Projektersteller");
             } else {
                 if (in_array("WORKPLAN_" . $users[$count]->get_id() . "_LEADER", $workplanContainer->get_attribute_names())) {
                     $content->setVariable("WORKPLAN_USERS_ELEMENT_ROLE_VALUE", "Projektleiter");
                 } else {
                     $content->setVariable("WORKPLAN_USERS_ELEMENT_ROLE_VALUE", "Mitarbeiter");
                 }
             }
             $content->parse("BLOCK_USERS_ELEMENT");
         }
         $content->parse("BLOCK_USERS_LIST");
         // if workplan is private display dialog to move it to a group the current user is member in
         if ($group == 0) {
             $groups = $user->get_groups();
             $koalagroups = array();
             for ($count = 0; $count < count($groups); $count++) {
                 $currentGroup = $groups[$count];
                 if (substr($currentGroup->get_groupname(), 0, 10) == 'PrivGroups' | substr($currentGroup->get_groupname(), 0, 12) == 'PublicGroups') {
                     array_push($koalagroups, $currentGroup);
                 }
             }
             if (count($koalagroups) > 0) {
                 $content->setCurrentBlock("BLOCK_USERS_TOGROUP");
                 $content->setVariable("WORKPLAN_TOGROUP", "Verschieben in Gruppe: ");
                 $content->setVariable("GROUPCOUNT", count($koalagroups));
                 $content->setVariable("LABEL_MOVE", "Verschieben");
                 for ($count = 0; $count < count($koalagroups); $count++) {
                     $currentGroup = $koalagroups[$count];
                     $content->setCurrentBlock("BLOCK_USERS_TOGROUP_ELEMENT");
                     $content->setVariable("GROUPID", $currentGroup->get_id());
                     $content->setVariable("GROUPNAME", $currentGroup->get_name());
                     $content->parse("BLOCK_USERS_TOGROUP_ELEMENT");
                 }
                 $content->parse("BLOCK_USERS_TOGROUP");
             }
         }
         $rawWidget = new \Widgets\RawHtml();
         $rawWidget->setHtml($content->get());
         $frameResponseObject->setTitle("Projektplan: " . $workplanContainer->get_name());
         $frameResponseObject->setHeadline(array(array("link" => $this->getExtension()->getExtensionUrl(), "name" => "Projektplanverwaltung"), array("", "name" => $workplanContainer->get_name())));
         $frameResponseObject->addWidget($rawWidget);
         return $frameResponseObject;
     }
 }
Ejemplo n.º 25
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Portfolio/"), "link" => $this->getExtension()->getExtensionUrl() . "Myportfolio/"), array("name" => \Portfolio::getInstance()->getText("Profile"))));
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("Edit Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Editprofile/"), array("name" => \Portfolio::getInstance()->getText("Qualification"), "link" => $this->getExtension()->getExtensionUrl() . "Qualificationprofile/"), array("name" => \Portfolio::getInstance()->getText("Employment History"), "link" => $this->getExtension()->getExtensionUrl() . "Employmentprofile/")));
        $captionImage = new \Widgets\CaptionImage();
        $captionImage->setLink(PATH_URL . "user/index/" . \lms_steam::get_current_user()->get_name() . "/");
        $captionImage->setLinkText(\Portfolio::getInstance()->getText("To your profile"));
        $captionImage->setImageSrc(\lms_user::get_user_image_url(140, 185));
        $captionImage->setImageAlt(\Portfolio::getInstance()->getText("Profile Image"));
        $captionImage->setImageTitle(\Portfolio::getInstance()->getText("Complete your Profile"));
        $input = new \Widgets\TextInput();
        $grid = new \Widgets\Grid();
        $grid->setData(array("headline" => array(array("name" => \Portfolio::getInstance()->getText("Personal Information"), "colspan" => "2")), "rows" => array(array(array("content" => \Portfolio::getInstance()->getText("First Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Last Name:"), "type" => "label"), array("content" => "l.name", "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Email Id:"), "type" => "label"), array("content" => "email", "type" => "value"), array(array("content" => \Portfolio::getInstance()->getText("Address:"), "type" => "label"), array("content" => "Address", "type" => "value"))))));
        $html = <<<end
<style type="text/css">


</style>

<div class="headline">
\t<h1>My Profile</h1>
</div>

<div class="actionBar">
    
\t<a href="../Editprofile/"class="button">Edit profile</a>
\t
\t<a href="../Qualificationprofile/" class="button">Qualification icon</a>
\t
\t<a href="../Employmentprofile/" class="button">Employment History</a>
\t
</div>



<tbody>
 <tr>
    <td class="info" width="155" valign="top">
       <table style="width: 146px; height: 191px; background-color: rgb(238, 238, 238); margin-bottom: 3px;">
       </table>
<tbody>
<tr>
<td>
<img class="border" alt=" Ashish Chopra" type=usericon&width=140&height=185">
</td>
</tr>

</tbody>

<table cellspacing="0" cellpadding="5" width="100%" class="grid">
\t<tr>
\t\t<th class="group" colspan="2">Personal Information</th>
\t</tr>
\t<tr>
\t\t<td class="label">First Name:</td>
\t\t<td class="value">f.name</td>
\t</tr>
\t<tr>
\t\t<td class="label">Last Name:</td>
\t\t<td class="value">L.name</td>
\t</tr>\t
\t<tr>
\t\t<td class="label">Email Id:</td>
\t\t<td class="value">Email address</td>
\t</tr>
\t<tr>
\t\t<td class="label">Contact Details:</td>
\t\t<td class="value">Number and Address</td>
\t</tr>
\t<tr>
\t\t<td class="label">Introduction:</td>
\t
\t</tr>
 </table>
 
 

</div>
end;
        $frameResponseObject->setTitle("Profile");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        $frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($captionImage);
        $frameResponseObject->addWidget($grid);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 26
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Portfolio/"), "link" => $this->getExtension()->getExtensionUrl() . "Myportfolio/"), array("name" => gettext("My Friends and Groups/"), "link" => $this->getExtension()->getExtensionUrl() . "Groups/"), array("name" => gettext("Create Group"))));
        $tabBar = new \Widgets\TabBar();
        $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => gettext("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "myportfolio/"), array("name" => gettext("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
        $menu = new \Widgets\DropdownBox();
        $menu->setLabel(\Portfolio::getInstance()->getText("Group Category"));
        $menu->addOption(\Portfolio::getInstance()->getText("Educational"));
        $menu->addOption(\Portfolio::getInstance()->getTex("Office"));
        $menu->addOption(\Portfolio::getInstance()->getText(" Hobbies"));
        $input = new \Widgets\TextInput();
        $grid = new \Widgets\Grid();
        $grid->setData(array("headline" => array(array("name" => \Portfolio::getInstance()->getText("Group Dscription"), "colspan" => "2")), "rows" => array(array(array("content" => \Portfolio::getInstance()->getText("Group Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Group Details:"), "type" => "label"), array("content" => $input, "type" => "value")))));
        $actionBar2 = new \Widgets\ActionBar();
        $actionBar2->setActions(array(array("name" => \Portfolio::getInstance()->getText("Save"), "link" => $this->getExtension()->getExtensionUrl() . ""), array("name" => gettext("Cancel"), "link" => $this->getExtension()->getExtensionUrl() . "")));
        $html = <<<end




<style type="text/css">


</style>

<div class="headline">
\t<h1>Create New Group</h1>
</div>



<ul class="tabBar">
        
    <li class="tabIn"><a href="./..">Dashboard</a></li>
        
    <li class="tabIn"><a href="../profile/">Profile</a></li>
        
    <li class="tabIn"><a href="../myPortfolio/">Portfolio</a></li>
        
    <li class="tabOut"><a href="../groups/">Groups</a></li>
    
    <li style="clear: left;">
</li></ul>
<br>

<table class="grid" cellspacing="0" cellpadding="5" width="100%">

\t <tr>
\t\t\t<th class="group" colspan="2">Group Details</th>
\t </tr>
\t <tr>
<td class="label">Group name:</td>
\t<td class="value">
\t\t<input type="text" "size="30" >
</td>
<tr>
<td class="label">Group Type:</td>
<td class="value">
<select name="values[OBJ_DESC]">
<option value=""></option>
<option selected="selected" value="Educational">Educational</option>
<option value="Professional">Profesional</option>
<option value="General">General</option>
</select>
</td>
</tr>
<td class="label">Group Description:</td>
<td class="value">
<textarea wrap="virtual" rows="10" style="width: 70%;" name="values[USER_PROFILE_DSC]"></textarea>
<br>
<a class="textformat_button" title="boldface" href="javascript:insert('[b]', '[/b]', 'formular', 'values[USER_PROFILE_DSC]')">
<b>B</b>
</a>
<a class="textformat_button" title="italic" href="javascript:insert('[i]', '[/i]', 'formular', 'values[USER_PROFILE_DSC]')">
<i>I</i>
</a>
<a class="textformat_button" title="underline" href="javascript:insert('[u]', '[/u]', 'formular', 'values[USER_PROFILE_DSC]')">
<u>U</u>
</a>
<a class="textformat_button" title="strikethrough" style="text-decoration: line-through;" href="javascript:insert('[s]', '[/s]', 'formular', 'values[USER_PROFILE_DSC]')">S</a>
<a class="textformat_button" title="image" href="javascript:insert('[img]http://', '[/img]', 'formular', 'values[USER_PROFILE_DSC]')">IMG</a>
<a class="textformat_button" title="web link" href="javascript:insert('[url=http://]', '[/url]', 'formular', 'values[USER_PROFILE_DSC]')">URL</a>
<a class="textformat_button" title="email link" href="javascript:insert('[mail=@]', '[/mail]', 'formular', 'values[USER_PROFILE_DSC]')">MAIL</a>
</td>
</tr>
\t </table>
\t <div class="buttons">
<a class="button">Save</a>
</div>
\t

end;
        $frameResponseObject->setTitle("Creategroup");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        //$frameResponseObject->addWidget($tabBar);
        $frameResponseObject->addWidget($menu);
        $frameResponseObject->addWidget($grid);
        $frameResponseObject->addWidget($actionBar2);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 27
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_document) {
             $mimetype = $object->get_attribute(DOC_MIME_TYPE);
             $objName = $object->get_name();
             $objDesc = trim($object->get_attribute(OBJ_DESC));
             if ($objDesc === 0 || $objDesc === "") {
                 $name = $objName;
             } else {
                 $name = $objDesc . " (" . $objName . ")";
             }
             $actionBar = new \Widgets\ActionBar();
             if ($mimetype == "text/html") {
                 $actionBar->setActions(array(array("name" => "Anzeigen", "link" => PATH_URL . "Explorer/ViewDocument/" . $this->id . "/"), array("name" => "Quelltext", "link" => PATH_URL . "Explorer/CodeEditDocument/" . $this->id . "/"), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
             } else {
                 $actionBar->setActions(array(array("name" => "Anzeigen", "link" => PATH_URL . "Explorer/ViewDocument/" . $this->id . "/"), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
             }
             $contentText = new \Widgets\Textarea();
             $contentText->setWidth(945);
             $contentText->setheight(400);
             $contentText->setData($object);
             $contentText->setTextareaClass("mce-full");
             if ($mimetype !== "text/html") {
                 $contentText->setTextareaClass("plain");
             }
             $html = cleanHTML($object->get_content());
             $dirname = dirname($object->get_path()) . "/";
             preg_match_all('/src="([%a-z0-9.\\-_\\/]*)"/iU', $html, $matches);
             $orig_matches = $matches[0];
             $path_matches = $matches[1];
             foreach ($path_matches as $key => $path) {
                 $path = urldecode($path);
                 if (parse_url($path, PHP_URL_SCHEME) != null) {
                     continue;
                 }
                 $ref_object = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $dirname . $path);
                 if ($ref_object instanceof \steam_object) {
                     $new_path = PATH_URL . "Download/Document/" . $ref_object->get_id();
                 } else {
                     $new_path = PATH_URL . "styles/standard/images/404.jpg";
                 }
                 $html = str_replace($orig_matches[$key], "src=\"{$new_path}\" data-mce-src=\"{$path}\"", $html);
             }
             $contentText->setContentProvider(\Widgets\DataProvider::contentProvider($html));
             $clearer = new \Widgets\Clearer();
             // 				$html = "";
             // 				if ($mimetype == "image/png" || $mimetype == "image/jpeg" || $mimetype == "image/gif") {  // Image
             // 					$html = "<div style=\"text-align:center\"><img style=\"max-width:100%\" title=\"{$name}\" alt=\"Bild: {$name}\" src=\"" . PATH_URL . "Download/Document/" . $this->id . "/\"></div>";
             // 				} else if ($mimetype == "text/html") {
             // 					$html = strip_tags($object->get_content(),"<h1><h2><h3><h4><h5><p><a><div><style><b><i><strong><img>");
             // 				} else if (strstr($mimetype, "text")) {
             // 					$html = "<pre>{$object->get_content()}</pre>";
             // 				} else {
             // 					header("location: " . PATH_URL . "Download/Document/" . $this->id . "/");
             // 				}
             // 				$rawHtml = new \Widgets\RawHtml();
             // 				$rawHtml->setHtml($html);
             //$rawHtml->addWidget($breadcrumb);
             //$rawHtml->addWidget($environment);
             //$rawHtml->addWidget($loader);
             $frameResponseObject->setTitle($name);
             $frameResponseObject->addWidget($actionBar);
             //$frameResponseObject->addWidget($rawHtml);
             $frameResponseObject->addWidget($contentText);
             $frameResponseObject->addWidget($clearer);
             return $frameResponseObject;
         }
     } else {
         ExtensionMaster::getInstance()->send404Error();
     }
 }
Ejemplo n.º 28
0
 public function execute(\FrameResponseObject $frameResponseObject)
 {
     $steam = $GLOBALS["STEAM"];
     $steamUser = \lms_steam::get_current_user();
     $buddies = $steamUser->get_buddies();
     $buddies_user = array();
     $buddies_group = array();
     $buddies_user_name = array();
     $buddies_group_name = array();
     foreach ($buddies as $buddy) {
         $id = $buddy->get_id();
         if ($buddy instanceof \steam_user) {
             $buddies_user[$id] = $buddy;
             $buddies_user_name[$id] = $buddy->get_name();
         } else {
             if ($buddy instanceof \steam_group) {
                 $buddies_group[$id] = $buddy;
                 $buddies_group_name[$id] = $buddy->get_groupname();
             }
         }
     }
     foreach ($buddies_user_name as $id => $val) {
         $buddies_user_name[$id] = $buddies_user_name[$id];
     }
     foreach ($buddies_group_name as $id => $val) {
         $buddies_group_name[$id] = $buddies_group_name[$id];
     }
     // sort favourites
     natcasesort($buddies_user_name);
     natcasesort($buddies_group_name);
     //Setze Template...
     $content = \Favorite::getInstance()->loadTemplate("display_buddy.html");
     //$content->setVariable("BUDDYS", gettext("User"));
     $content->setVariable("BUDDYS", "Benutzer");
     $loopCount = 0;
     foreach ($buddies_user_name as $id => $buddy) {
         $content->setCurrentBlock("BLOCK_BUDDY_LIST");
         $user = \steam_factory::get_object($steam->get_id(), $id);
         $picId = $user->get_attribute("OBJ_ICON")->get_id();
         $content->setVariable("BUDDY_PIC_LINK", PATH_URL . "download/image/" . $picId . "/60/60");
         $content->setVariable("BUDDY_NAME1", $user->get_attribute("USER_FIRSTNAME") . " " . $user->get_attribute("USER_FULLNAME"));
         $content->setVariable("BUDDY_NAME", PATH_URL . "profile/index/" . $buddy . "/");
         //$content->setVariable("DELETE_BUDDY", gettext("Delete Favorite"));
         $content->setVariable("DELETE_BUDDY", "Favorit löschen");
         $content->setVariable("DELETE_BUDDY_LINK", PATH_URL . "favorite/delete/" . $id . "/");
         $content->parse("BLOCK_BUDDY_LIST");
         $loopCount += 1;
     }
     if ($loopCount == 0) {
         //$content->setVariable("NO_BUDDYS", gettext("You don't have buddys"));
         $content->setVariable("NO_BUDDYS", "Es wurde kein Benutzer der Favoritenliste hinzugefügt");
     }
     //$content->setVariable("GROUPS", gettext("Groups"));
     $content->setVariable("GROUPS", "Gruppen");
     $loopCount = 0;
     foreach ($buddies_group_name as $id => $buddy) {
         $group = \steam_factory::get_object($steam->get_id(), $id);
         $groupDesc = $group->get_attribute("OBJ_DESC");
         $content->setCurrentBlock("BLOCK_GROUP_LIST");
         $content->setVariable("GROUP_NAME", $buddy);
         $content->setVariable("GROUP_DESC", $groupDesc);
         //$content->setVariable("DELETE_GROUP", gettext("Delete Favorite"));
         $content->setVariable("DELETE_GROUP", "Favorit löschen");
         $content->setVariable("DELETE_GROUP_LINK", PATH_URL . "favorite/delete/" . $id . "/");
         $content->parse("BLOCK_GROUP_LIST");
         $loopCount += 1;
     }
     if ($loopCount == 0) {
         //$content->setVariable("NO_GROUPS", gettext("You are not a member of a group"));
         $content->setVariable("NO_GROUPS", "Es wurde keine Gruppe der Favoritenliste hinzugefügt");
     }
     $headline = new \Widgets\Breadcrumb();
     //$headline->setData(array(array("name"=>gettext("Profile"), "link"=>PATH_URL."profile/index/"),array("name"=>" / ".gettext("Favorites"))));
     $headline->setData(array(array("name" => "Profil", "link" => PATH_URL . "profile/index/"), array("name" => "Favoriten")));
     $actionBar = new \Widgets\ActionBar();
     //$actionBar->setActions(array(array("name"=>gettext("Search and add favorites"),"link"=> $this->getExtension()->getExtensionUrl()."search/")));
     $actionBar->setActions(array(array("name" => "Favoriten suchen und hinzufügen", "link" => $this->getExtension()->getExtensionUrl() . "search/")));
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($content->get());
     $frameResponseObject->addWidget($headline);
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Ejemplo n.º 29
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Profile/"), array("name" => \Portfolio::getInstance()->getText("Edit Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Editprofile/"), array("name" => \Portfolio::getInstance()->getText("Add Employment experiance"))));
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("Edit Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Editprofile/"), array("name" => \Portfolio::getInstance()->getText("Qualification"), "link" => $this->getExtension()->getExtensionUrl() . "Qualificationprofile/"), array("name" => \Portfolio::getInstance()->getText("Employment History"), "link" => $this->getExtension()->getExtensionUrl() . "Employmentprofile/")));
        $input = new \Widgets\TextInput();
        $grid = new \Widgets\Grid();
        $grid->setData(array("headline" => array(array("name" => \Portfolio::getInstance()->getText("Employment  History"), "colspan" => "2")), "rows" => array(array(array("content" => \Portfolio::getInstance()->getText("Date Of Joining:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Till Date:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Organization Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Job Profile:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Work Details:"), "type" => "label"), array("content" => $input, "type" => "value")))));
        $actionBar2 = new \Widgets\ActionBar();
        $actionBar2->setActions(array(array("name" => \Portfolio::getInstance()->getText("Add More"), "link" => $this->getExtension()->getExtensionUrl() . ""), array("name" => \Portfolio::getInstance()->getText("Save"), "link" => $this->getExtension()->getExtensionUrl() . "")));
        $html = <<<end
<style type="text/css">

</style>

<div class="headline">
\t<h1>Add Working Experiance</h1>
</div>

<div class="actionBar">
    
\t<a href="../Editprofile/"class="button">Edit profile</a>
\t
\t<a href="../qualificationprofile/" class="button">Qualification icon</a>
\t
\t<a href="#" class="button">Employment History</a>
\t
</div>

<ul class="tabBar">
        
    <li class="tabIn"><a href="./..">Dashboard</a></li>
        
    <li class="tabOut"><a href="../profile/"">Profile</a></li>
        
    <li class="tabIn"><a href="../myportfolio/">Portfolio</a></li>
        
    <li class="tabIn"><a href="../groups/">Groups</a></li>
    
    <li style="clear: left;">
</li></ul>
<br>

<table class="grid" cellspacing="0" cellpadding="5" width="100%">

\t 
\t <tr>
<td class="label">Date of joining:</td>
\t<td class="value">
\t\t<input type="text" value="date of joining the job" " size="30" >
</td>
</tr>
<tr>
<td class="label">Till Date:</td>
<td class="value">
<input type="text" value="till when u worked in the job" "size="30" name="user_full_name">
</td>
</tr>
<tr>
<td class="label">Company Name:</td>
<td class="value">
\t\t<input type="text" value="Name of the organization"" size="30" >
</td>
</tr>

<tr>
<td class="label">Job Profile :</td>
<td class="value">
\t\t<input type="text" value=""" size="30" >
</td>
</tr>
<td class="label">Job Details:</td>
<td class="value">
<textarea wrap="virtual" rows="10" style="width: 70%;" name="values[USER_qualification_DSC]"></textarea>
<br>
<a class="textformat_button" title="boldface" href="javascript:insert('[b]', '[/b]', 'formular', 'values[USER_PROFILE_DSC]')">
<b>B</b>
</a>
<a class="textformat_button" title="italic" href="javascript:insert('[i]', '[/i]', 'formular', 'values[USER_PROFILE_DSC]')">
<i>I</i>
</a>
<a class="textformat_button" title="underline" href="javascript:insert('[u]', '[/u]', 'formular', 'values[USER_PROFILE_DSC]')">
<u>U</u>
</a>
<a class="textformat_button" title="strikethrough" style="text-decoration: line-through;" href="javascript:insert('[s]', '[/s]', 'formular', 'values[USER_PROFILE_DSC]')">S</a>
<a class="textformat_button" title="image" href="javascript:insert('[img]http://', '[/img]', 'formular', 'values[USER_PROFILE_DSC]')">IMG</a>
<a class="textformat_button" title="web link" href="javascript:insert('[url=http://]', '[/url]', 'formular', 'values[USER_PROFILE_DSC]')">URL</a>
<a class="textformat_button" title="email link" href="javascript:insert('[mail=@]', '[/mail]', 'formular', 'values[USER_PROFILE_DSC]')">MAIL</a>
</td>
</tr>
\t
\t</td>
\t</tr>
\t </table><div class="buttons">
<a class="button">Save</a>
</div>
\t <br>
\t <div class="buttons">
<a class="button">Add More</a>
</div>



\t

end;
        $frameResponseObject->setTitle("employmentprofile");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        //$frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($grid);
        $frameResponseObject->addWidget($actionBar2);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Ejemplo n.º 30
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_exit) {
             $object = $object->get_exit();
             $this->id = $object->get_id();
         }
     } else {
         $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
         $object = $currentUser->get_workroom();
         $this->id = $object->get_id();
     }
     if (!$object instanceof \steam_object) {
         \ExtensionMaster::getInstance()->send404Error();
         die;
     }
     $objectModel = \AbstractObjectModel::getObjectModel($object);
     if ($object && $object instanceof \steam_container) {
         $count = $object->count_inventory();
         if ($count > 150) {
             die("Es befinden sich {$count} Objekte im diesem Ordner. Das Laden ist nicht möglich.");
         }
         $objects = $object->get_inventory();
     } else {
         $objects = array();
     }
     $objectType = getObjectType($object);
     switch ($objectType) {
         case "document":
             header("location: " . PATH_URL . "explorer/ViewDocument/" . $this->id . "/");
             die;
             break;
         case "forum":
             header("location: " . PATH_URL . "forum/Index/" . $this->id . "/");
             die;
             break;
         case "referenceFolder":
             $exitObject = $object->get_exit();
             header("location: " . PATH_URL . "explorer/Index/" . $exitObject->get_id() . "/");
             die;
             break;
         case "referenceFile":
             $linkObject = $object->get_link_object();
             header("location: " . PATH_URL . "explorer/Index/" . $linkObject->get_id() . "/");
             die;
             break;
         case "user":
             header("location: " . PATH_URL . "user/Index/" . $object->get_name() . "/");
             die;
             break;
         case "group":
             \ExtensionMaster::getInstance()->send404Error();
             die;
             break;
         case "trashbin":
             \ExtensionMaster::getInstance()->send404Error();
             die;
             break;
         case "portal_old":
             $rawHtml = new \Widgets\RawHtml();
             //$rawHtml->setHtml("Dies ist ein \"altes\" Portal und kann nicht mehr angezeigt werden. Bitte umwandeln.");
             $frameResponseObject->addWidget($rawHtml);
             $frameResponseObject->setProblemDescription("Dies ist ein \"altes\" Portal und kann nicht mehr angezeigt werden.");
             $frameResponseObject->setProblemSolution("Bitte umwandeln.");
             return $frameResponseObject;
             break;
         case "gallery":
             header("location: " . PATH_URL . "gallery/Index/" . $this->id . "/");
             die;
             break;
         case "portal":
             header("location: " . PATH_URL . "portal/Index/" . $this->id . "/");
             die;
             break;
         case "portalColumn":
             \ExtensionMaster::getInstance()->send404Error();
             die;
             break;
         case "portalPortlet":
             \ExtensionMaster::getInstance()->send404Error();
             die;
             break;
         case "userHome":
             //ok
             break;
         case "groupWorkroom":
             //ok
             break;
         case "room":
             //ok
             break;
         case "container":
             //ok
             break;
         case "unknown":
             \ExtensionMaster::getInstance()->send404Error();
             die;
             break;
     }
     $title = getCleanName($object);
     $parent = $object->get_environment();
     if ($parent instanceof \steam_container) {
         //$parentLink = array("name"=>"nach oben", "link"=>PATH_URL . "explorer/Index/" . $parent->get_id() . "/");
         $parentLink = "";
     } else {
         $parentLink = "";
     }
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array($parentLink, array("name" => "<img src=\"" . PATH_URL . "explorer/asset/icons/mimetype/" . deriveIcon($object) . "\"></img> " . $title . " " . \Explorer\Model\Sanction::getMarkerHtml($object, false))));
     $this->getExtension()->addJS();
     $this->getExtension()->addCSS();
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Neu", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
     //$actionBar->setActions(array(array("name"=>"Neu", "ajax"=>array("onclick"=>array("command"=>"newelement"))), array("name"=>"Eigenschaften", "link"=>PATH_URL."explorer/properties/"), array("name"=>"Rechte", "link"=>PATH_URL."explorer/rights/")));
     $presentation = $object->get_attribute("bid:presentation");
     $preHtml = "";
     if ($presentation === "head") {
         $objects = $object->get_inventory();
         if (count($objects) > 0) {
             $first = $objects[0];
             $mimetype = $first->get_attribute(DOC_MIME_TYPE);
             if ($mimetype == "image/png" || $mimetype == "image/jpeg" || $mimetype == "image/gif") {
                 // Image
                 $preHtml = "<div style=\"text-align:center\"><img style=\"max-width:100%\" src=\"" . PATH_URL . "Download/Document/" . $first->get_id() . "/\"></div>";
             } else {
                 if ($mimetype == "text/html") {
                     $preHtml = strip_tags($first->get_content(), "<h1><h2><h3><h4><h5><p><a><div><style><b><i><strong><img><hr><table><tr><th><td><ul><ol><li>");
                 } else {
                     if (strstr($mimetype, "text")) {
                         $bidDokument = new \BidDocument($first);
                         $preHtml = $bidDokument->get_content();
                     }
                 }
             }
         }
     } else {
         if ($presentation === "index" && !(isset($_GET["view"]) && $_GET["view"] === "list")) {
             $objects = $object->get_inventory();
             if (count($objects) > 0) {
                 $first = $objects[0];
                 $url = \ExtensionMaster::getInstance()->getUrlForObjectId($first->get_id(), "view");
                 header("location: {$url}");
                 exit;
             }
         }
     }
     if ($preHtml !== "") {
         $preHtml = "<div style=\"border-bottom: 1px solid #ccc; padding-bottom:10px; margin-bottom:10px\">{$preHtml}</div>";
     }
     $environment = new \Widgets\RawHtml();
     $environment->setHtml("{$preHtml}<input type=\"hidden\" id=\"environment\" name=\"environment\" value=\"{$this->id}\">");
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("explorerWrapper");
     $loader->setMessage("Lade Dokumente ...");
     $loader->setCommand("loadContent");
     $loader->setParams(array("id" => $this->id));
     $loader->setElementId("explorerWrapper");
     $loader->setType("updater");
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml("<div id=\"explorerContent\">" . $breadcrumb->getHtml() . $environment->getHtml() . $loader->getHtml() . "</div>");
     $rawHtml->addWidget($breadcrumb);
     $rawHtml->addWidget($environment);
     $rawHtml->addWidget($loader);
     $frameResponseObject->setTitle($title);
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }