From 12bef7623ccc3673394c6905e163976e626f1130 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Fri, 5 May 2023 22:05:52 +0530 Subject: [PATCH] disables map button when MAP_URL is none #12498 --- netbox/templates/dcim/site.html | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index d6de8f3cb..91fdba7be 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -87,11 +87,13 @@ Physical Address {% if object.physical_address %} -
- - Map - -
+ {% if config.MAPS_URL %} +
+ + Map + +
+ {% endif %} {{ object.physical_address|linebreaksbr }} {% else %} {{ ''|placeholder }} @@ -106,11 +108,13 @@ GPS Coordinates {% if object.latitude and object.longitude %} -
- - Map It - -
+ {% if config.MAPS_URL %} +
+ + Map It + +
+ {% endif %} {{ object.latitude }}, {{ object.longitude }} {% else %} {{ ''|placeholder }}