Revize c1bdc1c4
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
application/views/devices/show.php | ||
---|---|---|
|
||
$links = array();
|
||
|
||
if ($this->acl_check_edit(get_class($this), 'devices'))
|
||
if ($this->acl_check_edit('Devices_Controller', 'devices', $device->user->member_id))
|
||
$links[] = html::anchor('devices/edit/'.$device->id, __('Edit'));
|
||
|
||
if ($this->acl_check_delete('Devices_Controller', 'devices'))
|
||
if ($this->acl_check_delete('Devices_Controller', 'devices', $device->user->member_id))
|
||
$links[] = html::anchor('devices/delete/'.$device->id, __('Delete'), array('class' => 'delete_link'));
|
||
|
||
if (Settings::get('syslog_ng_mysql_api_enabled'))
|
||
if (Settings::get('syslog_ng_mysql_api_enabled') &&
|
||
$this->acl_check_view('Device_logs_Controller', 'device_log', $device->user->member_id))
|
||
{
|
||
$links[] = html::anchor('device_logs/show_by_device/'.$device->id, __('Show logs'));
|
||
}
|
||
|
||
if (module::e('notification') &&
|
||
$this->acl_check_new('Notifications_Controller', 'device'))
|
||
{
|
||
$links[] = html::anchor(
|
||
'notifications/device/'.$device->id, __('Notifications'),
|
||
array('title' => __('Set notification to device admins'))
|
||
);
|
||
}
|
||
|
||
if ($this->acl_check_view('Devices_Controller', 'export', $device->user->member_id))
|
||
$links[] = html::anchor('devices/export/'.$device->id, __('Export'));
|
||
|
||
$links[] = html::anchor('devices/export/'.$device->id, __('Export'));
|
||
if ($this->acl_check_view('Devices_Controller', 'map', $device->user->member_id))
|
||
$links[] = html::anchor('devices/map/'.$device->id, __('Show subdevices tree'));
|
||
|
||
$links[] = html::anchor('devices/map/'.$device->id, __('Show subdevices tree'));
|
||
$links[] = html::anchor('devices/topology/'.$device->id, __('Show topology'));
|
||
|
||
if (Settings::get('monitoring_enabled'))
|
||
{
|
||
... | ... | |
<th><?php echo __('Type') ?></th>
|
||
<td><?php echo $device_type ?></td>
|
||
</tr>
|
||
<?php if ($this->acl_check_view(get_class($this), 'login')): ?>
|
||
<?php if ($this->acl_check_view('Devices_Controller', 'login')): ?>
|
||
<tr>
|
||
<th><?php echo __('Login name') ?></th>
|
||
<td><?php echo $device->login ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($this->acl_check_view(get_class($this), 'password')): ?>
|
||
<?php if ($this->acl_check_view('Devices_Controller', 'password')): ?>
|
||
<tr>
|
||
<th><?php echo __('Password') ?></th>
|
||
<td><?php echo $device->password ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($device->price): ?>
|
||
<?php if (Settings::get('finance_enabled') && $device->price): ?>
|
||
<tr>
|
||
<th><?php echo __('Price') ?></th>
|
||
<td><?php echo $device->price ?></td>
|
||
<td><?php echo money::format($device->price) ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Monthly payment rate') ?></th>
|
||
<td><?php echo $device->payment_rate ?></td>
|
||
<td><?php echo money::format($device->payment_rate) ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<?php if ($device->buy_date != '' && $device->buy_date != '1970-01-01'): ?>
|
||
<?php if (Settings::get('finance_enabled') && $device->buy_date != '' && $device->buy_date != '1970-01-01'): ?>
|
||
<tr>
|
||
<th><?php echo __('Buy date') ?></th>
|
||
<td><?php echo $device->buy_date ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<?php if ($device->access_time): ?>
|
||
<tr>
|
||
<th><?php echo __('Last access time') ?></th>
|
||
<td><?php echo $device->access_time ?> (<?php echo callback::datetime_diff($device, 'access_time') ?>)</td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<tr>
|
||
<th><?php echo __('Location address') ?></th>
|
||
<td>
|
||
<?php if ($this->acl_check_view('Address_points_Controller', 'address_point')): ?>
|
||
<a href="<?php echo url_lang::base() ?>address_points/show/<?php echo $device->address_point->id ?>"><?php echo $device->address_point; ?></a>
|
||
<?php else: ?>
|
||
<?php echo $device->address_point; ?>
|
||
<?php endif ?>
|
||
</td>
|
||
</tr>
|
||
<?php if ($gps != ''): ?>
|
||
... | ... | |
<td><?php echo $gps ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($device->connection_requests->count()): $cr_model = $device->connection_requests->current(); ?>
|
||
<tr>
|
||
<th><?php echo __('Created from connection request') ?></th>
|
||
<td><?php echo html::anchor('connection_requests/show/' . $cr_model->id, $cr_model->id . ' (' . $cr_model->created_at . ')') ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<tr>
|
||
<th><?php echo __('Comment') ?></th>
|
||
<td><?php echo $device->comment ?></td>
|
||
</tr>
|
||
<?php if ($this->acl_check_view('Device_active_links_Controller', 'display_device_active_links') && $active_links):?>
|
||
<tr>
|
||
<th><?php echo __('Device active links') ?></th>
|
||
<td>
|
||
<?php callback::device_active_links($device, 'device_show') ?>
|
||
</td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
</table>
|
||
|
||
<?php if (!empty($gps)): ?>
|
||
<a href="http://maps.google.com/maps?f=q&hl=<?php echo $lang ?>&geocode=&q=<?php echo $gpsx ?>,<?php echo $gpsy ?>&z=18&t=h&ie=UTF8" target="_blank">
|
||
<img alt="<?php echo __('Address point detail') ?>" src="http://maps.google.com/maps/api/staticmap?center=<?php echo $gpsx ?>,<?php echo $gpsy ?>&zoom=18&maptype=hybrid&size=300x300&markers=color:red%7C<?php echo $gpsx ?>,<?php echo $gpsy ?>&sensor=false" style="float: right; margin-right: 10px;" />
|
||
</a>
|
||
<div id="ap_gmap" style="float: <?php echo ($this->popup ? 'left' : 'right');?>">
|
||
<a class="gmap" href="http://maps.google.com/maps?f=q&hl=<?php echo $lang ?>&geocode=&q=<?php echo $gpsx ?>,<?php echo $gpsy ?>&z=18&t=h&ie=UTF8" target="_blank">
|
||
<img alt="<?php echo __('Address point detail') ?>" src="http://maps.google.com/maps/api/staticmap?center=<?php echo $gpsx ?>,<?php echo $gpsy ?>&zoom=18&maptype=hybrid&size=300x300&markers=color:red%7C<?php echo $gpsx ?>,<?php echo $gpsy ?>&sensor=false" style="float: right; margin-right: 10px;" />
|
||
</a>
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<br class="clear" />
|
||
... | ... | |
|
||
<br />
|
||
|
||
<?php if ($this->acl_check_view('Ifaces_Controller', 'iface', $device->user->member_id)): ?>
|
||
|
||
<div id="tabs">
|
||
<ul class="tabs" style="font-size: 12px;">
|
||
<li class="ui-corner-all"><a href="#interfaces"><?php echo __('Interfaces') ?></a></li>
|
||
... | ... | |
<li class="ui-corner-all"><a href="#special_interfaces"><?php echo __('Special interfaces') ?></a></li>
|
||
<?php endif ?>
|
||
<?php if ($bridge_ifaces != ''): ?>
|
||
<li class="ui-corner-all"><a href="#bridges"><?php echo __('Bridges') ?></a></li>
|
||
<li class="ui-corner-all"><a href="#bridge_interfaces"><?php echo __('Bridge interfaces') ?></a></li>
|
||
<?php endif ?>
|
||
<?php if ($port_ifaces != ''): ?>
|
||
<li class="ui-corner-all"><a href="#ports"><?php echo __('Ports') ?></a></li>
|
||
... | ... | |
</ul>
|
||
|
||
<!-- interfaces -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'iface', $device->user->member_id)) { ?>
|
||
<div id="interfaces">
|
||
<?php echo $ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<!-- internal interfaces -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'iface', $device->user->member_id)) { ?>
|
||
<div id="internal_interfaces">
|
||
<?php echo $internal_ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<!-- ethernet interfaces -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'iface', $device->user->member_id)) { ?>
|
||
<div id="ethernet_interfaces">
|
||
<?php echo $ethernet_ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<!-- wireless interfaces -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'iface', $device->user->member_id)) { ?>
|
||
<div id="wireless_interfaces">
|
||
<?php echo $wireless_ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<!-- vlan interfaces -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'iface', $device->user->member_id)) { ?>
|
||
<div id="vlan_interfaces">
|
||
<?php echo $vlan_ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<!-- bridge interfaces -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'iface', $device->user->member_id)) { ?>
|
||
<div id="bridge_interfaces">
|
||
<?php echo $bridge_ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<!-- ports -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'port', $device->user->member_id)) { ?>
|
||
<div id="ports">
|
||
<?php echo $port_ifaces ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
</div>
|
||
|
||
<br />
|
||
|
||
<?php endif ?>
|
||
|
||
<!-- ip addresses -->
|
||
<?php if ($this->acl_check_view(get_class($this), 'ip_address', $device->user->member_id)) { ?>
|
||
<?php if ($this->acl_check_view('Ip_addresses_Controller', 'ip_address', $device->user->member_id)) { ?>
|
||
<h3><a id="device_ip_addresses_link" name="ip_addresses"><?php echo __('IP addresses') ?>
|
||
<img src="<?php echo url::base() ?>media/images/icons/ico_<?php echo (!$table_ip_addresses) ? 'add' : 'minus' ?>.gif" id="device_ip_addresses_button"></a></h3>
|
||
<div id="device_ip_addresses" class="<?php echo (!$table_ip_addresses) ? 'dispNone' : '' ?>">
|
||
... | ... | |
|
||
<!-- device engineers -->
|
||
<div style="float:left; width: 50%">
|
||
<?php //if ($this->acl_check_view(get_class($this),'engineer',$device->user->member_id)) { ?>
|
||
<?php if ($this->acl_check_view('Devices_Controller', 'engineer',$device->user->member_id)) { ?>
|
||
<h3><a id="device_engineers_link" name="engineers"><?php echo __('Device engineers') ?>
|
||
<img src="<?php echo url::base() ?>media/images/icons/ico_<?php echo ($count_engineers == 0) ? 'add' : 'minus' ?>.gif" id="device_engineers_button"></a>
|
||
<?php echo help::hint('engineers') ?></h3>
|
||
<div id="device_engineers" class="<?php echo ($count_engineers == 0) ? 'dispNone' : '' ?>">
|
||
<?php echo $table_device_engineers ?>
|
||
</div>
|
||
<?php //} ?>
|
||
<?php } ?>
|
||
</div>
|
||
|
||
<!-- device admins -->
|
||
<div style="float:left; margin-left:0px;">
|
||
<?php if ($this->acl_check_view(get_class($this), 'admin', $device->user->member_id)) { ?>
|
||
<?php if ($this->acl_check_view('Devices_Controller', 'admin', $device->user->member_id)) { ?>
|
||
<h3><a id="device_admins_link" name="admins"><?php echo __('Device admins') ?>
|
||
<img src="<?php echo url::base() ?>media/images/icons/ico_<?php echo ($count_admins == 0) ? 'add' : 'minus' ?>.gif" id="device_admins_button"></a>
|
||
<?php echo help::hint('admins') ?></h3>
|
Také k dispozici: Unified diff
Release 1.1.0