function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') { return PluginEnvironmentDisplay::getTypeName(1); } return ''; }
https://forge.indepnet.net/projects/environment ------------------------------------------------------------------------- LICENSE This file is part of Environment. Environment 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. Environment 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 Environment. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Html::header(PluginEnvironmentDisplay::getTypeName(2), '', "assets", "pluginenvironmentdisplay"); if (Session::haveRight("plugin_environment", READ) || Session::haveRight("config", UPDATE)) { $env = new PluginEnvironmentDisplay(); $env->display(); } else { Html::displayRightError(); } Html::footer();
Environment 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. Environment 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 Environment. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Html::Header(PluginEnvironmentDisplay::getTypeName(1), '', "plugins", "environment"); if (plugin_environment_haveRight("environment", "r") || Session::haveRight("config", "w")) { $env = new PluginEnvironmentDisplay(); // show "my view" in first if (!isset($_SESSION['glpi_plugin_environment_tab'])) { $_SESSION['glpi_plugin_environment_tab'] = "all"; } if (isset($_GET['onglet'])) { $_SESSION['glpi_plugin_environment_tab'] = $_GET['onglet']; // glpi_header($_SERVER['HTTP_REFERER']); } $plugin = new Plugin(); if ($plugin->isActivated("appliances")) { $appliances = 1; } else { $appliances = 0;