diff --git a/app/devices/app_languages.php b/app/devices/app_languages.php index 85c3811ebc..4eebabd719 100644 --- a/app/devices/app_languages.php +++ b/app/devices/app_languages.php @@ -999,6 +999,15 @@ $text['label-device_label']['pl'] = "Etykieta"; $text['label-device_label']['uk'] = ""; $text['label-device_label']['sv-se'] = "Etikett"; +$text['label-device_alternate']['en-us'] = "Alternate"; +$text['label-device_alternate']['es-cl'] = "Suplente"; +$text['label-device_alternate']['pt-pt'] = "Alternado"; +$text['label-device_alternate']['fr-fr'] = "Alterné"; +$text['label-device_alternate']['pt-br'] = "Alternado"; +$text['label-device_alternate']['pl'] = "Alternatywny"; +$text['label-device_alternate']['uk'] = "заступник"; +$text['label-device_alternate']['sv-se'] = "Alternate"; + $text['label-device_key_value']['en-us'] = "Value"; $text['label-device_key_value']['es-cl'] = "Valor"; $text['label-device_key_value']['pt-pt'] = "Valor"; diff --git a/app/devices/devices.php b/app/devices/devices.php index 64c90fbab0..7a3d6c2e6e 100644 --- a/app/devices/devices.php +++ b/app/devices/devices.php @@ -177,6 +177,14 @@ else { $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; + //alternate_found + $device_alternate = false; + foreach($devices as $row) { + if (strlen($row['device_uuid_alternate']) > 0) { + $device_alternate = true; + break; + } + } echo "\n"; echo "\n"; if ($_GET['showall'] && permission_exists('device_all')) { @@ -184,6 +192,9 @@ else { } echo th_order_by('device_mac_address', $text['label-device_mac_address'], $order_by, $order); echo th_order_by('device_label', $text['label-device_label'], $order_by, $order); + if ($device_alternate) { + echo th_order_by('device_template', $text['label-device_alternate'], $order_by, $order); + } echo th_order_by('device_vendor', $text['label-device_vendor'], $order_by, $order); echo th_order_by('device_template', $text['label-device_template'], $order_by, $order); echo th_order_by('device_provision_enable', $text['label-device_provision_enable'], $order_by, $order); @@ -211,6 +222,14 @@ else { echo (permission_exists('device_edit')) ? "".format_mac($row['device_mac_address'])."" : format_mac($row['device_mac_address']); echo " \n"; echo " \n"; + if ($device_alternate) { + if (strlen($row['device_uuid_alternate']) > 0) { + echo " ".$text['label-true']."\n"; + } + else { + echo " ".$text['label-false']."\n"; + } + } echo " \n"; echo " \n"; echo " \n";
".$row['device_label']." ".$row['device_vendor']." ".$row['device_template']." ".$text['label-'.$row['device_provision_enable']]."