Projekt

Obecné

Profil

Stáhnout (3.88 KB) Statistiky
| Větev: | Tag: | Revize:
c1bdc1c4 Michal Kliment
<h2><?php echo __('Device template') ?> - <?php echo $device_template->name ?></h2><br />
8baed187 Michal Kliment
<?php

$arr_links = array();

if ($this->acl_check_edit('Devices_Controller', 'devices'))
$arr_links[] = html::anchor('device_templates/edit/' . $device_template->id, __('Edit'));

if ($this->acl_check_delete('Devices_Controller', 'devices'))
$arr_links[] = html::anchor('device_templates/delete/' . $device_template->id, __('Delete'), array('class' => 'delete_link'));

echo implode(' | ', $arr_links);

?>

<br /><br />

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Trade name') ?></th>
<td><?php echo $device_template->name ?></td>
</tr>
<tr>
<th><?php echo __('Type') ?></th>
<td><?php echo $device_template->enum_type->get_value() ?></td>
</tr>
<tr>
<th><?php echo __('Default') ?></th>
<td><?php echo $device_template->default ? __('Yes') : __('No') ?></td>
</tr>
c1bdc1c4 Michal Kliment
<tr>
<th><?php echo __('Default interface') ?> <?php echo help::hint(__('Default iface is used as filled iface in permitting of the connection request')) ?></th>
<td><?php echo (preg_match('/^(\d+):(\d+)$/', @$ivals['default_iface'], $r) !== FALSE) ? @$ivals[$r[1]]['items'][$r[2]]['name'] : '<span class="red">' . __('Not set') . '</span>' ?></td>
</tr>
8baed187 Michal Kliment
</table>

<br /><h3><?php echo __('Ethernet interfaces') ?></h3>

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Count') ?></th>
<td><?php echo $ivals[Iface_Model::TYPE_ETHERNET]['count'] ?></td>
</tr>
<tr>
<th><?php echo __('Names') ?></th>
<td><?php foreach ($ivals[Iface_Model::TYPE_ETHERNET]['items'] as $item) echo ($item['name']) ? $item['name'] . ', ' : '' ?></td>
</tr>
</table>

<br /><h3><?php echo __('Wireless interfaces') ?></h3>

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Minimal count') ?></th>
<td><?php echo $ivals[Iface_Model::TYPE_WIRELESS]['min_count'] ?></td>
</tr>
<tr>
<th><?php echo __('Maximal count') ?></th>
<td><?php echo $ivals[Iface_Model::TYPE_WIRELESS]['max_count'] ?></td>
</tr>
</table>

<br />

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Name') ?></th>
<th><?php echo __('Wireless mode') ?></th>
<th><?php echo __('Wireless antenna') ?></th>
</tr>
<?php foreach ($ivals[Iface_Model::TYPE_WIRELESS]['items'] as $item): ?>
<tr>
<td><?php echo $item['name'] ?></td>
<td><?php echo $iface_model->get_wireless_mode(@$item['wireless_mode']) ?></td>
<td><?php echo $iface_model->get_wireless_antenna(@$item['wireless_antenna']) ?></td>
</tr>
<?php endforeach; ?>
</table>

<br /><h3><?php echo __('Ports') ?></h3>

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Count') ?></th>
<td><?php echo $ivals[Iface_Model::TYPE_PORT]['count'] ?></td>
</tr>
</table>

<br />

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Name') ?></th>
<th><?php echo __('Port number') ?></th>
<th><?php echo __('Port mode') ?></th>
</tr>
<?php foreach ($ivals[Iface_Model::TYPE_PORT]['items'] as $item): ?>
<tr>
<td><?php echo $item['name'] ?></td>
<td><?php echo __('Port') ?> <?php echo $item['number'] ?></td>
<td><?php echo $iface_model->get_port_mode($item['port_mode']) ?></td>
</tr>
<?php endforeach; ?>
</table>

<br /><h3><?php echo __('Internal interfaces') ?></h3>

<table class="extended" cellspacing="0">
<tr>
<th><?php echo __('Count') ?></th>
<td><?php echo $ivals[Iface_Model::TYPE_INTERNAL]['count'] ?></td>
</tr>
<tr>
<th><?php echo __('Names') ?></th>
<td><?php foreach ($ivals[Iface_Model::TYPE_INTERNAL]['items'] as $item) echo ($item['name']) ? $item['name'] . ', ' : '' ?></td>
</tr>
</table>
c1bdc1c4 Michal Kliment
<?php if ($this->acl_check_view('Device_active_links_Controller', 'active_links')): ?>
<br /><h3><?php echo __('Device active links') ?></h3>
<?php echo $active_links_grid; ?>
<?php endif; ?>