示例#1
0
 public function execute($request, $response)
 {
     $box = new \Widgets\Box();
     $box->setId(\BookmarksHome::getInstance()->getId());
     $box->setTitle("Meine Lesezeichen (noch nicht fertig)");
     $box->setTitleLink(PATH_URL . "bookmarks/");
     $underconstruction = new \Widgets\Underconstruction();
     $box->setContent($underconstruction->getHtml() . "<p><b><a href=\"#\" title=\"/Schulen/gt/Ratsgymnasium/Klasse 8b/\">Klasse 8b</a></b><br><small>[gestern zuletzt besucht]</small></p>\n\t\t\t\t\t      <p><b><a href=\"#\" title=\"/Schulen/gt/Ratsgymnasium/Klasse 8b/\" >Deutsch</a></b><br><small>[gestern zuletzt besucht]</small></p>\n\t\t\t\t\t  \t  <p><b><a href=\"#\" title=\"/Schulen/gt/Ratsgymnasium/Klasse 8b/\" >Projektwoche</a></b><br><small>[am 20.10.2010 zuletzt besucht]</small></p>\n\t\t\t\t\t      <p><b><a href=\"#\" title=\"/Schulen/gt/Ratsgymnasium/Klasse 8b/\" >Klasse 8a</a></b><br><small>[am 15.10.2010 zuletzt besucht]</small></p>\n\t\t\t\t\t\t  <p><b><a href=\"#\" title=\"/Schulen/gt/Ratsgymnasium/Klasse 8b/\" >AG Fotografie</a></b><br><small>[am 13.10.2010 zuletzt besucht]</small></p>");
     $box->setContentMore("Alle meine Lesezeichen");
     $box->setContentMoreLink(PATH_URL . "bookmarks/");
     return $box->getHtml();
 }
示例#2
0
    public function getWidget()
    {
        $box = new \Widgets\Box();
        $box->setId(\PortfolioHome::getInstance()->getId());
        $box->setTitle(\Portfolio::getInstance()->getText("Your Portfolio"));
        $box->setTitleLink(PATH_URL . "portfolio/");
        $box->setContent(<<<END
Hund
END
);
        $box->setContentMoreLink(PATH_URL . "portfolio/");
        return $box;
    }
示例#3
0
 public function getWidget()
 {
     $box = new \Widgets\Box();
     $box->setId(\BookmarksHome::getInstance()->getId());
     $box->setTitle("Meine Schule");
     $box->setTitleLink(PATH_URL . "school/");
     $box->setCustomStyle("width: 375px; height: 215px; float: left; clear: none");
     $loader = new \Widgets\DivLoader();
     $loader->setWrapperId("schoolBookmarksWrapper");
     $loader->setMessage("Lade meine Schule ...");
     $loader->setCommand("loadRecentSchoolBookmarks");
     $loader->setNamespace("School");
     $object = \School\Model\FolderSchoolBookmark::getSchoolBookmarkFolderObject();
     $loader->setParams(array("id" => $object->get_id()));
     $loader->setElementId("schoolBookmarksWrapper");
     $loader->setType("updater");
     $box->addWidget($loader);
     $box->setContent($loader->getHtml());
     $box->setContentMoreLink(PATH_URL . "school/");
     return $box;
 }
示例#4
0
 public function getWidget()
 {
     $box = new \Widgets\Box();
     $box->setId(\BookmarksHome::getInstance()->getId());
     $box->setTitle("zuletzt besuchte Ordner");
     $box->setTitleLink(PATH_URL . "explorer/");
     $loader = new \Widgets\DivLoader();
     $loader->setWrapperId("lastVisitedWrapper");
     $loader->setMessage("Lade Ordner ...");
     $loader->setCommand("loadLastVisited");
     $loader->setNamespace("Explorer");
     $loader->setParams(array("id" => $GLOBALS["STEAM"]->get_current_steam_user()->get_id()));
     $loader->setElementId("lastVisitedWrapper");
     $loader->setType("updater");
     $box->addWidget($loader);
     $box->setContent($loader->getHtml());
     $box->setContentMoreLink(PATH_URL . "explorer/");
     return $box;
 }
示例#5
0
 public function getWidget()
 {
     $box = new \Widgets\Box();
     $box->setId(\BookmarksHome::getInstance()->getId());
     $box->setTitle("Meine Dokumente");
     $box->setTitleLink(PATH_URL . "explorer/");
     $loader = new \Widgets\DivLoader();
     $loader->setWrapperId("documentsWrapper");
     $loader->setMessage("Lade Dokumente ...");
     $loader->setCommand("loadRecentDocuments");
     $loader->setNamespace("Explorer");
     $loader->setParams(array("id" => $GLOBALS["STEAM"]->get_current_steam_user()->get_workroom()->get_id()));
     $loader->setElementId("documentsWrapper");
     $loader->setType("updater");
     $box->addWidget($loader);
     $box->setContent($loader->getHtml());
     $box->setContentMoreLink(PATH_URL . "explorer/");
     return $box;
 }
示例#6
0
 public function getWidget()
 {
     $box = new \Widgets\Box();
     $box->setId(\BookmarksHome::getInstance()->getId());
     $box->setTitle("Meine Lesezeichen");
     $box->setTitleLink(PATH_URL . "bookmarks/");
     //$box->setCustomStyle("width: 375px; height: 215px; float: left;clear: none");
     $loader = new \Widgets\DivLoader();
     $loader->setWrapperId("bookmarksWrapper");
     $loader->setMessage("Lade Lesezeichen ...");
     $loader->setCommand("loadRecentBookmarks");
     $loader->setNamespace("Bookmarks");
     $loader->setParams(array("id" => $GLOBALS["STEAM"]->get_current_steam_user()->get_attribute("USER_BOOKMARKROOM")->get_id()));
     $loader->setElementId("bookmarksWrapper");
     $loader->setType("updater");
     $box->addWidget($loader);
     $box->setContent($loader->getHtml());
     $box->setContentMoreLink(PATH_URL . "bookmarks/");
     return $box;
 }
示例#7
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;
 }
示例#8
0
 public static function getViewWidget($portfolio)
 {
     $entries = $portfolio->getEntriesByClass(get_called_class());
     $addButton = new \Widgets\RawHtml();
     $addButton->setHtml("<a class=\"\" title=\"Abschluss hinzufügen\" onclick=\"sendRequest('edit', {'env':'{$portfolio->getId()}','type':'" . static::$entryType . "'}, '', 'popup', null, null);return false;\" href=\"#\">+</a>");
     $box = new \Widgets\Box();
     $box->addWidget($addButton);
     $box->setTitle("<div style=\"float:right\">" . $addButton->getHtml() . "</div>" . static::$entryTypeDescription);
     $box->setTitleLink(PATH_URL . "portfolio/");
     $html = "<div style=\"text-align: center; color: gray; font-size: 80%\">" . static::$entryTypeInfo . "</div><br>";
     $class = get_called_class();
     foreach ($entries as $entry) {
         if ($entry instanceof $class) {
             $html .= $entry->getViewHtml() . "<br>";
         }
     }
     $box->setContent($html);
     $box->setContentMoreLink(PATH_URL . "portfolio/");
     return $box;
 }
示例#9
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;
     */
 }