/** * Init filter */ function initFilter() { global $lng; // most filters are only if (!ilObjLanguageAccess::_isPageTranslation()) { // pattern include_once "./Services/Form/classes/class.ilTextInputGUI.php"; $ti = new ilTextInputGUI($lng->txt("search"), "pattern"); $ti->setParent($this->parent_obj); $ti->setMaxLength(64); $ti->setSize(20); $this->addFilterItem($ti); $ti->readFromSession(); // module $options = array(); $options["all"] = $lng->txt("language_all_modules"); $modules = ilObjLanguageExt::_getModules($lng->getLangKey()); foreach ($modules as $mod) { $options[$mod] = $mod; } include_once "./Services/Form/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI(ucfirst($lng->txt("module")), "module"); $si->setParent($this->parent_obj); $si->setOptions($options); $this->addFilterItem($si); $si->readFromSession(); if (!$si->getValue()) { $si->setValue('administration'); } // mode $options = array(); $options["all"] = $lng->txt("language_scope_global"); $options["changed"] = $lng->txt("language_scope_local"); if ($this->params['langmode']) { $options["added"] = $lng->txt("language_scope_added"); } $options["unchanged"] = $lng->txt("language_scope_unchanged"); $options["equal"] = $lng->txt("language_scope_equal"); $options["different"] = $lng->txt("language_scope_different"); $options["commented"] = $lng->txt("language_scope_commented"); if ($this->params['langmode']) { $options["dbremarks"] = $lng->txt("language_scope_dbremarks"); } $options["conflicts"] = $lng->txt("language_scope_conflicts"); include_once "./Services/Form/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI($lng->txt("filter"), "mode"); $si->setParent($this->parent_obj); $si->setOptions($options); $this->addFilterItem($si); $si->readFromSession(); if (!$si->getValue()) { $si->setValue('all'); } } //compare $options = array(); $langlist = $lng->getInstalledLanguages(); foreach ($langlist as $lang_key) { $options[$lang_key] = $lng->txt("meta_l_" . $lang_key); } include_once "./Services/Form/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI($lng->txt("language_compare"), "compare"); $si->setParent($this->parent_obj); $si->setOptions($options); $this->addFilterItem($si); $si->readFromSession(); if (!$si->getValue()) { $si->setValue($lng->getDefaultLanguage()); } }