Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1886

Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)

Upravy:
- drobne vylepseni v praci s IP adresami (dialogy)

Zobrazit rozdíly:

freenetis/branches/1.1/application/helpers/callback.php
*/
public static function ip_address_field($item, $name, $args = array())
{
$class = '';
$class = 'popup_link';
$title = '';
$ip_address = (isset($args[0]) && $args[0]) ?
freenetis/branches/1.1/application/controllers/members.php
/******** VoIP ***********/
if (Settings::get('voip_enabled'))
{
// VoIP SIP model
$voip_sip = new Voip_sip_Model();
// Gets sips
$voip = $voip_sip->get_all_record_by_member_limited($member->id);
// Has driver?
$has_driver = Billing::instance()->has_driver();
// Account
$b_account = null;
// Check account only if have SIP
if ($voip->count())
{
$b_account = Billing::instance()->get_account($member->id);
}
if (Settings::get('voip_enabled'))
{
// VoIP SIP model
$voip_sip = new Voip_sip_Model();
// Gets sips
$voip = $voip_sip->get_all_record_by_member_limited($member->id);
// Has driver?
$has_driver = Billing::instance()->has_driver();
// Account
$b_account = null;
// Check account only if have SIP
if ($voip->count())
{
$b_account = Billing::instance()->get_account($member->id);
}
$voip_grid = new Grid('members', null, array
(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false
));
$voip_grid = new Grid('members', null, array
(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false
));
$voip_grid->field('id')
->label('ID');
$voip_grid->field('id')
->label('ID');
$voip_grid->field('callerid')
->label(__('Number'));
$voip_grid->field('callerid')
->label(__('Number'));
$actions = $voip_grid->grouped_action_field();
$actions = $voip_grid->grouped_action_field();
$actions->add_action('user_id')
->icon_action('phone')
->url('voip/show')
->label('Show VoIP account');
$actions->add_action('user_id')
->icon_action('phone')
->url('voip/show')
->label('Show VoIP account');
$actions->add_action('user_id')
->icon_action('member')
->url('users/show')
->label('Show user who own this VoIP account');
$actions->add_action('user_id')
->icon_action('member')
->url('users/show')
->label('Show user who own this VoIP account');
$voip_grid->datasource($voip);
$voip_grid->datasource($voip);
if ($has_driver && $b_account)
{
$voip_grid->add_new_button(
'voip_calls/show_by_member/'.$member->id,
__('List of all calls')
);
if ($has_driver && $b_account)
{
$voip_grid->add_new_button(
'voip_calls/show_by_member/'.$member->id,
__('List of all calls')
);
if ($member->id != 1)
{
$voip_grid->add_new_button(
'transfers/add_voip/'.$account->id,
__('Recharge VoIP credit')
);
}
}
}
if ($member->id != 1)
{
$voip_grid->add_new_button(
'transfers/add_voip/'.$account->id,
__('Recharge VoIP credit')
);
}
}
}
// finds date of expiration of member fee
$expiration_date = (isset($account)) ? self::get_expiration_date($account) : '';
freenetis/branches/1.1/application/controllers/vlans.php
->callback('callback::ports_field');
$grid->callback_field('ip_address')
->label('IP address')
->callback('callback::ip_address_field');
$grid->datasource($vlan->get_devices_of_vlan());
freenetis/branches/1.1/application/views/ip_addresses/show.php
$links = array();
if (!$ip_address->member_id && $this->acl_check_edit('Devices_Controller', 'ip_address'))
$links[] = html::anchor('ip_addresses/edit/'.$ip_address->id, __('Edit'));
$links[] = html::anchor('ip_addresses/edit/'.$ip_address->id, __('Edit'), array('class' => 'popup_link'));
if (!$ip_address->member_id && $this->acl_check_delete('Devices_Controller', 'ip_address'))
$links[] = html::anchor('ip_addresses/delete/'.$ip_address->id, __('Delete'));
if ($this->acl_check_new('Messages_Controller', 'ip_address'))

Také k dispozici: Unified diff