Skip to content

Commit

Permalink
On devicesRead template make os_group, os_family and os_name editable.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Feb 16, 2024
1 parent c310172 commit 27b8242
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Views/devicesRead.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<?php $link = "<a role=\"button\" title=\"" . __('View') . "\" class=\"btn btn-outline-secondary link_button\" href=\"" . url_to('devicesCollection') . "?devices.manufacturer=" . urlencode($resource->manufacturer) . "\"><span title=\"" . __('View') . "\" class=\"fa fa-link\" aria-hidden=\"true\"></span></a>"; ?>
<?= read_field('manufacturer', $resource->manufacturer, '', $update, '', $link) ?>
<?php $link = "<a role=\"button\" title=\"" . __('View') . "\" class=\"btn btn-outline-secondary link_button\" href=\"" . url_to('devicesCollection') . "?devices.os_group=" . urlencode($resource->os_group) . "\"><span title=\"" . __('View') . "\" class=\"fa fa-link\" aria-hidden=\"true\"></span></a>"; ?>
<?= read_field('os_group', $resource->os_group, '', false, __('OS Group'), $link) ?>
<?= read_field('os_group', $resource->os_group, '', $update, __('OS Group'), $link) ?>
<?php if (!empty($resource->type) and stripos($resource->type, 'printer') !== false and !empty($resource->snmp_oid)) { ?>
<?= read_field('printer_color', $resource->printer_color, '', false, __('Color')) ?>
<?php } ?>
Expand All @@ -178,7 +178,7 @@
<?= read_select('status', $resource->status, '', $update, __('Status'), $included['status']) ?>
<?php $link = "<a role=\"button\" title=\"" . __('View') . "\" class=\"btn btn-outline-secondary link_button\" href=\"" . url_to('devicesCollection') . "?devices.model=" . urlencode($resource->model) . "\"><span title=\"" . __('View') . "\" class=\"fa fa-link\" aria-hidden=\"true\"></span></a>"; ?>
<?= read_field('model', $resource->model, '', $update, '', $link) ?>
<?= read_field('os_name', $resource->os_name, '', false, 'OS Name') ?>
<?= read_field('os_name', $resource->os_name, '', $update, 'OS Name') ?>
<?php if (!empty($resource->type) and stripos($resource->type, 'printer') !== false and !empty($resource->snmp_oid)) { ?>
<?= read_field('printer_duplex', $resource->printer_duplex, '', false, __('Duplex')) ?>
<?php } ?>
Expand All @@ -201,7 +201,7 @@
<?= read_field('hostname', $resource->hostname, '', $update) ?>
<?= read_field('dns_name', $resource->dns_hostname, '', $update, __('DNS Hostname')) ?>
<?= read_field('form_factor', $resource->form_factor, '', $update) ?>
<?= read_field('os_family', $resource->os_family, '', false, __('OS Family')) ?>
<?= read_field('os_family', $resource->os_family, '', $update, __('OS Family')) ?>
<?= read_field('processor_count', $resource->processor_count, '', false, __('Processors')) ?>
<?= read_field('uptime', $resource->uptime) ?>
</div>
Expand Down

0 comments on commit 27b8242

Please sign in to comment.