diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e1023b..2a4c77f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.0] - 2026-02-20 +### Fixed +- Tab icons +- Errors with permissions +- Map styles + ## [2.0.0] - 2026-01-19 ### Added - GLPI 11 compatibility diff --git a/inc/geolocation.class.php b/inc/geolocation.class.php index 04522f2..5929bdd 100644 --- a/inc/geolocation.class.php +++ b/inc/geolocation.class.php @@ -69,6 +69,10 @@ public static function geolocationRedefineMenu($menus) public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { + if (!Session::haveRight(self::$rightname, READ)) { + return ''; + } + if (in_array($item->getType(), PluginGeolocationConfig::getUsedItemtypes())) { return self::createTabEntry(self::getTypeName()); } @@ -176,7 +180,7 @@ public static function show($itemtype) $typename = class_exists($itemtype) ? $itemtype::getTypeName($data['data']['totalcount']) : $itemtype; echo "
"; - echo "
"; + echo "
"; echo "" . __('Search results for localized items only') . ""; $js = "$(function() { var map = initMap($('#map_container'), 'map', 'full'); @@ -302,6 +306,18 @@ public function showMap() { $rand = mt_rand(); + echo ""; + echo "
"; $js = " $(function(){ @@ -400,7 +416,7 @@ function onMapClick(e) { // Geolocation may be disabled in the browser (e.g. geo.enabled = false in firefox) if (!navigator.geolocation) { - map_elt = initMap($('#setlocation_container_{$rand}'), 'setlocation_{$rand}', '200px'); + map_elt = initMap($('#setlocation_container_{$rand}'), 'setlocation_{$rand}', '450px'); finalizeMap(); return; } @@ -427,7 +443,7 @@ function onMapClick(e) { }); finalizeMap(); }, function() { - map_elt = initMap($('#setlocation_container_{$rand}'), 'setlocation_{$rand}', '200px'); + map_elt = initMap($('#setlocation_container_{$rand}'), 'setlocation_{$rand}', '450px'); finalizeMap(); }, {enableHighAccuracy: true}); });";