From 663fd954b58e8b6376ecf67110876fa91f0008df Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Wed, 18 Oct 2017 15:50:13 +0200 Subject: [locations] added warning if subnets are marked for deletion; locations now scroll into view; subnet list now sorted by startip; --- .../locations/lang/de/template-tags.json | 1 + .../locations/lang/en/template-tags.json | 1 + modules-available/locations/page.inc.php | 2 +- .../locations/templates/location-subnets.html | 22 ++++++++++++++++---- .../locations/templates/locations.html | 24 ++++++++++++++++++++++ 5 files changed, 45 insertions(+), 5 deletions(-) (limited to 'modules-available/locations') diff --git a/modules-available/locations/lang/de/template-tags.json b/modules-available/locations/lang/de/template-tags.json index 72f6c4f2..04d10d06 100644 --- a/modules-available/locations/lang/de/template-tags.json +++ b/modules-available/locations/lang/de/template-tags.json @@ -6,6 +6,7 @@ "lang_deleteChildLocations": "Untergeordnete Orte ebenfalls l\u00f6schen", "lang_deleteLocation": "Ort l\u00f6schen", "lang_deleteSubnet": "Bereich l\u00f6schen", + "lang_deleteSubnetWarning": "Alle zum L\u00f6schen markierten Subnetze werden gelöscht. Diese Aktion kann nicht r\u00fcckg\u00e4ngig gemacht werden.", "lang_editConfigVariables": "Konfig.-Variablen", "lang_editRoomplan": "Raumplan bearbeiten", "lang_endAddress": "Endadresse", diff --git a/modules-available/locations/lang/en/template-tags.json b/modules-available/locations/lang/en/template-tags.json index 720e029f..e3c0b056 100644 --- a/modules-available/locations/lang/en/template-tags.json +++ b/modules-available/locations/lang/en/template-tags.json @@ -6,6 +6,7 @@ "lang_deleteChildLocations": "Delete child locations aswell", "lang_deleteLocation": "Delete location", "lang_deleteSubnet": "Delete range", + "lang_deleteSubnetWarning": "All subnets marked for deletion will be deleted. This cannot be undone!", "lang_editConfigVariables": "Config vars", "lang_editRoomplan": "Edit roomplan", "lang_endAddress": "End address", diff --git a/modules-available/locations/page.inc.php b/modules-available/locations/page.inc.php index ed78a6c7..d9bc7130 100644 --- a/modules-available/locations/page.inc.php +++ b/modules-available/locations/page.inc.php @@ -316,7 +316,7 @@ class Page_Locations extends Page } if ($getAction === 'showsubnets') { $res = Database::simpleQuery("SELECT subnetid, startaddr, endaddr, locationid FROM subnet - WHERE locationid IN (:locations)", + WHERE locationid IN (:locations) ORDER BY startaddr ASC", array("locations" => User::getAllowedLocations("location.view"))); $rows = array(); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index 9505ceac..2cc8e98b 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -1,6 +1,6 @@