本文整理汇总了PHP中Portfolio::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Portfolio::getInstance方法的具体用法?PHP Portfolio::getInstance怎么用?PHP Portfolio::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Portfolio
的用法示例。
在下文中一共展示了Portfolio::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: frameResponse
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;
}
示例2: frameResponse
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;
}
示例3: frameResponse
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;
}
示例4: getWidget
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;
}
示例5: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$rawHtml = new \Widgets\RawHtml();
$boxManage = new \Widgets\PortfolioViewBox();
$boxManage->setTitle(\Portfolio::getInstance()->getText("Belege verwalten"));
$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(\Portfolio::getInstance()->getText("Kompetenzansicht"));
$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" => "#")));
//TODO
// $box = new \Widgets\Box();
// $box->addWidget($boxManage);
// $box->addWidget($boxDiscuss);
// $box->addWidget($boxcompetence);
$html = "";
$html .= <<<END
<div class="box" style="float: left; width: 316px;">
<h3>{$this->portfolio->getName()}</h3>
<br>
END;
// $html .= $box->getHtml();
$html .= $boxManage->getHtml();
// $html .= $boxDiscuss->getHtml();
$html .= $boxcompetence->getHtml();
$html .= <<<END
</div>
END;
$rawHtml->setHtml($html);
//$rawHtml->addWidget($box);
$rawHtml->addWidget($boxManage);
$rawHtml->addWidget($boxcompetence);
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($rawHtml);
return $ajaxResponseObject;
}
示例6: frameResponse
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;
}
示例7: frameResponse
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();
//.........这里部分代码省略.........
示例8: frameResponse
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;
*/
}
示例9: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("My Competences"))));
$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(1);
$frameResponseObject->addWidget($breadcrumb);
$frameResponseObject->addWidget($tabBar);
$jobs = \CompetenceRaster::getJobs();
$html = '<div align="right"><select id="jobs"><option value="all">Beruf wählen</option><option value="all">Alle</option>';
foreach ($jobs as $job) {
$html .= '<option value="' . $job->name . '">' . $job->name . ": " . $job->description . '</option>';
}
$html .= <<<END
\t\t</select></div>
\t\t<script>
\t\tfunction filter(){
\t\t\t\$(".chart").hide();
\t\t job = \$('select[id="jobs"] option:selected').val();
\t\t if (job == "all"){
\t\t\t\t\$(".chart").fadeIn();
\t\t\t}
\t \t\$("#div_" + job + "_1").fadeIn();
\t \t\$('#div_' + job ).fadeIn();
\t\t}
\t\t\$('select[id="jobs"]').change(function() {
\t\t\tfilter();
\t\t});
\t\t</script>
END;
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html);
$frameResponseObject->addWidget($rawHtml);
$arrayArtefactCompetencesCount = \CompetenceRaster::getCollectedCompetences();
foreach ($this->jobs as $job) {
// $urlEventArray = array();
// $row = 0;
$baseUrl = "/portfolio/ViewCompetence/?job=" . $job;
//
$jobObject = \CompetenceJob::getJobByName($job);
// $jsonChart = array();
// $chartWidget = new \Widgets\Chart();
// $headerActivitiesArray = array("Aktivitäten");
// foreach ($this->activities as $activity){
// $headerActivitiesArray []= "Tätigkeitsfeld " . $activity;
// }
// $jsonChart []= $headerActivitiesArray;
// foreach ($this->facets as $facet) {
// $facetArray = array($facet);
// $column = 0;
// foreach ($this->activities as $activity){
// $facetArray []= isset($arrayArtefactCompetencesCount[$job . $activity . $facet]) ? $arrayArtefactCompetencesCount[$job . $activity . $facet] : 0;
// $urlEventArray [$row][$column]= $baseUrl . "&activity=" . $column . "&facet=" . $facet . "&sc=1";
// $column++;
// }
// $jsonChart []= $facetArray;
// $row++;
// }
//
// $chartWidget->setData(json_encode($jsonChart));
// $chartWidget->setUrlData(json_encode($urlEventArray));
// $chartWidget->setDescription($job);
// $chartWidget->setVAxisTitle("Facetten");
// $chartWidget->setHAxisTitle("Anzahl");
// $chartWidget->setId($job);
// $chartWidget->setTitle($jobObject->description . " - Absolute Anzahl an Kompetenzen");
//
// $frameResponseObject->addWidget($chartWidget);
$urlEventArray = array();
$row = 0;
$arrayCompetencesQuantity = \CompetenceRaster::getCompetencesQuantity();
$jsonChart = array();
$chartWidget = new \Widgets\Chart();
$headerActivitiesArray = array("Aktivitäten");
$headerActivitiesArray[] = "IST";
$headerActivitiesArray[] = "SOLL";
$jsonChart[] = $headerActivitiesArray;
foreach ($this->activities as $activity) {
$activityArray = array($activity);
$quantityAll = isset($arrayCompetencesQuantity[$job . $activity]) ? $arrayCompetencesQuantity[$job . $activity] : 0;
$absoluteCredit = isset($arrayArtefactCompetencesCount[$job . $activity]) ? $arrayArtefactCompetencesCount[$job . $activity] : 0;
$absoluteDebit = $quantityAll - $absoluteCredit;
$percentCredit = $absoluteDebit == 0 ? 0 : round($absoluteCredit / $quantityAll * 100, 2);
$percentDebit = $absoluteDebit == 0 ? 0 : -100 + $percentCredit;
$activityArray[] = $absoluteCredit;
$activityArray[] = $absoluteDebit;
$urlEventArray[$row] = array(1 => $baseUrl . "&activity=" . $activity . "&sc=1", 2 => $baseUrl . "&activity=" . $activity . "&sc=0");
$row++;
$jsonChart[] = $activityArray;
}
$chartWidget->setData(json_encode($jsonChart));
$chartWidget->setUrlData(json_encode($urlEventArray));
$chartWidget->setDescription($job);
$chartWidget->setVAxisTitle("Tätigkeitsfelder");
$chartWidget->setHAxisTitle("Anzahl erreicht / noch zu erledigen");
$chartWidget->setId($job);
$chartWidget->setTitle($jobObject->description . " - Absolut");
$frameResponseObject->addWidget($chartWidget);
######################################
//.........这里部分代码省略.........
示例10: getFacets
public static function getFacets()
{
$path = Portfolio::getInstance()->getExtensionPath() . "classes/data/";
if (!empty(self::$facets)) {
return self::$facets;
}
$rows = array();
$row = 0;
if (($handle = fopen($path . "Kompetenzaspekte.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 0, ";")) !== FALSE) {
$rows[] = $data;
}
fclose($handle);
}
$facets = array();
for ($i = 0; $i < count($rows[0]); $i++) {
$facets[] = new CompetenceFacet($rows[4][$i], $rows[5][$i], $rows[6][$i]);
}
self::$facets = $facets;
return $facets;
}
示例11: frameResponse
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;
}
示例12: frameResponse
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);
//.........这里部分代码省略.........
示例13: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("My Competences"))));
$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(1);
$jobs = \CompetenceRaster::getJobs();
$facets = \CompetenceRaster::getFacets();
$json_chart = array();
$html = <<<END
\t <script type="text/javascript" src="https://www.google.com/jsapi"></script>
\t\t<script type="text/javascript">
\t\tgoogle.load('visualization', '1', {packages: ['corechart']});
\t\t</script>
END;
foreach ($jobs as $job) {
$name = $job->name;
$html .= <<<END
\t\t\t<script type="text/javascript">
\t\t\tfunction drawVisualization{$name}() {
END;
$data = "[['Activity', '1', '2', '3', '4', '5', '6', '7'],";
foreach ($facets as $facetObject) {
$facet = $facetObject->short;
$data .= "[\"{$facet}\", ";
for ($i = 0; $i < 7; $i++) {
$data .= count(\CompetenceRaster::getCompetences($job->name, $i, $facet)) . ",";
}
$data .= "],";
}
$data .= "]";
//var_dump($data);
$html .= <<<END
\t\t\t\t// Some raw data (not necessarily accurate)
\t\t\t\tvar data{$name} = google.visualization.arrayToDataTable({$data});
\t
\t\t\t\t// Create and draw the visualization.
\t\t\t\tvar comboChart{$name} = new google.visualization.ComboChart(document.getElementById('chart_div{$name}'));
\t\t\t\tcomboChart{$name}.draw(data{$name}, {
\t\t\t\t\ttitle : 'Kompetenzen mit Ausbildungsziel {$job->description}',
\t\t\t\t\tvAxis: {title: "Anzahl"},
\t\t\t\t\thAxis: {title: "Facetten"},
\t\t\t\t\t
\t\t\t\t\tseriesType: "bars",
\t\t\t\t\t//series: {4: {type: "line"}}
\t\t\t\t});
\t\t\t\t
\t\t\t\tgoogle.visualization.events.addListener(comboChart{$name}, 'select' , function(){
\t\t\t\t\tvar row = comboChart{$name}.getSelection()[0].row;
\t\t\t\t\tvar column = comboChart{$name}.getSelection()[0].column
\t\t\t\t\tvar url = "/portfolio/ViewCompetence/?";
\t\t\t\t\tvar activity = 1 + row; //TODO
\t\t\t\t\tswitch (row) { //TODO
\t\t\t\t\t\tcase 0:
\t\t\t\t\t\t\tfacet = "W";
\t\t\t\t\t\t\tbreak;
\t
\t\t\t\t\t\tcase 1:
\t\t\t\t\t\t\tfacet = "F";
\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t
\t\t\t\t\t\tcase 2:
\t\t\t\t\t\t\tfacet = "K";
\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t
\t\t\t\t\t\tcase 3:
\t\t\t\t\t\t\tfacet = "M";
\t\t\t\t\t\t\tbreak;
\t
\t
\t\t\t\t\t}
\t\t\t\t url = url + "job={$name}" + "&activity=" + activity + "&facet=" + facet;
\t\t\t\t window.location = url;
\t\t\t\t});
\t\t\t}
\t\t\tgoogle.setOnLoadCallback(drawVisualization{$name});
\t\t\t</script>
\t\t\t<div id="chart_div{$name}" style="width:940px; height: 400px;"></div>\t\t
END;
//break;
}
$frameResponseObject->setTitle("Discuss View");
$rawHtml = new \Widgets\RawHtml();
$frameResponseObject->addWidget($breadcrumb);
$frameResponseObject->addWidget($tabBar);
$rawHtml->setHtml($html);
$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例14: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Shared 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" => gettext("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
$tabBar->setActiveTab(2);
$clearer = new \Widgets\Clearer();
$boxSearch = new \Widgets\PortfolioViewBox();
$boxSearch->setTitle(\Portfolio::getInstance()->getText("Portfolios Shared With me "));
$boxSearch->setContent(" Shows the details about the portfolio like creator,atifacts,acess limitsetc.");
$boxSearch->setButtons(array(array("name" => "Get Connected", "link" => "#")));
$boxSimilar = new \Widgets\PortfolioViewBox();
$boxSimilar->setTitle(\Portfolio::getInstance()->getText("Portfolios I Am Sharing with others"));
$boxSimilar->setContent(" Shows the details about the portfolio like friends who can see, comments,acess limitsetc.");
$boxSimilar->setButtons(array(array("name" => "Get Connected", "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 Search Groups</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>
<h2>Find Groups</h2>
<div class="text">
<input>
</div>
<div>
<input type="submit" value="Search" name="search" class="submit">
</div>
<br>
<td><div class="box_view">
<h2><a href="">Group searched</a></h3>
<p>Shows the details about the group.number of members connected,etc.</p>
<div class="buttons">
<a class="button" ">get connected</a>
</div>
<td>
</div>
<td><div class="box_view">
<h2><a href="">similar group 1 2</a></h3>
<p>Shows the details about the group.number of members connected,etc.</p>
//.........这里部分代码省略.........
示例15: frameResponse
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(){
//.........这里部分代码省略.........