Ejemplo n.º 1
0
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 Resources. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
//central or helpdesk access
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
    Html::header(PluginResourcesResource::getTypeName(2), '', "plugins", "resources");
} else {
    Html::helpHeader(PluginResourcesResource::getTypeName(2));
}
$resource = new PluginResourcesResource();
if ($resource->canView() || Session::haveRight("config", "w")) {
    if (plugin_resources_haveRight("all", "w")) {
        //Have right to see all resources
        //Have not right to see all resources
        echo "<div align='center'><script type='text/javascript'>";
        echo "cleanhide('modal_resource_content');";
        echo "var account_window=new Ext.Window({\n            layout:'fit',\n            width:800,\n            height:400,\n            closeAction:'hide',\n            modal: true,\n            autoScroll: true,\n            title: \"" . __('View by contract type', 'resources') . "\",\n            autoLoad: '" . $CFG_GLPI['root_doc'] . "/plugins/resources/ajax/resourcetree.php'\n         });";
        echo "</script>";
        echo "<a onclick='account_window.show();' href='#modal_resource_content' title='" . __('View by contract type', 'resources') . "'>" . __('View by contract type', 'resources') . "</a>";
        echo "</div>";
    }
    Search::show("PluginResourcesResource", $_GET);
} else {
    Html::displayRightError();
}
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {