Exemplo n.º 1
0
 /**
  * Output tag style edit screen.
  */
 function outputTagStyleEditScreen()
 {
     global $tpl, $ilCtrl, $lng;
     // set style sheet
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", $this->object->getContentStylePath($this->object->getId()));
     $ts_tpl = new ilTemplate("tpl.style_tag_edit.html", true, true, "Services/Style");
     $cur = explode(".", $_GET["tag"]);
     $cur_tag = $cur[0];
     $cur_class = $cur[1];
     $ts_tpl->setVariable("EXAMPLE", ilObjStyleSheetGUI::getStyleExampleHTML($_GET["style_type"], $cur_class));
     $ts_tpl->setVariable("FORM", $this->form_gui->getHtml());
     $tpl->setTitle($cur_class . " (" . $lng->txt("sty_type_" . $_GET["style_type"]) . ")");
     $tpl->setContent($ts_tpl->get());
 }
Exemplo n.º 2
0
 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess, $rbacsystem;
     $stypes = ilObjStyleSheet::_getStyleSuperTypes();
     $types = $stypes[$this->super_type];
     if (!in_array($a_set["type"], $types)) {
         return;
     }
     //var_dump($a_set);
     // checkbox row
     /*		if ($this->expandable)
     		{
     			if (!empty($this->core_styles[$a_set["type"].".".
     				ilObjStyleSheet::_determineTag($a_set["type"]).
     				".".$a_set["class"]]))
     			{
     				$this->tpl->touchBlock("no_checkbox");
     			}
     			else
     			{*/
     $this->tpl->setCurrentBlock("checkbox");
     $this->tpl->setVariable("CHAR", $a_set["type"] . "." . ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"]);
     $this->tpl->parseCurrentBlock();
     /*			}
     		}*/
     if ($this->hideable) {
         if (!ilObjStyleSheet::_isHideable($a_set["type"]) || !empty($this->core_styles[$a_set["type"] . "." . ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"]])) {
             $this->tpl->touchBlock("no_hide_checkbox");
         } else {
             $this->tpl->setCurrentBlock("hide_checkbox");
             $this->tpl->setVariable("CHAR", $a_set["type"] . "." . ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"]);
             if ($this->style->getHideStatus($a_set["type"], $a_set["class"])) {
                 $this->tpl->setVariable("CHECKED", "checked='checked'");
             }
             $this->tpl->parseCurrentBlock();
         }
     }
     // example
     $this->tpl->setVariable("EXAMPLE", ilObjStyleSheetGUI::getStyleExampleHTML($a_set["type"], $a_set["class"]));
     $tag_str = ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"];
     $this->tpl->setVariable("TXT_TAG", $a_set["class"]);
     $this->tpl->setVariable("TXT_TYPE", $lng->txt("sty_type_" . $a_set["type"]));
     if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"])) {
         $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
         $ilCtrl->setParameter($this->parent_obj, "tag", $tag_str);
         $ilCtrl->setParameter($this->parent_obj, "style_type", $a_set["type"]);
         $this->tpl->setVariable("LINK_EDIT_TAG_STYLE", $ilCtrl->getLinkTarget($this->parent_obj, "editTagStyle"));
     }
 }