static function getMenuContent() { $plugin_page = "/plugins/manufacturersimports/front/import.php"; $menu = array(); //Menu entry in tools $menu['title'] = self::getMenuName(); $menu['page'] = $plugin_page; $menu['links']['search'] = $plugin_page; if (Session::haveRight(static::$rightname, UPDATE) || Session::haveRight("config", UPDATE)) { //Entry icon in breadcrumb $menu['links']['config'] = PluginManufacturersimportsConfig::getSearchURL(false); //Link to config page in admin plugins list $menu['config_page'] = PluginManufacturersimportsConfig::getSearchURL(false); //Add a fourth level in breadcrumb for configuration page $menu['options']['config']['title'] = __('Setup'); $menu['options']['config']['page'] = PluginManufacturersimportsConfig::getSearchURL(false); $menu['options']['config']['links']['search'] = PluginManufacturersimportsConfig::getSearchURL(false); $menu['options']['config']['links']['add'] = PluginManufacturersimportsConfig::getFormURL(false); } return $menu; }
GLPI is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. GLPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GLPI; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------- */ // ---------------------------------------------------------------------- // Original Author of file: Julien Dombre // Purpose of file: // ---------------------------------------------------------------------- if (strpos($_SERVER['PHP_SELF'], "dropdownSuppliers.php")) { include '../../../inc/includes.php'; header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); } if (!defined('GLPI_ROOT')) { die("Can not acces directly to this file"); } $config = new PluginManufacturersimportsConfig(); if ($_POST['supplier'] != -1) { echo " <a href='" . $config->getFormURL() . "?preconfig=" . $_POST['supplier'] . "'>" . _sx('button', 'Update') . "</a>"; }
Html::back(); } else { if (isset($_POST["delete"])) { Session::checkRight("plugin_manufacturersimports", PURGE); $config->delete($_POST, true); Html::redirect("./config.form.php"); } else { if (isset($_POST["update_model"])) { Session::checkRight("plugin_manufacturersimports", UPDATE); $model->addModel($_POST); Html::back(); } else { if (isset($_POST["delete_model"])) { Session::checkRight("plugin_manufacturersimports", UPDATE); $model->delete($_POST["id"]); Html::back(); } else { Html::header(__('Setup'), '', "tools", "pluginmanufacturersimportsmenu", "config"); $config->checkGlobal(READ); $config->display($_GET); echo "<div align='center'>"; echo "<a href='" . PluginManufacturersimportsConfig::getFormURL(true) . "'>"; echo __('Back'); echo "</a>"; echo "</div>"; Html::footer(); } } } } }