mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix device location menu links (#10214)
This commit is contained in:
@@ -66,7 +66,7 @@ class MenuComposer
|
||||
$vars['device_types'] = Device::hasAccess($user)->select('type')->distinct()->get()->pluck('type')->filter();
|
||||
|
||||
$vars['locations'] = Config::get('show_locations') && Config::get('show_locations_dropdown') ?
|
||||
Location::hasAccess($user)->select('location')->get()->map->display()->filter() :
|
||||
Location::hasAccess($user)->where('location', '!=', '')->select('location', 'id')->get() :
|
||||
collect();
|
||||
|
||||
// Service menu
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<ul class="dropdown-menu scrollable-menu">
|
||||
<li><a href="{{ url('locations') }}"><i class="fa fa-map-marker fa-fw fa-lg" aria-hidden="true"></i> @lang('All Locations')</a></li>
|
||||
@foreach($locations as $location)
|
||||
<li><a href="{{ url("devices/location=" . urlencode($location)) }}"><i class="fa fa-building fa-fw fa-lg" aria-hidden="true"></i> {{ $location }}</a></li>
|
||||
<li><a href="{{ url("devices/location=" . $location->id) }}"><i class="fa fa-building fa-fw fa-lg" aria-hidden="true"></i> {{ $location->display() }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user