本文整理汇总了PHP中FrameResponseObject::setHeadline方法的典型用法代码示例。如果您正苦于以下问题:PHP FrameResponseObject::setHeadline方法的具体用法?PHP FrameResponseObject::setHeadline怎么用?PHP FrameResponseObject::setHeadline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameResponseObject
的用法示例。
在下文中一共展示了FrameResponseObject::setHeadline方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$rawWidget = $this->displayWorkplans();
$frameResponseObject->setTitle("Projektplanverwaltung");
$frameResponseObject->setHeadline("Projektplanverwaltung");
$frameResponseObject->addWidget($rawWidget);
return $frameResponseObject;
}
示例2: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$rapidfeedback = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$RapidfeedbackExtension = \Rapidfeedback::getInstance();
$survey = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params[1]);
$survey_object = new \Rapidfeedback\Model\Survey($rapidfeedback);
$xml = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $survey->get_path() . "/survey.xml");
$user = $GLOBALS["STEAM"]->get_current_steam_user();
$RapidfeedbackExtension->addCSS();
$RapidfeedbackExtension->addJS();
$content = $RapidfeedbackExtension->loadTemplate("rapidfeedback_results.template.html");
$content->setCurrentBlock("BLOCK_RESULTS");
$content->setVariable("RESULTS_LABEL", "Auswertung");
if ($survey->get_attribute("RAPIDFEEDBACK_RESULTS") != 1) {
$content->setVariable("RESULTS_AMOUNT", $survey->get_attribute("RAPIDFEEDBACK_RESULTS") . " Abgaben");
} else {
$content->setVariable("RESULTS_AMOUNT", $survey->get_attribute("RAPIDFEEDBACK_RESULTS") . " Abgabe");
}
$survey_object->parseXML($xml);
$survey_object->generateResults($survey);
$questions = $survey_object->getQuestions();
$question_html = '
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
</script>';
for ($count = 0; $count < count($questions); $count++) {
$question_html = $question_html . $questions[$count]->getResultHTML($count + 1);
}
$content->setVariable("QUESTIONS_HTML", $question_html);
$content->setVariable("BACK_LABEL", "Zurück");
$content->setVariable("BACK_URL", $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $this->id);
$content->parse("BLOCK_RESULTS");
$group = $rapidfeedback->get_attribute("RAPIDFEEDBACK_GROUP");
if ($group->get_name() == "learners") {
$parent = $group->get_parent_group();
$courseOrGroup = "Kurs: " . $parent->get_attribute("OBJ_DESC") . " (" . $parent->get_name() . ")";
$courseOrGroupUrl = PATH_URL . "semester/" . $parent->get_id();
} else {
$courseOrGroup = "Gruppe: " . $group->get_name();
$courseOrGroupUrl = PATH_URL . "groups/" . $group->get_id();
}
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->addWidget($rawWidget);
$frameResponseObject->setHeadline(array(array("name" => $courseOrGroup, "link" => $courseOrGroupUrl), array("name" => "Rapid Feedback", "link" => $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $rapidfeedback->get_id()), array("name" => "Auswertung")));
return $frameResponseObject;
}
示例3: getHtmlForObjectId
public function getHtmlForObjectId(\FrameResponseObject $frameResponseObject)
{
$mplme = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
if (isset($this->params[1])) {
$doc = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $mplme->get_path() . "/" . $this->params[1]);
if (isset($doc) && $doc !== 0 && $doc instanceof \steam_document) {
echo $doc->download();
//echo $doc->get_content();
} else {
echo "404";
}
die;
}
$elements = $mplme->get_inventory();
$html = "";
foreach ($elements as $element) {
if ($element->get_name() == "data.xml") {
$xmlContent = $element->get_content();
//$html .= "<b>".$element->get_name()."</b><br><pre>". htmlentities($element->get_content()) . "</pre><br>";
} else {
if ($element->get_name() == "web_table.xsl") {
$xslContent = $element->get_content();
//$html .= "<b>".$element->get_name()."</b><br><pre>". htmlentities($element->get_content()) . "</pre><br>";
} else {
//$html .= "<b>".$element->get_name()."</b><br>";
}
}
}
if (isset($xmlContent) && isset($xslContent)) {
$xml = new \DOMDocument();
$xml->loadXML($xmlContent);
$searchstring = '/<includexslt[ 0-9a-zA-Z=\\/\\"]*url="([~\\-0-9a-zA-Z=\\:\\?\\&\\.\\/]+)"[ 0-9a-zA-Z=\\/"]*[ \\-0-9a-zA-Z=\\/"]*\\/>/i';
$xslContent = preg_replace_callback($searchstring, array(&$this, 'cb_replace'), $xslContent);
$xsl = new \DOMDocument();
$xsl->loadXML($xslContent);
$proc = new \XSLTProcessor();
$proc->importStylesheet($xsl);
$html .= $proc->transformToXml($xml);
}
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html);
$frameResponseObject->addWidget($rawHtml);
$frameResponseObject->setHeadline(array(array("name" => "zurück", "link" => "javascript:history.back()"), array("name" => "Mplme")));
return $frameResponseObject;
}
示例4: execute
public function execute(\FrameResponseObject $frameResponseObject)
{
//CODE FOR ALL COMMANDS OF THIS PAKAGE END
$user = \lms_steam::get_current_user();
// Disable caching
// TODO: Work on cache handling. An enabled cache leads to bugs
// if used with the wiki.
\CacheSettings::disable_caching();
if (!($wiki_container = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id))) {
include "bad_link.php";
exit;
}
if (!$wiki_container instanceof \steam_container) {
$wiki_doc = $wiki_container;
$wiki_container = $wiki_doc->get_environment();
if ($wiki_doc->get_attribute(DOC_MIME_TYPE) != "text/wiki") {
include "bad_link.php";
exit;
}
}
//CODE FOR ALL COMMANDS OF THIS PAKAGE END
$compare = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params[1]);
$to = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params[2]);
$wiki_html_handler = new \lms_wiki($wiki_container);
//$wiki_html_handler->set_admin_menu( "versions", $wiki_doc );
$content = \Wiki::getInstance()->loadTemplate("wiki_version_compare.template.html");
//$content = new HTML_TEMPLATE_IT();
//$content->loadTemplateFile( PATH_TEMPLATES . "wiki_version_compare.template.html" );
$difftext = wiki_diff_html($to, $compare);
$content->setVariable("DIFF_TEXT", $difftext);
$wiki_html_handler->set_main_html($content->get());
$rootlink = \lms_steam::get_link_to_root($wiki_container);
WIKI_FULL_HEADLINE ? $headline = array($rootlink[0], $rootlink[1], array("link" => $rootlink[1]["link"] . "communication/", "name" => gettext("Communication")), array("name" => h($wiki_container->get_name()), "link" => PATH_URL . "wiki/index/" . $wiki_container->get_id() . "/"), array("link" => PATH_URL . "wiki/viewentry/" . $wiki_doc->get_id() . "/", "name" => str_replace(".wiki", "", h($wiki_doc->get_name()))), array("link" => PATH_URL . "wiki/versionoverview/" . $wiki_doc->get_id(), "name" => gettext("Version management")), array("link" => "", "name" => gettext("Version compare") . " (" . $compare->get_version() . " " . gettext("to") . " " . $to->get_version() . ")")) : ($headline = array(array("name" => h($wiki_container->get_name()), "link" => PATH_URL . "wiki/index/" . $wiki_container->get_id() . "/"), array("link" => PATH_URL . "wiki/viewentry/" . $wiki_doc->get_id() . "/", "name" => str_replace(".wiki", "", h($wiki_doc->get_name()))), array("link" => PATH_URL . "wiki/versionoverview/" . $wiki_doc->get_id() . "/versions/", "name" => gettext("Version management")), array("link" => "", "name" => gettext("Version compare") . " (" . $compare->get_version() . " " . gettext("to") . " " . $to->get_version() . ")")));
/*$portal->set_page_main(
$headline,
$wiki_html_handler->get_html()
);
$portal->show_html();
*/
$frameResponseObject->setHeadline($headline);
$widget = new \Widgets\RawHtml();
$widget->setHtml($wiki_html_handler->get_html());
$frameResponseObject->addWidget($widget);
return $frameResponseObject;
}
示例5: frameResponse
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;
}
示例6: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$rapidfeedback = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$user = $GLOBALS["STEAM"]->get_current_steam_user();
$RapidfeedbackExtension = \Rapidfeedback::getInstance();
$RapidfeedbackExtension->addCSS();
$content = $RapidfeedbackExtension->loadTemplate("rapidfeedback_configuration.template.html");
$content->setCurrentBlock("BLOCK_CONFIGURATION_TABLE");
$content->setVariable("RAPIDFEEDBACK_OPTIONS", "Konfiguration");
$content->setVariable("TITLE_LABEL", "Titel:*");
$content->setVariable("TITLE_VALUE", $rapidfeedback->get_name());
$content->setVariable("DESC_LABEL", "Beschreibung:");
if ($rapidfeedback->get_attribute("OBJ_DESC") != "0") {
$content->setVariable("DESC_VALUE", $rapidfeedback->get_attribute("OBJ_DESC"));
}
$content->setVariable("ADMINSURVEY_LABEL", "Administratoren können auch an den Umfragen teilnehmen");
if ($rapidfeedback->get_attribute("RAPIDFEEDBACK_ADMIN_SURVEY") == 1) {
$content->setVariable("ADMINSURVEY_CHECKED", "checked");
}
$content->setVariable("BACK_LABEL", "Zurück");
$content->setVariable("BACK_URL", $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $this->id);
$content->setVariable("EDIT_RAPIDFEEDBACK", "Änderungen speichern");
$content->parse("BLOCK_CONFIGURATION_TABLE");
$group = $rapidfeedback->get_attribute("RAPIDFEEDBACK_GROUP");
if ($group->get_name() == "learners") {
$parent = $group->get_parent_group();
$courseOrGroup = "Kurs: " . $parent->get_attribute("OBJ_DESC") . " (" . $parent->get_name() . ")";
$courseOrGroupUrl = PATH_URL . "semester/" . $parent->get_id();
} else {
$courseOrGroup = "Gruppe: " . $group->get_name();
$courseOrGroupUrl = PATH_URL . "groups/" . $group->get_id();
}
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->addWidget($rawWidget);
$frameResponseObject->setHeadline(array(array("name" => $courseOrGroup, "link" => $courseOrGroupUrl), array("name" => "Rapid Feedback", "link" => $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $this->id), array("name" => "Konfiguration")));
return $frameResponseObject;
}
示例7: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$user = $GLOBALS["STEAM"]->get_current_steam_user();
$pyramidRoom = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$pyramiddiscussionExtension = \Pyramiddiscussion::getInstance();
$pyramiddiscussionExtension->addCSS();
// mail form got submitted
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["send_mail"])) {
$basegroup = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_BASEGROUP");
$admingroup = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_ADMINGROUP");
if ($admingroup->is_member($user)) {
$title = "Rundmail zur Pyramidendiskussion: " . $pyramidRoom->get_name();
$content = nl2br($_POST["content"]);
if ($basegroup->get_id() != $admingroup->get_id()) {
$basegroup->mail($title, $content);
$admingroup->mail($title, $content);
} else {
$basegroup->mail($title, $content);
}
$frameResponseObject->setConfirmText("Rundmail erfolgreich gesendet.");
}
}
$content = $pyramiddiscussionExtension->loadTemplate("pyramiddiscussion_mail.template.html");
$content->setCurrentBlock("BLOCK_PYRAMID_MAIL");
$content->setVariable("PYRAMID_MAIL", "Rundmail erstellen");
$content->setVariable("CONTENT_LABEL", "Inhalt:");
$content->setVariable("SEND_MAIL", "Rundmail senden");
$content->setVariable("BACK_LABEL", "Zurück");
$content->setVariable("BACK_URL", $pyramiddiscussionExtension->getExtensionUrl() . "Index/" . $this->id);
$content->parse("BLOCK_PYRAMID_MAIL");
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->addWidget($rawWidget);
$frameResponseObject->setHeadline(array(array("name" => "Pyramidendiskussion", "link" => $pyramiddiscussionExtension->getExtensionUrl() . "Index/" . $this->id), array("name" => "Rundmail erstellen")));
return $frameResponseObject;
}
示例8: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$workplanExtension = \Workplan::getInstance();
$workplanExtension->addJS();
$content = $workplanExtension->loadTemplate("workplan_create.template.html");
$content->setCurrentBlock("BLOCK_INFO");
$content->setVariable("INFO_TEXT", "Sie sind dabei einen neuen Projektplan zu erstellen.");
$content->parse("BLOCK_INFO");
$content->setCurrentBlock("BLOCK_CREATE_FORMULAR");
$content->setVariable("NAME_LABEL", "Projektname:*");
$content->setVariable("START_DATE_LABEL", "Beginn:*");
$content->setVariable("END_DATE_LABEL", "Ende:");
$content->setVariable("DESCRIPTION_LABEL", "Beschreibung:");
$content->setVariable("CREATE_WORKPLAN_LABEL", "Projektplan erstellen");
$content->setVariable("LABEL_BACK", "Zurück");
$content->setVariable("WORKPLAN_LINK_BACK", $this->getExtension()->getExtensionUrl());
$content->parse("BLOCK_CREATE_FORMULAR");
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->setTitle("Projektplan erstellen");
$frameResponseObject->setHeadline(array(array("link" => $this->getExtension()->getExtensionUrl(), "name" => "Projektplanverwaltung"), array("", "name" => "Neuer Projektplan")));
$frameResponseObject->addWidget($rawWidget);
return $frameResponseObject;
}
示例9: frameResponse
//.........这里部分代码省略.........
$ends = substr($ends, 0, strlen($ends) - 1) . "]";
$dependslist = substr($dependslist, 0, strlen($dependslist) - 1) . "]";
$milestones = substr($milestones, 0, strlen($milestones) - 1) . "]";
} else {
$oids = $oids . "]";
$tasks = $tasks . "]";
$starts = $starts . "]";
$ends = $ends . "]";
$dependslist = $dependslist . "]";
$milestones = $milestones . "]";
}
$content->setCurrentBlock("BLOCK_GANTT_CHART");
$content->setVariable("GANTT_DIV", "ganttchartdiv");
$content->setVariable("WORKPLAN_GANTT_TASKS", $tasks);
$content->setVariable("WORKPLAN_GANTT_OID", $oids);
$content->setVariable("WORKPLAN_GANTT_MILESTONE", $milestones);
$content->setVariable("WORKPLAN_GANTT_DEPENDS", $dependslist);
$content->setVariable("WORKPLAN_GANTT_START", $starts);
$content->setVariable("WORKPLAN_GANTT_END", $ends);
$content->parse("BLOCK_GANTT_CHART");
$content->setCurrentBlock("BLOCK_WORKPLAN_LIST_FORMULAR");
$content->setVariable("LABEL_NEW_MILESTONE", "Meilenstein hinzufügen");
$content->setVariable("LABEL_NEW_TASK", "Vorgang hinzufügen");
$content->setVariable("NAME_LABEL", "Name:*");
$content->setVariable("START_LABEL", "Beginn:*");
$content->setVariable("END_LABEL", "Ende:*");
$content->setVariable("DATE_LABEL", "Datum:*");
$content->setVariable("DURATION_LABEL", "Dauer:");
$content->setVariable("DEPENDS_LABEL", "Abhängigkeit:");
$content->setVariable("USERS_LABEL", "Mitarbeiter:");
$groupID = 0;
if (in_array("WORKPLAN_GROUP", $workplanContainer->get_attribute_names())) {
$groupID = $workplanContainer->get_attribute("WORKPLAN_GROUP");
}
if ($groupID == 0) {
$content->setCurrentBlock("BEGIN BLOCK_USER_OPTION_MILESTONE");
$content->setVariable("USER_ID", $user->get_id());
$content->setVariable("USER_NAME", $user->get_full_name());
$content->parse("BLOCK_USER_OPTION_MILESTONE");
$content->setCurrentBlock("BEGIN BLOCK_USER_OPTION_TASK");
$content->setVariable("USER_ID", $user->get_id());
$content->setVariable("USER_NAME", $user->get_full_name());
if (in_array("WORKPLAN_" . $user->get_id() . "_RESSOURCE", $workplanContainer->get_attribute_names())) {
$content->setVariable("USER_RESSOURCE", $workplanContainer->get_attribute("WORKPLAN_" . $user->get_id() . "_RESSOURCE"));
} else {
$content->setVariable("USER_RESSOURCE", 0);
}
$content->parse("BLOCK_USER_OPTION_TASK");
} else {
$groupObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $groupID);
$members = $groupObject->get_members();
for ($count = 0; $count < count($members); $count++) {
$currentMember = $members[$count];
$content->setCurrentBlock("BEGIN BLOCK_USER_OPTION_MILESTONE");
$content->setVariable("USER_ID", $currentMember->get_id());
$content->setVariable("USER_NAME", $currentMember->get_full_name());
$content->parse("BLOCK_USER_OPTION_MILESTONE");
$content->setCurrentBlock("BEGIN BLOCK_USER_OPTION_TASK");
$content->setVariable("USER_ID", $currentMember->get_id());
$content->setVariable("USER_NAME", $currentMember->get_full_name());
if (in_array("WORKPLAN_" . $currentMember->get_id() . "_RESSOURCE", $workplanContainer->get_attribute_names())) {
$content->setVariable("USER_RESSOURCE", $workplanContainer->get_attribute("WORKPLAN_" . $currentMember->get_id() . "_RESSOURCE"));
} else {
$content->setVariable("USER_RESSOURCE", 0);
}
$content->parse("BLOCK_USER_OPTION_TASK");
}
}
$content->setCurrentBlock("BLOCK_LIST_MILESTONE_DEPENDS");
$content->setVariable("DEPENDS_OID", "-1");
$content->setVariable("DEPENDS_NAME", "Keine Abhängigkeit");
$content->parse("BLOCK_LIST_MILESTONE_DEPENDS");
$content->setCurrentBlock("BLOCK_LIST_TASK_DEPENDS");
$content->setVariable("DEPENDS_OID", "-1");
$content->setVariable("DEPENDS_NAME", "Keine Abhängigkeit");
$content->parse("BLOCK_LIST_TASK_DEPENDS");
for ($count = 0; $count < count($list); $count++) {
if ($list[$count]->getName() == 'task') {
$content->setCurrentBlock("BLOCK_LIST_MILESTONE_DEPENDS");
$content->setVariable("DEPENDS_OID", $list[$count]->oid);
$content->setVariable("DEPENDS_NAME", $list[$count]->name);
$content->parse("BLOCK_LIST_MILESTONE_DEPENDS");
$content->setCurrentBlock("BLOCK_LIST_TASK_DEPENDS");
$content->setVariable("DEPENDS_OID", $list[$count]->oid);
$content->setVariable("DEPENDS_NAME", $list[$count]->name);
$content->parse("BLOCK_LIST_TASK_DEPENDS");
}
}
$content->setVariable("LABEL_BACK", "Ausblenden");
$content->setVariable("LABEL_ADD", "Hinzufügen");
$content->setVariable("WORKPLAN_ID", $this->params[0]);
$content->parse("BLOCK_WORKPLAN_LIST_FORMULAR");
$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;
}
}
示例10: execute
//.........这里部分代码省略.........
$content->setVariable("VALUE_WEBSITE", $this->safe_string($user_profile["USER_PROFILE_WEBSITE_URI"]));
$content->setVariable("VALUE_WEBSITE_NAME", $this->safe_string($user_profile["USER_PROFILE_WEBSITE_NAME"]));
}
if (ENABLED_ICQ_NUMBER || ENABLED_BID_IM) {
$content->setVariable("VALUE_IM_ICQ", $this->safe_string($user_profile["USER_PROFILE_IM_ICQ"]));
}
if (ENABLED_SKYPE_NAME || ENABLED_BID_IM) {
$content->setVariable("VALUE_IM_SKYPE", $this->safe_string($user_profile["USER_PROFILE_IM_SKYPE"]));
}
if (ENABLED_AIM_ALIAS || ENABLED_BID_IM) {
$content->setVariable("VALUE_IM_AIM", $this->safe_string($user_profile["USER_PROFILE_IM_AIM"]));
}
if (ENABLED_MSN_IDENTIFICATION || ENABLED_BID_IM) {
$content->setVariable("VALUE_IM_MSN", $this->safe_string($user_profile["USER_PROFILE_IM_MSN"]));
}
if (ENABLED_YAHOO_ID || ENABLED_BID_IM) {
$content->setVariable("VALUE_IM_YAHOO", $this->safe_string($user_profile["USER_PROFILE_IM_YAHOO"]));
}
if (ENABLED_LANGUAGES) {
// LANGUAGE
if (TRUE) {
// && !empty($user_profile["USER_LANGUAGE"]) ) {
$ulang = $user_profile["USER_LANGUAGE"];
if (!is_string($ulang) || $ulang === "0") {
$ulang = LANGUAGE_DEFAULT_STEAM;
}
$languages = array("english" => array("name" => gettext("English"), "icon" => "flag_gb.gif", "lang_key" => "en_US"), "german" => array("name" => gettext("German"), "icon" => "flag_de.gif", "lang_key" => "de_DE"));
if (!array_key_exists($ulang, $languages)) {
$ulang = LANGUAGE_DEFAULT_STEAM;
}
$content->setCurrentBlock("USER_LANGUAGE");
$content->setVariable("LABEL_LANGUAGES", gettext("Language"));
foreach ($languages as $key => $language) {
$content->setCurrentBlock("LANGUAGE");
$content->setVariable("LABEL_LANGUAGE_LABEL", "profile_language_" . $key);
$content->setVariable("LANGUAGE_ICON", PATH_STYLE . "/images/" . $language["icon"]);
$content->setVariable("LABEL_LANGUAGE", $language["name"]);
$content->setVariable("LANGUAGE_VALUE", $key);
if ($ulang == $key) {
$content->setVariable("LANGUAGE_CHECKED", "checked=\"checked\"");
}
$content->parse("LANGUAGE");
}
$content->parse("USER_LANGUAGE");
}
}
if (ENABLED_BID_LANGUAGE) {
$content->setVariable("LABEL_LANGUAGES", gettext("Language"));
if (trim($user_profile["USER_LANGUAGE"]) == trim("german")) {
$content->setVariable("LANG1", "Deutsch");
$content->setVariable("LANG2", "English");
$content->setVariable("LANG3", "german");
$content->setVariable("LANG4", "english");
} else {
$content->setVariable("LANG1", "English");
$content->setVariable("LANG2", "Deutsch");
$content->setVariable("LANG3", "english");
$content->setVariable("LANG4", "german");
}
}
if (ENABLED_BID_NAME) {
$content->setVariable("LABEL_BID_NAME", gettext("name"));
$completeName = $user_profile["USER_FIRSTNAME"] . " " . $user_profile["USER_FULLNAME"];
$content->setVariable("VALUE_USER_NAME_BID", $completeName);
}
if (ENABLED_BID_ADRESS) {
$content->setVariable("LABEL_BID_ADDRESS", gettext("Address"));
$content->setVariable("VALUE_BID_ADDRESS", $user->get_attribute("USER_ADRESS"));
}
if (ENABLED_BID_EMAIL) {
$content->setVariable("LABEL_EMAIL_BID", gettext("E-Mail"));
$content->setVariable("VALUE_EMAIL_BID", $user->get_attribute("USER_EMAIL"));
}
if (ENABLED_BID_PHONE) {
$content->setVariable("LABEL_TELEPHONE_BID", "Telefon");
$content->setVariable("VALUE_TELEPHONE_BID", $user->get_attribute("bid:user_callto"));
}
//var_dump($user_profile);die;
if (PLATFORM_ID == "bid") {
$frameResponseObject->setHeadline(array(array("link" => PATH_URL . "home/", "name" => $user->get_attribute("USER_FIRSTNAME") . " " . $user->get_attribute("USER_FULLNAME")), array("link" => PATH_URL . "profile/", "name" => gettext("Profile")), array("link" => "", "name" => "Profil ändern")));
} else {
$frameResponseObject->setHeadline(array(array("link" => PATH_URL . "profile/index/" . $user->get_name() . "/", "name" => $user->get_attribute("USER_FIRSTNAME") . " " . $user->get_attribute("USER_FULLNAME")), array("link" => "", "name" => gettext("Profile"))));
}
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($content->get());
$frameResponseObject->addWidget($rawHtml);
/*$portal->set_page_main(
array(
array( "link" => PATH_URL . "profile/index/" . $user->get_name() . "/",
"name" => $user->get_attribute( "USER_FIRSTNAME" ) . " " . $user->get_attribute( "USER_FULLNAME" )
),
array( "link" => "",
"name" => gettext( "Profile" )
)
),
$content->get(),
""
);*/
return $frameResponseObject;
}
示例11: execute
//.........这里部分代码省略.........
//$content->setVariable( "HINT_WIKI_H3", gettext( "heading (level 3)" ) );
//$content->setVariable( "LABEL_WIKI_BOLD", gettext( "'''B'''" ) );
//$content->setVariable( "HINT_WIKI_BOLD", gettext( "boldface" ) );
//$content->setVariable( "LABEL_WIKI_ITALIC", gettext( "''I''" ) );
//$content->setVariable( "HINT_WIKI_ITALIC", gettext( "italic" ) );
//$content->setVariable( "LABEL_WIKI_BULLET_LIST", gettext( "* list" ) );
//$content->setVariable( "HINT_WIKI_BULLET_LIST", gettext( "bullet list" ) );
//$content->setVariable( "LABEL_WIKI_NUMBERED_LIST", gettext( "# list" ) );
//$content->setVariable( "HINT_WIKI_NUMBERED_LIST", gettext( "numbered list" ) );
//$content->setVariable( "LABEL_WIKI_LINE", gettext( "-----" ) );
//$content->setVariable( "HINT_WIKI_LINE", gettext( "horizontal line" ) );
//$content->setVariable( "LABEL_WIKI_LINK", gettext( "[[wiki]]" ) );
//$content->setVariable( "HINT_WIKI_LINK", gettext( "wiki link" ) );
//$content->setVariable( "LABEL_WIKI_URL", gettext( "[URL]" ) );
//$content->setVariable( "HINT_WIKI_URL", gettext( "web link" ) );
//$content->setVariable( "LABEL_WIKI_IMAGE", gettext( "IMG" ) );
//$content->setVariable( "HINT_WIKI_IMAGE", gettext( "image" ) );
$content->setVariable("LABEL_PREVIEW", gettext("Preview"));
$content->setVariable("LABEL_SAVE_CHANGES", gettext("Save changes"));
$content->setVariable("LABEL_RETURN", gettext("back"));
$content->setVariable("JS_NOTICE", '"' . gettext("Warning!\\nYou have edited your entry!\\nIf you proceed, all changes will be lost!\\nDo you really want to proceed?") . '"');
// widget: Images
//$widget = new HTML_TEMPLATE_IT();
//$widget->loadTemplateFile( PATH_TEMPLATES . "widget_wiki_images.template.html" );
$inventory = $wiki_container->get_inventory();
if (!is_array($inventory)) {
$inventory = array();
}
if (sizeof($inventory) > 0) {
\steam_factory::load_attributes($GLOBALS["STEAM"]->get_id(), $inventory, array(OBJ_NAME, OBJ_DESC, DOC_MIME_TYPE));
$images = array();
foreach ($inventory as $object) {
$mime = strtolower($object->get_attribute(DOC_MIME_TYPE));
if ($mime === "image/jpg" || $mime === "image/jpeg" || $mime === "image/gif" || $mime === "image/png") {
$images[] = $object;
}
}
if (empty($images)) {
$content->setCurrentBlock("BLOCK_WIKI_ENTRY_NOIMAGE");
$content->setVariable("WIKI_ENTRY_NOIMAGE", "Es befinden sich keine Bilder in der Mediathek.");
$content->parse("BLOCK_WIKI_ENTRY_NOIMAGE");
} else {
$i = 0;
foreach ($images as $image) {
$path = PATH_URL . "download/image/" . $image->get_id() . "/40/80/";
$content->setCurrentBlock("BLOCK_WIKI_ENTRY_IMAGE");
$content->setVariable("WIKI_ENTRY_IMAGE", <<<END
<table style="float:left">
\t<tr>
\t\t<td>
\t\t\t<input id="image{$i}" type="radio" name="images" value="{$image->get_name()}"/>
\t\t</td>
\t\t<td>
\t\t\t<img src="{$path}" title="{$image->get_name()}">
\t\t</td>
\t</tr>
</table> \t
END
);
$content->parse("BLOCK_WIKI_ENTRY_IMAGE");
$i++;
//$widget->setCurrentBlock("BLOCK_IMAGE");
//$widget->setVariable("WIKI_IMAGE_NAME", $image->get_name());
//$widget->setVariable("WIKI_IMAGE_ADD_LINK", "javascript:insert('[[Image:" . $image->get_identifier() . "]]', '', 'formular', 'values[body]')");
//$widget->setVariable("WIKI_IMAGE_LINK", PATH_URL . "get_document.php?id=" . $image->get_id() . "&width=40&height=80");
//$widget->setVariable("WIKI_IMAGE_VIEW_LINK", PATH_URL . "doc/" . $image->get_id() . "/");
//$widget->setVariable("WIKI_IMAGE_TITLE", $image->get_name());
//$widget->setVariable("WIKI_IMAGE_ADD", gettext("Insert"));
//$widget->setVariable("WIKI_IMAGE_VIEW", gettext("View"));
//$widget->parse("BLOCK_IMAGE");
}
}
}
//$widget->setVariable("UPLOAD_TEXT", gettext("Upload an image"));
//$widget->setVariable("UPLOAD_LINK", PATH_URL . "upload/?env=" . $wiki_container->get_id());
//$widget->setVariable("WIKI_IMAGE_EXTERNAL", gettext("External image"));
//$widget->setVariable("WIKI_IMAGE_EXTERNAL_LINK", "javascript:insert('[[Image:http://', ']]', 'formular', 'values[body]')");
//$content->setCurrentBlock("BLOCK_WIDGET");
//$content->setVariable("WIDGET_TITLE", gettext("Images"));
//$content->setVariable("WIDGET_HTML_CODE", $widget->get());
//$content->parse("BLOCK_WIDGET");
if ($create) {
$pagetitle = gettext("New Article");
} else {
$pagetitle = str_replace("%NAME", h(substr($wiki_doc->get_name(), 0, -5)), gettext("Edit '%NAME'?"));
}
$rootlink = \lms_steam::get_link_to_root($wiki_container);
WIKI_FULL_HEADLINE ? $headline = array($rootlink[0], $rootlink[1], array("link" => $rootlink[1]["link"] . "communication/", "name" => gettext("Communication")), array("name" => h($wiki_container->get_name()), "link" => PATH_URL . "wiki/index/" . $wiki_container->get_id() . "/"), array("link" => "", "name" => $pagetitle)) : ($headline = array(array("name" => h($wiki_container->get_name()), "link" => PATH_URL . "wiki/index/" . $wiki_container->get_id() . "/"), array("link" => "", "name" => $pagetitle)));
/*$portal->set_page_main(
$headline,
$content->get()
);
$portal->show_html();
*/
$frameResponseObject->setHeadline($headline);
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($content->get());
$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例12: frameResponse
//.........这里部分代码省略.........
break;
case 4:
// radio
$newquestion = new \Rapidfeedback\Model\SingleChoiceQuestion();
foreach ($question_geometry["options"] as $option) {
$newquestion->addOption($option);
}
$newquestion->setArrangement($question_geometry["columns"]);
$isQuestion = true;
break;
case 5:
// select
$newquestion = new \Rapidfeedback\Model\SingleChoiceQuestion();
foreach ($question_geometry["options"] as $option) {
$newquestion->addOption($option);
}
$isQuestion = true;
break;
case 6:
// caption
break;
case 7:
// text
$newquestion = new \Rapidfeedback\Model\TextQuestion();
$isQuestion = true;
break;
case 8:
// textarea
$newquestion = new \Rapidfeedback\Model\TextareaQuestion();
$isQuestion = true;
break;
case 9:
// new page
break;
case 10:
// full line
break;
case 11:
// grading
$newquestion = new \Rapidfeedback\Model\GradingQuestion();
foreach ($question_geometry["grading_options"] as $option) {
$newquestion->addRow($option);
}
$question_geometry["question"] = $question_geometry["description"];
$isQuestion = true;
break;
case 12:
// tendency
$newquestion = new \Rapidfeedback\Model\TendencyQuestion();
foreach ($question_geometry["tendency_elements"] as $option) {
$newquestion->addOption($option);
}
$question_geometry["question"] = $question_geometry["description"];
$newquestion->setSteps($question_geometry["tendency_steps"]);
$isQuestion = true;
break;
}
// TODO: bug: bearbeiten single choice geöffnet --> auf neue frage erstellen klicken --> antwortmöglichkeiten
// TODO: evtl weitere attribute
if ($isQuestion) {
$newquestion->setQuestionText($question_geometry["question"]);
$newquestion->setHelpText("");
$newquestion->setRequired($question_geometry["must"]);
$survey_object->addQuestion($newquestion);
}
}
// TODO: einstellungen am container setzen
$survey_container = $survey_object->createSurvey();
$edittime = $bidowl_container->get_attribute("bid:questionary:edittime");
if ($edittime[0]) {
$times = array();
array_push($times, $edittime[2]);
array_push($times, $edittime[1]);
$survey_container->set_attribute("RAPIDFEEDBACK_STARTTYPE", $times);
}
}
}
$content = $RapidfeedbackExtension->loadTemplate("rapidfeedback_import.template.html");
$content->setCurrentBlock("BLOCK_IMPORT_DIALOG");
$content->setVariable("RAPIDFEEDBACK_IMPORT", "Fragebogen importieren");
$content->setVariable("ID_LABEL", "Objekt ID:*");
$content->setVariable("IMPORT_SURVEY", "Fragebogen importieren");
$content->setVariable("BACK_URL", $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $rapidfeedback->get_id());
$content->setVariable("BACK_LABEL", "Zurück");
$content->parse("BLOCK_IMPORT_DIALOG");
$group = $rapidfeedback->get_attribute("RAPIDFEEDBACK_GROUP");
if ($group->get_name() == "learners") {
$parent = $group->get_parent_group();
$courseOrGroup = "Kurs: " . $parent->get_attribute("OBJ_DESC") . " (" . $parent->get_name() . ")";
$courseOrGroupUrl = PATH_URL . "semester/" . $parent->get_id();
} else {
$courseOrGroup = "Gruppe: " . $group->get_name();
$courseOrGroupUrl = PATH_URL . "groups/" . $group->get_id();
}
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->addWidget($rawWidget);
$frameResponseObject->setHeadline(array(array("name" => $courseOrGroup, "link" => $courseOrGroupUrl), array("name" => "Rapid Feedback", "link" => $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $rapidfeedback->get_id()), array("name" => "Import")));
return $frameResponseObject;
}
示例13: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$TCR = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$user = $GLOBALS["STEAM"]->get_current_steam_user();
$TCRExtension = \TCR::getInstance();
$TCRExtension->addCSS();
$TCRExtension->addJS();
$content = $TCRExtension->loadTemplate("tcr_create.template.html");
$kindOfDocument = $this->params[2];
// display create element dialog
$content->setCurrentBlock("BLOCK_CREATE_ELEMENT");
if ($kindOfDocument == 0) {
$create_label = "Neue These erstellen";
} else {
if ($kindOfDocument == 1) {
$create_label = "Neue Kritik erstellen";
$thesisID = $this->params[3];
$content->setVariable("ELEMENT_ID", $thesisID);
} else {
$create_label = "Neue Replik erstellen";
$reviewID = $this->params[3];
$content->setVariable("ELEMENT_ID", $reviewID);
}
}
$content->setVariable("CREATE_LABEL", $create_label);
$content->setVariable("TITLE_LABEL", "Titel");
$content->setVariable("DESC_LABEL", "Untertitel / Beschreibung");
$content->setVariable("PLAIN_LABEL", "Text-Dokument erstellen");
$content->setVariable("FILE_LABEL", "Datei hochladen");
$content->setVariable("CONTENT_LABEL", "Inhalt");
$content->setVariable("SUBMIT_CREATE", $create_label);
$content->setVariable("BACK_LABEL", "Zurück");
$content->setVariable("BACK_URL", $TCRExtension->getExtensionUrl() . "privateDocuments/" . $this->id . "/" . $this->params[2]);
$content->setVariable("KIND_VALUE", $kindOfDocument);
$content->setVariable("ROUND_VALUE", $this->params[1]);
// max file size message
$max_file_size = parse_filesize(ini_get('upload_max_filesize'));
$max_post_size = parse_filesize(ini_get('post_max_size'));
if ($max_post_size > 0 && $max_post_size < $max_file_size) {
$max_file_size = $max_post_size;
}
$content->setVariable("UPLOAD_MAXSIZE", str_replace("%SIZE", readable_filesize($max_file_size), gettext("The maximum allowed file size is %SIZE.")));
$content->parse("BLOCK_CREATE_ELEMENT");
$group = $TCR->get_attribute("TCR_GROUP");
if ($group->get_name() == "learners") {
$parent = $group->get_parent_group();
$courseOrGroup = "Kurs: " . $parent->get_attribute("OBJ_DESC") . " (" . $parent->get_name() . ")";
$courseOrGroupUrl = PATH_URL . "semester/" . $parent->get_id();
} else {
$courseOrGroup = "Gruppe: " . $group->get_name();
$courseOrGroupUrl = PATH_URL . "groups/" . $group->get_id();
}
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->addWidget($rawWidget);
$frameResponseObject->setHeadline(array(array("name" => $courseOrGroup, "link" => $courseOrGroupUrl), array("name" => "Thesen-Kritik-Replik-Verfahren", "link" => $TCRExtension->getExtensionUrl() . "Index/" . $this->id), array("name" => "Private Dokumente", "link" => $TCRExtension->getExtensionUrl() . "privateDocuments/" . $this->id), array("name" => $create_label)));
return $frameResponseObject;
}
示例14: frameResponse
//.........这里部分代码省略.........
$pyramidRoom->set_name($_POST["title"]);
$pyramidRoom->set_attribute("OBJ_DESC", $_POST["info"]);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_ACTCOL", $_POST["phase"]);
if (isset($_POST["use_deadlines"]) && $_POST["use_deadlines"] == "on") {
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_USEDEADLINES", "yes");
$deadlines = $_POST["deadline"];
$deadlineArray = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_DEADLINES");
for ($count = 1; $count <= count($deadlines); $count++) {
$deadline = $deadlines[$count];
$time = substr($deadline, 11);
$deadline = substr($deadline, 0, 10);
$deadline = mktime(substr($time, 0, 2), substr($time, 3, 2), 0, substr($deadline, 3, 2), substr($deadline, 0, 2), substr($deadline, 6, 4));
$deadlineArray[$count] = $deadline;
}
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_DEADLINES", $deadlineArray);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_OVERRIDE_DEADLINES", 0);
} else {
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_USEDEADLINES", "no");
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_OVERRIDE_DEADLINES", 0);
}
$frameResponseObject->setConfirmText("Änderungen erfolgreich gespeichert.");
}
$phase = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_ACTCOL");
$maxcol = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_MAXCOL");
$deadlines = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_DEADLINES");
// display configuration table
$content->setCurrentBlock("BLOCK_PYRAMID_OPTIONS");
$content->setVariable("PYRAMID_OPTIONS", "Konfiguration der Pyramidendiskussion");
$content->setVariable("TITLE_LABEL", "Diskussionsthema:");
$content->setVariable("TITLE_VALUE", $pyramidRoom->get_name());
$content->setVariable("INFO_LABEL", "Infotext:");
$content->setVariable("INFO_VALUE", $pyramidRoom->get_attribute("OBJ_DESC"));
$content->setVariable("START_LABEL", "Anzahl der Startfelder:");
$content->setVariable("START_VALUE", $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_MAX"));
$content->setVariable("BASEGROUP_LABEL", "Basisgruppe:");
$content->setVariable("BASEGROUP_VALUE", $basegroup->get_name());
$content->setVariable("ADMINGROUP_LABEL", "Admingruppe:");
$content->setVariable("ADMINGROUP_VALUE", $admingroup->get_name());
$content->setVariable("EDITOR_LABEL", "Editor-Typ:");
$editortype = $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_EDITOR");
if ($editortype == "text/plain") {
$content->setVariable("EDITOR_VALUE", "Einfacher Text");
} else {
if ($editortype == "text/html") {
$content->setVariable("EDITOR_VALUE", "HTML Notation");
} else {
$content->setVariable("EDITOR_VALUE", "Wiki Notation");
}
}
$content->setVariable("PHASE_LABEL", "Aktuelle Phase:");
for ($count = 0; $count <= $maxcol + 2; $count++) {
$content->setCurrentBlock("BLOCK_PHASE_OPTION");
$content->setVariable("PHASE_ID", $count);
if ($count == 0) {
$content->setVariable("PHASE_VALUE", "Gruppeneinteilungsphase");
} else {
if ($count <= $maxcol) {
$content->setVariable("PHASE_VALUE", $count . ". Diskussionsphase");
} else {
if ($count == $maxcol + 1) {
$content->setVariable("PHASE_VALUE", "Endphase");
} else {
$content->setVariable("PHASE_VALUE", "Pyramide einfrieren");
}
}
}
if ($count == $phase) {
$content->setVariable("PHASE_SELECTED", "selected");
}
$content->parse("BLOCK_PHASE_OPTION");
}
$content->setVariable("DEADLINES_LABEL", "Benutze Deadlines:");
if (count($deadlines) > 0 && $pyramidRoom->get_attribute("PYRAMIDDISCUSSION_USEDEADLINES") == "yes") {
$content->setVariable("DEADLINES_SELECTED", "checked");
}
$content->setVariable("MAX_PHASE", $maxcol);
$content->setVariable("DEADLINE_PHASE_LABEL", "Diskussionsphase");
$content->setVariable("DEADLINE_LABEL", "Deadline");
for ($count = 1; $count <= $maxcol; $count++) {
$hours = 0;
$minutes = 0;
$content->setCurrentBlock("BLOCK_DEADLINE_ENTRY");
$content->setVariable("DEADLINE_PHASE", $count);
if (array_key_exists($count, $deadlines)) {
$content->setVariable("DEADLINE_PHASE_VALUE", date("d.m.Y H:i", (int) $deadlines[$count]));
} else {
$content->setVariable("DEADLINE_PHASE_VALUE", date("d.m.Y H:i", time() + 172800 * ($count - 1)));
}
$content->parse("BLOCK_DEADLINE_ENTRY");
}
$content->setVariable("SAVE_CHANGES", "Änderungen speichern");
$content->setVariable("BACK_LABEL", "Zurück");
$content->setVariable("BACK_LINK", $pyramiddiscussionExtension->getExtensionUrl() . "Index/" . $this->id);
$content->parse("BLOCK_PYRAMID_OPTIONS");
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml($content->get());
$frameResponseObject->addWidget($rawWidget);
$frameResponseObject->setHeadline(array(array("name" => "Pyramidendiskussion", "link" => $pyramiddiscussionExtension->getExtensionUrl() . "Index/" . $this->id), array("name" => "Konfiguration")));
return $frameResponseObject;
}
示例15: frameResponse
//.........这里部分代码省略.........
$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;
}
}