コード例 #1
0
 /**
  * list fields
  */
 public function listFields()
 {
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $this->toolbar->setFormAction($this->ctrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $this->toolbar->addText($this->lng->txt("dcl_table"));
     $this->toolbar->addInputItem($table_selection);
     $this->toolbar->addFormButton($this->lng->txt('change'), 'doTableSwitch');
     $this->toolbar->addSeparator();
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $this->toolbar->addSeparator();
     $this->ctrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $this->toolbar->addButton($this->lng->txt("dcl_table_settings"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $this->toolbar->addButton($this->lng->txt("dcl_delete_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_field"), $this->ctrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $this->ctrl->getCmd(), $this->table_id);
     $this->tpl->setContent($list->getHTML());
 }
コード例 #2
0
 /**
  * Get toolbar
  *
  * @return object toolbar
  */
 function getToolbar()
 {
     global $ilCtrl, $lng, $tpl;
     // toolbar
     $tb = new ilToolbarGUI();
     $tb->setFormAction($ilCtrl->getFormAction($this));
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("WholePicture" => $lng->txt("cont_WholePicture"), "Rect" => $lng->txt("cont_Rect"), "Circle" => $lng->txt("cont_Circle"), "Poly" => $lng->txt("cont_Poly"));
     $si = new ilSelectInputGUI($lng->txt("cont_shape"), "shape");
     $si->setOptions($options);
     $tb->addInputItem($si, true);
     $tb->addFormButton($lng->txt("cont_add_area"), "addNewArea");
     // highlight mode
     /*		if (strtolower(get_class($this)) == "ilimagemapeditorgui")
     		{
     			$st_item = $this->media_object->getMediaItem("Standard");
     			$tb->addSeparator();
     			$options = ilMapArea::getAllHighlightModes();
     			$hl = new ilSelectInputGUI($lng->txt("cont_highlight_mode"), "highlight_mode");
     			$hl->setOptions($options);
     //			$hl->setValue($st_item->getHighlightMode());
     			$tb->addInputItem($hl, true);
     			$options = ilMapArea::getAllHighlightClasses();
     			$hc = new ilSelectInputGUI($lng->txt("cont_highlight_class"), "highlight_class");
     			$hc->setOptions($options);
     //			$hc->setValue($st_item->getHighlightClass());
     			$tb->addInputItem($hc, false);
     			$tb->addFormButton($lng->txt("cont_set"), "setHighlight");
     		}*/
     return $tb;
 }
コード例 #3
0
 /**
  * Get toolbar
  *
  * @return object toolbar
  */
 function getToolbar()
 {
     global $ilCtrl, $lng;
     // toolbar
     $tb = new ilToolbarGUI();
     $tb->setFormAction($ilCtrl->getFormAction($this));
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("Rect" => $lng->txt("cont_Rect"), "Circle" => $lng->txt("cont_Circle"), "Poly" => $lng->txt("cont_Poly"), "Marker" => $lng->txt("cont_marker"));
     $si = new ilSelectInputGUI($lng->txt("cont_trigger_area"), "shape");
     $si->setOptions($options);
     $tb->addInputItem($si, true);
     $tb->addFormButton($lng->txt("add"), "addNewArea");
     return $tb;
 }
コード例 #4
0
 public function appendToolbarSwitch(ilToolbarGUI $toolbar, $a_obj_type, $a_ref_id)
 {
     include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
     $tpls = ilDidacticTemplateSettings::getInstanceByObjectType($a_obj_type)->getTemplates();
     if (!count($tpls)) {
         return false;
     }
     // Add template switch
     $toolbar->addText($this->lng->txt('didactic_selected_tpl_option'));
     // Show template options
     $options = array(0 => $this->lng->txt('didactic_default_type'));
     foreach ($tpls as $tpl) {
         $options[$tpl->getId()] = $tpl->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
     $tpl_selection = new ilSelectInputGUI('', 'tplid');
     $tpl_selection->setOptions($options);
     $tpl_selection->setValue(ilDidacticTemplateObjSettings::lookupTemplateId($this->getParentObject()->object->getRefId()));
     $toolbar->addInputItem($tpl_selection);
     // Apply templates switch
     $toolbar->addFormButton($this->lng->txt('change'), 'confirmTemplateSwitch');
     return true;
 }
コード例 #5
0
 function linkChecker()
 {
     global $ilias, $ilUser, $tpl;
     $this->__initLinkChecker();
     $this->setTabs();
     $this->setContentSubTabs("link_check");
     require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
     $toolbar = new ilToolbarGUI();
     if ((bool) $ilias->getSetting('cron_web_resource_check')) {
         include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
         include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
         $chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message');
         $chb->setValue(1);
         $chb->setChecked((bool) ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(), $this->object->getId()));
         $chb->setOptionTitle($this->lng->txt('link_check_message_b'));
         $toolbar->addInputItem($chb);
         $toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck');
         $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck'));
     }
     $tgui = new ilLinkCheckerTableGUI($this, 'linkChecker');
     $tgui->setLinkChecker($this->link_checker_obj)->setRowHandler($this)->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck');
     return $tpl->setContent($tgui->prepareHTML()->getHTML() . $toolbar->getHTML());
 }
コード例 #6
0
 /**
  * Get confirmation screen HTML.
  *
  * @return	string		HTML code.
  */
 public final function getHTML()
 {
     global $lng;
     ilUtil::sendQuestion($this->getHeaderText());
     include_once "./Services/Utilities/classes/class.ilConfirmationTableGUI.php";
     // delete/handle items
     if (count($this->item) > 0) {
         $ctab = new ilConfirmationTableGUI($this->use_images);
         $ctab->setData($this->item);
         // other buttons
         foreach ($this->buttons as $b) {
             $ctab->addCommandButton($b["cmd"], $b["txt"]);
         }
         $ctab->addCommandButton($this->confirm_cmd, $this->confirm_txt);
         $ctab->addCommandButton($this->cancel_cmd, $this->cancel_txt);
         $ctab->setFormAction($this->getFormAction());
         foreach ($this->hidden_item as $hidden_item) {
             $ctab->addHiddenInput($hidden_item["var"], $hidden_item["value"]);
         }
         if ($this->form_name) {
             $ctab->setFormName($this->form_name);
         }
         return $ctab->getHTML();
     } else {
         $tb = new ilToolbarGUI();
         $tb->setPreventDoubleSubmission(true);
         $tb->setFormAction($this->getFormAction());
         if ($this->hidden_item) {
             require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
             foreach ($this->hidden_item as $hidden_item) {
                 $hiddenInput = new ilHiddenInputGUI($hidden_item['var']);
                 $hiddenInput->setValue($hidden_item['value']);
                 $tb->addInputItem($hiddenInput);
             }
         }
         require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
         $confirm = ilSubmitButton::getInstance();
         $confirm->setCommand($this->confirm_cmd);
         $confirm->setCaption($this->confirm_txt, false);
         $cancel = ilSubmitButton::getInstance();
         $cancel->setCommand($this->cancel_cmd);
         $cancel->setCaption($this->cancel_txt, false);
         $tb->addButtonInstance($confirm);
         $tb->addButtonInstance($cancel);
         return $tb->getHTML();
     }
 }