MT#3961 Translate everything

gjungwirth/test_sleeps
Gerhard Jungwirth 12 years ago
parent f1a210fafb
commit d989abc8f9

@ -21,11 +21,11 @@ sub root :Chained('/') :PathPart('callflow') :CaptureArgs(0) {
my ( $self, $c ) = @_;
$c->stash->{capture_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "timestamp", search => 0, title => "Timestamp", literal_sql => "min(timestamp)" },
{ name => "call_id", search => 1, title => "Call-ID" },
{ name => "caller_uuid", search => 1, title => "Caller UUID" },
{ name => "callee_uuid", search => 1, title => "Callee UUID" },
{ name => "cseq_method", search => 1, title => "Method" },
{ name => "timestamp", search => 0, title => $c->loc('Timestamp'), literal_sql => "min(timestamp)" },
{ name => "call_id", search => 1, title => $c->loc('Call-ID') },
{ name => "caller_uuid", search => 1, title => $c->loc('Caller UUID') },
{ name => "callee_uuid", search => 1, title => $c->loc('Callee UUID') },
{ name => "cseq_method", search => 1, title => $c->loc('Method') },
]);
$c->stash->{calls_rs} = $c->model('DB')->resultset('messages')->search(undef, {

@ -44,14 +44,14 @@ sub list_customer :Chained('/') :PathPart('customer') :CaptureArgs(0) {
my ($self, $c) = @_;
$c->stash->{contract_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "external_id", search => 1, title => "External #" },
{ name => "contact.reseller.name", search => 1, title => "Reseller" },
{ name => "contact.email", search => 1, title => "Contact Email" },
{ name => "billing_mappings.product.name", search => 1, title => "Product" },
{ name => "billing_mappings.billing_profile.name", search => 1, title => "Billing Profile" },
{ name => "status", search => 1, title => "Status" },
{ name => "max_subscribers", search => 1, title => "Max Number of Subscribers" },
{ name => "id", search => 1, title => $c->loc("#") },
{ name => "external_id", search => 1, title => $c->loc("External #") },
{ name => "contact.reseller.name", search => 1, title => $c->loc("Reseller") },
{ name => "contact.email", search => 1, title => $c->loc("Contact Email") },
{ name => "billing_mappings.product.name", search => 1, title => $c->loc("Product") },
{ name => "billing_mappings.billing_profile.name", search => 1, title => $c->loc("Billing Profile") },
{ name => "status", search => 1, title => $c->loc("Status") },
{ name => "max_subscribers", search => 1, title => $c->loc("Max Number of Subscribers") },
]);
my $rs = NGCP::Panel::Utils::Contract::get_contract_rs(
@ -99,7 +99,11 @@ sub ajax_reseller_filter :Chained('list_customer') :PathPart('ajax/reseller') :A
my ($self, $c, $reseller_id) = @_;
unless($reseller_id && $reseller_id->is_int) {
$c->flash(messages => [{type => 'error', text => 'Invalid reseller id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid reseller id detected',
desc => $c->loc('Invalid reseller id detected'),
);
$c->response->redirect($c->uri_for());
return;
}
@ -110,11 +114,11 @@ sub ajax_reseller_filter :Chained('list_customer') :PathPart('ajax/reseller') :A
join => 'contact',
});
my $reseller_customer_columns = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "external_id", search => 1, title => "External #" },
{ name => "billing_mappings.product.name", search => 1, title => "Product" },
{ name => "contact.email", search => 1, title => "Contact Email" },
{ name => "status", search => 1, title => "Status" },
{ name => "id", search => 1, title => $c->loc("#") },
{ name => "external_id", search => 1, title => $c->loc("External #") },
{ name => "billing_mappings.product.name", search => 1, title => $c->loc("Product") },
{ name => "contact.email", search => 1, title => $c->loc("Contact Email") },
{ name => "status", search => 1, title => $c->loc("Status") },
]);
NGCP::Panel::Utils::Datatables::process($c, $rs, $reseller_customer_columns);
$c->detach( $c->view("JSON") );
@ -182,13 +186,13 @@ sub create :Chained('list_customer') :PathPart('create') :Args(0) {
delete $c->session->{created_objects}->{contact};
delete $c->session->{created_objects}->{billing_profile};
my $contract_id = $contract->id;
$c->flash(messages => [{type => 'success', text => "Customer #$contract_id successfully created"}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Customer #[_1] successfully created',$contract_id) }]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create customer contract.",
desc => $c->loc('Failed to create customer contract.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/contract'));
@ -205,7 +209,7 @@ sub base :Chained('list_customer') :PathPart('') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "customer contract id '$contract_id' is not valid",
desc => "Invalid customer contract id",
desc => $c->loc('Invalid customer contract id'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/customer'));
return;
@ -236,7 +240,11 @@ sub base :Chained('list_customer') :PathPart('') :CaptureArgs(1) {
}
unless(defined($contract_rs->first)) {
$c->flash(messages => [{type => 'error', text => 'Customer was not found'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Customer was not found',
desc => $c->loc('Customer was not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/customer'));
}
@ -260,7 +268,7 @@ sub base :Chained('list_customer') :PathPart('') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create contract balance.",
desc => $c->loc('Failed to create contract balance.'),
);
$c->response->redirect($c->uri_for());
return;
@ -276,19 +284,19 @@ sub base :Chained('list_customer') :PathPart('') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "No product for customer contract id $contract_id found",
desc => "No product for this customer contract found.",
desc => $c->loc('No product for this customer contract found.'),
) unless($product_id);
my $product = $c->model('DB')->resultset('products')->find($product_id);
NGCP::Panel::Utils::Message->error(
c => $c,
error => "No product with id $product_id for customer contract id $contract_id found",
desc => "Invalid product id for this customer contract.",
desc => $c->loc('Invalid product id for this customer contract.'),
) unless($product);
$c->stash->{pbxgroup_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "name", search => 1, title => "Name" },
{ name => "extension", search => 1, title => "Extension" },
{ name => "id", search => 1, title => $c->loc("#") },
{ name => "name", search => 1, title => $c->loc("Name") },
{ name => "extension", search => 1, title => $c->loc("Extension") },
]);
my $subs = NGCP::Panel::Utils::Subscriber::get_custom_subscriber_struct(
@ -404,13 +412,13 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) {
delete $c->session->{created_objects}->{contact};
delete $c->session->{created_objects}->{billing_profile};
my $contract_id = $contract->id;
$c->flash(messages => [{type => 'success', text => "Customer #$contract_id successfully updated"}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Customer #[_1] successfully updated',$contract_id) }]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update customer contract.",
desc => $c->loc('Failed to update customer contract.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/customer'));
@ -426,7 +434,7 @@ sub terminate :Chained('base') :PathPart('terminate') :Args(0) {
my $contract = $c->stash->{contract};
if ($contract->id == 1) {
$c->flash(messages => [{type => 'error', text => 'Cannot terminate contract with the id 1'}]);
$c->flash(messages => [{type => 'error', text => $c->loc('Cannot terminate contract with the id 1')}]);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/contract'));
}
@ -440,12 +448,12 @@ sub terminate :Chained('base') :PathPart('terminate') :Args(0) {
contract => $contract,
);
}
$c->flash(messages => [{type => 'success', text => "Customer successfully terminated"}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Customer successfully terminated') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to terminate contract.",
desc => $c->loc('Failed to terminate contract.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/contract'));
@ -474,7 +482,7 @@ sub subscriber_create :Chained('base') :PathPart('subscriber/create') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "tried to exceed max number of subscribers of " . $c->stash->{contract}->max_subscribers,
desc => "Maximum number of subscribers for this customer reached",
desc => $c->loc('Maximum number of subscribers for this customer reached'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/customer/details', [$c->stash->{contract}->id])
@ -596,12 +604,12 @@ sub subscriber_create :Chained('base') :PathPart('subscriber/create') :Args(0) {
delete $c->session->{created_objects}->{domain};
delete $c->session->{created_objects}->{group};
$c->flash(messages => [{type => 'success', text => 'Subscriber successfully created.'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Subscriber successfully created.') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create subscriber.",
desc => $c->loc('Failed to create subscriber.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -623,7 +631,11 @@ sub edit_fraud :Chained('base') :PathPart('fraud/edit') :Args(1) {
} elsif($type eq "day") {
$form = NGCP::Panel::Form::CustomerDailyFraud->new;
} else {
$c->flash(messages => [{type => 'error', text => "Invalid fraud interval '$type'!"}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => "Invalid fraud interval '$type'!",
desc => $c->loc("Invalid fraud interval '[_1]'!",$type),
);
$c->response->redirect($c->uri_for_action("/customer/details", [$c->stash->{contract}->id]));
return;
}
@ -638,7 +650,7 @@ sub edit_fraud :Chained('base') :PathPart('fraud/edit') :Args(1) {
item => $fraud_prefs,
);
if($posted && $form->validated) {
$c->flash(messages => [{type => 'success', text => 'Fraud settings successfully changed!'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Fraud settings successfully changed!') }]);
$c->response->redirect($c->uri_for_action("/customer/details", [$c->stash->{contract}->id]));
return;
}
@ -656,7 +668,11 @@ sub delete_fraud :Chained('base') :PathPart('fraud/delete') :Args(1) {
} elsif($type eq "day") {
$type = "daily";
} else {
$c->flash(messages => [{type => 'error', text => "Invalid fraud interval '$type'!"}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => "Invalid fraud interval '$type'!",
desc => $c->loc("Invalid fraud interval '[_1]'!",$type),
);
$c->response->redirect($c->uri_for_action("/customer/details", [$c->stash->{contract}->id]));
return;
}
@ -673,13 +689,13 @@ sub delete_fraud :Chained('base') :PathPart('fraud/delete') :Args(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to clear fraud interval.",
desc => $c->loc('Failed to clear fraud interval.'),
);
$c->response->redirect($c->uri_for_action("/customer/details", [$c->stash->{contract}->id]));
return;
}
}
$c->flash(messages => [{type => 'success', text => "Successfully cleared fraud interval!"}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully cleared fraud interval!') }]);
$c->response->redirect($c->uri_for_action("/customer/details", [$c->stash->{contract}->id]));
return;
}
@ -697,7 +713,7 @@ sub edit_balance :Chained('base') :PathPart('balance/edit') :Args(0) {
item => $c->stash->{balance},
);
if($posted && $form->validated) {
$c->flash(messages => [{type => 'success', text => 'Account balance successfully changed!'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Account balance successfully changed!') }]);
$c->response->redirect($c->uri_for_action("/customer/details", [$c->stash->{contract}->id]));
return;
}
@ -727,7 +743,7 @@ sub pbx_group_create :Chained('base') :PathPart('pbx/group/create') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "tried to exceed max number of subscribers of " . $c->stash->{contract}->max_subscribers,
desc => "Maximum number of subscribers for this customer reached",
desc => $c->loc('Maximum number of subscribers for this customer reached'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/customer/details', [$c->stash->{contract}->id])
@ -741,7 +757,7 @@ sub pbx_group_create :Chained('base') :PathPart('pbx/group/create') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => 'cannot create pbx group without having an admin subscriber',
desc => "Can't create a PBX group without having an administrative subscriber.",
desc => $c->loc("Can't create a PBX group without having an administrative subscriber."),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/customer/details', $c->req->captures));
}
@ -802,12 +818,12 @@ sub pbx_group_create :Chained('base') :PathPart('pbx/group/create') :Args(0) {
$c->session->{created_objects}->{group} = { id => $group->id };
});
$c->flash(messages => [{type => 'success', text => 'PBX group successfully created.'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('PBX group successfully created.')}]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create PBX group.",
desc => $c->loc('Failed to create PBX group.'),
);
}
@ -817,7 +833,7 @@ sub pbx_group_create :Chained('base') :PathPart('pbx/group/create') :Args(0) {
$c->stash(
create_flag => 1,
form => $form,
description => 'PBX Group',
description => $c->loc('PBX Group'),
);
}
@ -829,7 +845,7 @@ sub pbx_group_base :Chained('base') :PathPart('pbx/group') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid voip pbx group id $group_id",
desc => "PBX group with id $group_id does not exist.",
desc => $c->loc('PBX group with id [_1] does not exist.',$group_id),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/customer/details', [$c->req->captures->[0]]));
}
@ -885,12 +901,12 @@ sub pbx_group_edit :Chained('pbx_group_base') :PathPart('edit') :Args(0) {
}
});
$c->flash(messages => [{type => 'success', text => 'PBX group successfully updated.'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('PBX group successfully updated.') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update PBX group.",
desc => $c->loc('Failed to update PBX group.'),
);
}
@ -952,7 +968,7 @@ sub pbx_device_create :Chained('base') :PathPart('pbx/device/create') :Args(0) {
c => $c,
error => "invalid provisioning subscriber_id '".$line->field('subscriber_id')->value.
"' for contract id '".$c->stash->{contract}->id."'",
desc => "Invalid provisioning subscriber id detected.",
desc => $c->loc('Invalid provisioning subscriber id detected.'),
);
# TODO: throw exception here!
$err = 1;
@ -970,13 +986,13 @@ sub pbx_device_create :Chained('base') :PathPart('pbx/device/create') :Args(0) {
}
});
unless($err) {
$c->flash(messages => [{type => 'success', text => 'PBX device successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('PBX device successfully created') }]);
}
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create PBX device",
desc => $c->loc('Failed to create PBX device'),
);
}
@ -986,7 +1002,7 @@ sub pbx_device_create :Chained('base') :PathPart('pbx/device/create') :Args(0) {
$c->stash(
create_flag => 1,
form => $form,
description => 'PBX Device',
description => $c->loc('PBX Device'),
);
}
@ -998,7 +1014,7 @@ sub pbx_device_base :Chained('base') :PathPart('pbx/device') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid voip pbx device id $dev_id",
desc => "PBX device with id $dev_id does not exist.",
desc => $c->loc('PBX device with id [_1] does not exist.',$dev_id),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/customer/details', [$c->req->captures->[0]]));
}
@ -1006,7 +1022,7 @@ sub pbx_device_base :Chained('base') :PathPart('pbx/device') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid voip pbx device id $dev_id for customer id '".$c->stash->{contract}->id."'",
desc => "PBX device with id $dev_id does not exist for this customer.",
desc => $c->loc('PBX device with id [_1] does not exist for this customer.',$dev_id),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/customer/details', [$c->req->captures->[0]]));
}
@ -1076,7 +1092,7 @@ sub pbx_device_edit :Chained('pbx_device_base') :PathPart('edit') :Args(0) {
c => $c,
error => "invalid provisioning subscriber_id '".$line->field('subscriber_id')->value.
"' for contract id '".$c->stash->{contract}->id."'",
desc => "Invalid provisioning subscriber id detected.",
desc => $c->loc('Invalid provisioning subscriber id detected.'),
);
# TODO: throw exception here!
$err = 1;
@ -1094,13 +1110,13 @@ sub pbx_device_edit :Chained('pbx_device_base') :PathPart('edit') :Args(0) {
}
});
unless($err) {
$c->flash(messages => [{type => 'success', text => 'PBX device successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('PBX device successfully updated') }]);
}
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update PBX device",
desc => $c->loc('Failed to update PBX device'),
);
}
@ -1110,7 +1126,7 @@ sub pbx_device_edit :Chained('pbx_device_base') :PathPart('edit') :Args(0) {
$c->stash(
edit_flag => 1,
form => $form,
description => 'PBX Device',
description => $c->loc('PBX Device'),
);
}
@ -1119,12 +1135,12 @@ sub pbx_device_delete :Chained('pbx_device_base') :PathPart('delete') :Args(0) {
try {
$c->stash->{pbx_device}->delete;
$c->flash(messages => [{type => 'success', text => 'PBX Device successfully deleted' }]);
$c->flash(messages => [{type => 'success', text => $c->loc('PBX Device successfully deleted') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "failed to delete PBX device with id '".$c->stash->{pbx_device}->id."': $e",
desc => "Failed to delete PBX device",
desc => $c->loc('Failed to delete PBX device'),
);
}
@ -1147,7 +1163,7 @@ sub pbx_device_sync :Chained('pbx_device_base') :PathPart('sync') :Args(0) {
);
if($posted && $form->validated) {
$c->flash(messages => [{type => 'success', text => 'Successfully redirected request to device'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully redirected request to device') }]);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/customer/details', [ $c->req->captures->[0] ]));
}
my $dev = $c->stash->{pbx_device};

@ -33,10 +33,10 @@ sub base :Chained('/') :PathPart('device') :CaptureArgs(0) {
$devmod_rs = $devmod_rs->search({ reseller_id => $c->user->voip_subscriber->contract->contact->reseller_id });
}
$c->stash->{devmod_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'reseller.name', search => 1, title => 'Reseller' },
{ name => 'vendor', search => 1, title => 'Vendor' },
{ name => 'model', search => 1, title => 'Model' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'vendor', search => 1, title => $c->loc('Vendor') },
{ name => 'model', search => 1, title => $c->loc('Model') },
]);
my $devfw_rs = $c->model('DB')->resultset('autoprov_firmwares');
@ -55,12 +55,12 @@ sub base :Chained('/') :PathPart('device') :CaptureArgs(0) {
}
$c->stash->{devfw_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'device.reseller.name', search => 1, title => 'Reseller' },
{ name => 'device.vendor', search => 1, title => 'Device Vendor' },
{ name => 'device.model', search => 1, title => 'Device Model' },
{ name => 'filename', search => 1, title => 'Firmware File' },
{ name => 'version', search => 1, title => 'Version' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'device.reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'device.vendor', search => 1, title => $c->loc('Device Vendor') },
{ name => 'device.model', search => 1, title => $c->loc('Device Model') },
{ name => 'filename', search => 1, title => $c->loc('Firmware File') },
{ name => 'version', search => 1, title => $c->loc('Version') },
]);
my $devconf_rs = $c->model('DB')->resultset('autoprov_configs');
@ -79,11 +79,11 @@ sub base :Chained('/') :PathPart('device') :CaptureArgs(0) {
}
$c->stash->{devconf_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'device.reseller.name', search => 1, title => 'Reseller' },
{ name => 'device.vendor', search => 1, title => 'Device Vendor' },
{ name => 'device.model', search => 1, title => 'Device Model' },
{ name => 'version', search => 1, title => 'Version' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'device.reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'device.vendor', search => 1, title => $c->loc('Device Vendor') },
{ name => 'device.model', search => 1, title => $c->loc('Device Model') },
{ name => 'version', search => 1, title => $c->loc('Version') },
]);
my $devprof_rs = $c->model('DB')->resultset('autoprov_profiles');
@ -101,13 +101,13 @@ sub base :Chained('/') :PathPart('device') :CaptureArgs(0) {
});
}
$c->stash->{devprof_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'config.device.reseller.name', search => 1, title => 'Reseller' },
{ name => 'name', search => 1, title => 'Name' },
{ name => 'config.device.vendor', search => 1, title => 'Device Vendor' },
{ name => 'config.device.model', search => 1, title => 'Device Model' },
# { name => 'firmware.filename', search => 1, title => 'Firmware File' },
{ name => 'config.version', search => 1, title => 'Configuration Version' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'config.device.reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'name', search => 1, title => $c->loc('Name') },
{ name => 'config.device.vendor', search => 1, title => $c->loc('Device Vendor') },
{ name => 'config.device.model', search => 1, title => $c->loc('Device Model') },
# { name => 'firmware.filename', search => 1, title => $c->loc('Firmware File') },
{ name => 'config.version', search => 1, title => $c->loc('Configuration Version') },
]);
$c->stash(
@ -195,13 +195,13 @@ sub devmod_create :Chained('base') :PathPart('model/create') :Args(0) :Does(ACL)
delete $c->session->{created_objects}->{reseller};
$c->session->{created_objects}->{device} = { id => $devmod->id };
$c->flash(messages => [{type => 'success', text => 'Successfully created device model'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully created device model')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create device model",
desc => $c->loc('Failed to create device model'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
@ -220,7 +220,7 @@ sub devmod_base :Chained('base') :PathPart('model') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid device model id '$devmod_id'",
desc => "Invalid device model id",
desc => $c->loc('Invalid device model id'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -230,7 +230,7 @@ sub devmod_base :Chained('base') :PathPart('model') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "device model with id '$devmod_id' not found",
desc => "Device model not found",
desc => $c->loc('Device model not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -246,7 +246,7 @@ sub devmod_delete :Chained('devmod_base') :PathPart('delete') :Args(0) :Does(ACL
NGCP::Panel::Utils::Message->error(
c => $c,
error => "failed to delete device model with id '".$c->stash->{devmod}->id."': $e",
desc => "Failed to delete device model",
desc => $c->loc('Failed to delete device model'),
);
}
@ -334,7 +334,7 @@ sub devmod_edit :Chained('devmod_base') :PathPart('edit') :Args(0) :Does(ACL) :A
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update device model",
desc => $c->loc('Failed to update device model'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
@ -351,7 +351,7 @@ sub devmod_download_frontimage :Chained('devmod_base') :PathPart('frontimage') :
my $devmod = $c->stash->{devmod};
unless($devmod->front_image) {
$c->response->body("404 - No front image available for this device model");
$c->response->body($c->loc('404 - No front image available for this device model'));
$c->response->status(404);
return;
}
@ -364,7 +364,7 @@ sub devmod_download_macimage :Chained('devmod_base') :PathPart('macimage') :Args
my $devmod = $c->stash->{devmod};
unless($devmod->mac_image) {
$c->response->body("404 - No mac image available for this device model");
$c->response->body($c->loc('404 - No mac image available for this device model'));
$c->response->status(404);
return;
}
@ -416,13 +416,13 @@ sub devfw_create :Chained('base') :PathPart('firmware/create') :Args(0) :Does(AC
my $devfw = $devmod->create_related('autoprov_firmwares', $form->params);
delete $c->session->{created_objects}->{device};
$c->session->{created_objects}->{firmware} = { id => $devfw->id };
$c->flash(messages => [{type => 'success', text => 'Successfully created device firmware'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully created device firmware')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create device firmware",
desc => $c->loc('Failed to create device firmware'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
@ -441,7 +441,7 @@ sub devfw_base :Chained('base') :PathPart('firmware') :CaptureArgs(1) :Does(ACL)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid device firmware id '$devfw_id'",
desc => "Invalid device firmware id",
desc => $c->loc('Invalid device firmware id'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -451,7 +451,7 @@ sub devfw_base :Chained('base') :PathPart('firmware') :CaptureArgs(1) :Does(ACL)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "device firmware with id '$devfw_id' not found",
desc => "Device firmware not found",
desc => $c->loc('Device firmware not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -462,12 +462,12 @@ sub devfw_delete :Chained('devfw_base') :PathPart('delete') :Args(0) {
try {
$c->stash->{devfw}->delete;
$c->flash(messages => [{type => 'success', text => 'Device firmware successfully deleted' }]);
$c->flash(messages => [{type => 'success', text => $c->loc('Device firmware successfully deleted') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "failed to delete device firmware with id '".$c->stash->{devfw}->id."': $e",
desc => "Failed to delete device firmware",
desc => $c->loc('Failed to delete device firmware'),
);
}
@ -513,13 +513,13 @@ sub devfw_edit :Chained('devfw_base') :PathPart('edit') :Args(0) {
$c->stash->{devfw}->update($form->params);
delete $c->session->{created_objects}->{device};
$c->flash(messages => [{type => 'success', text => 'Successfully updated device firmware'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated device firmware')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update device firmware",
desc => $c->loc('Failed to update device firmware'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
@ -579,13 +579,13 @@ sub devconf_create :Chained('base') :PathPart('config/create') :Args(0) :Does(AC
my $devconf = $devmod->create_related('autoprov_configs', $form->params);
delete $c->session->{created_objects}->{device};
$c->session->{created_objects}->{config} = { id => $devconf->id };
$c->flash(messages => [{type => 'success', text => 'Successfully created device configuration'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully created device configuration')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create device configuration",
desc => $c->loc('Failed to create device configuration'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
@ -604,7 +604,7 @@ sub devconf_base :Chained('base') :PathPart('config') :CaptureArgs(1) :Does(ACL)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid device config id '$devconf_id'",
desc => "Invalid device configuration id",
desc => $c->loc('Invalid device configuration id'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -614,7 +614,7 @@ sub devconf_base :Chained('base') :PathPart('config') :CaptureArgs(1) :Does(ACL)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "device configuration with id '$devconf_id' not found",
desc => "Device configuration not found",
desc => $c->loc('Device configuration not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -625,12 +625,12 @@ sub devconf_delete :Chained('devconf_base') :PathPart('delete') :Args(0) {
try {
$c->stash->{devconf}->delete;
$c->flash(messages => [{type => 'success', text => 'Device configuration successfully deleted' }]);
$c->flash(messages => [{type => 'success', text => $c->loc('Device configuration successfully deleted') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "failed to delete device configuration with id '".$c->stash->{devconf}->id."': $e",
desc => "Failed to delete device configuration",
desc => $c->loc('Failed to delete device configuration'),
);
}
@ -670,7 +670,7 @@ sub devconf_edit :Chained('devconf_base') :PathPart('edit') :Args(0) {
$c->stash->{devconf}->update($form->params);
delete $c->session->{created_objects}->{device};
$c->flash(messages => [{type => 'success', text => 'Successfully updated device configuration'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated device configuration')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
@ -737,13 +737,13 @@ sub devprof_create :Chained('base') :PathPart('profile/create') :Args(0) :Does(A
$c->model('DB')->resultset('autoprov_profiles')->create($form->params);
delete $c->session->{created_objects}->{config};
$c->flash(messages => [{type => 'success', text => 'Successfully created device profile'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully created device profile')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create device profile",
desc => $c->loc('Failed to create device profile'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
@ -762,7 +762,7 @@ sub devprof_base :Chained('base') :PathPart('profile') :CaptureArgs(1) :Does(ACL
NGCP::Panel::Utils::Message->error(
c => $c,
error => "invalid device profile id '$devprof_id'",
desc => "Invalid device profile id",
desc => $c->loc('Invalid device profile id'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -772,7 +772,7 @@ sub devprof_base :Chained('base') :PathPart('profile') :CaptureArgs(1) :Does(ACL
NGCP::Panel::Utils::Message->error(
c => $c,
error => "device profile with id '$devprof_id' not found",
desc => "Device profile not found",
desc => $c->loc('Device profile not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));
}
@ -783,12 +783,12 @@ sub devprof_get_lines :Chained('devprof_base') :PathPart('lines/ajax') :Args(0)
my $resultset = $c->stash->{devprof}->config->device->autoprov_device_line_ranges;
my $cols = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => 'ID' },
{ name => 'name', search => 1, title => 'Name' },
{ name => 'num_lines', search => 1, title => 'Number of Lines/Keys' },
{ name => 'can_private', search => 1, title => 'Private Line' },
{ name => 'can_shared', search => 1, title => 'Shared Line' },
{ name => 'can_blf', search => 1, title => 'BLF Key' },
{ name => 'id', search => 1, title => $c->loc('ID') },
{ name => 'name', search => 1, title => $c->loc('Name') },
{ name => 'num_lines', search => 1, title => $c->loc('Number of Lines/Keys') },
{ name => 'can_private', search => 1, title => $c->loc('Private Line') },
{ name => 'can_shared', search => 1, title => $c->loc('Shared Line') },
{ name => 'can_blf', search => 1, title => $c->loc('BLF Key') },
]);
NGCP::Panel::Utils::Datatables::process($c, $resultset, $cols);
$c->detach( $c->view("JSON") );
@ -800,12 +800,12 @@ sub devprof_delete :Chained('devprof_base') :PathPart('delete') :Args(0) :Does(A
try {
$c->stash->{devprof}->delete;
$c->flash(messages => [{type => 'success', text => 'Device profile successfully deleted' }]);
$c->flash(messages => [{type => 'success', text => $c->loc('Device profile successfully deleted') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "failed to delete device profile with id '".$c->stash->{devprof}->id."': $e",
desc => "Failed to delete device profile",
desc => $c->loc('Failed to delete device profile'),
);
}
@ -846,13 +846,13 @@ sub devprof_edit :Chained('devprof_base') :PathPart('edit') :Args(0) :Does(ACL)
$c->stash->{devprof}->update($form->params);
delete $c->session->{created_objects}->{config};
$c->flash(messages => [{type => 'success', text => 'Successfully updated device profile'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated device profile')}]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update device profile",
desc => $c->loc('Failed to update device profile'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/device'));

@ -26,9 +26,9 @@ sub dom_list :Chained('/') :PathPart('domain') :CaptureArgs(0) {
my $dom_rs = $self->$dispatch_to($c);
$c->stash->{domain_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'domain_resellers.reseller.name', search => 1, title => 'Reseller' },
{ name => 'domain', search => 1, title => 'Domain' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'domain_resellers.reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'domain', search => 1, title => $c->loc('Domain') },
]);
$c->stash(dom_rs => $dom_rs,
@ -64,7 +64,7 @@ sub create :Chained('dom_list') :PathPart('create') :Args() {
NGCP::Panel::Utils::Message->error(
c => $c,
error => 'invalid reseller id for creating pbx domain',
desc => 'Invalid reseller id detected.',
desc => $c->loc('Invalid reseller id detected.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/domain'));
}
@ -76,7 +76,7 @@ sub create :Chained('dom_list') :PathPart('create') :Args() {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "reseller with id $reseller_id not found when creating pbx domain",
desc => 'Reseller not found.',
desc => $c->loc('Reseller not found.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/domain'));
}
@ -139,13 +139,13 @@ sub create :Chained('dom_list') :PathPart('create') :Args() {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create domain.",
desc => $c->loc('Failed to create domain.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/domain'));
}
$self->_sip_domain_reload;
$c->flash(messages => [{type => 'success', text => 'Domain successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Domain successfully created') }]);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/domain'));
}
@ -160,7 +160,7 @@ sub base :Chained('/domain/dom_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $domain_id) = @_;
unless($domain_id && $domain_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid domain id detected'}]);
$c->flash(messages => [{type => 'error', text => $c->loc('Invalid domain id detected') }]);
$c->response->redirect($c->uri_for());
$c->detach;
return;
@ -168,7 +168,7 @@ sub base :Chained('/domain/dom_list') :PathPart('') :CaptureArgs(1) {
my $res = $c->stash->{dom_rs}->find($domain_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'Domain does not exist'}]);
$c->flash(messages => [{type => 'error', text => $c->loc('Domain does not exist') }]);
$c->response->redirect($c->uri_for());
$c->detach;
return;
@ -207,7 +207,7 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update domain.",
desc => $c->loc('Failed to update domain.'),
);
$c->response->redirect($c->uri_for());
return;
@ -215,7 +215,7 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) {
$self->_sip_domain_reload;
$c->flash(messages => [{type => 'success', text => 'Domain successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Domain successfully updated') }]);
$c->response->redirect($c->uri_for());
return;
}
@ -240,7 +240,7 @@ sub delete :Chained('base') :PathPart('delete') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete domain.",
desc => $c->loc('Failed to delete domain.'),
);
$c->response->redirect($c->uri_for());
return;
@ -248,7 +248,7 @@ sub delete :Chained('base') :PathPart('delete') :Args(0) {
$self->_sip_domain_reload;
$c->flash(messages => [{type => 'success', text => 'Domain successfully deleted!'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Domain successfully deleted!') }]);
$c->response->redirect($c->uri_for());
}

@ -26,11 +26,11 @@ sub levels_list :Chained('/') :PathPart('ncos') :CaptureArgs(0) {
$c->stash(levels_rs => $levels_rs);
$c->stash->{level_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'reseller.name', search => 1, title => 'Reseller' },
{ name => 'level', search => 1, title => 'Level Name' },
{ name => 'mode', search => 1, title => 'Mode' },
{ name => 'description', search => 1, title => 'Description' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'level', search => 1, title => $c->loc('Level Name') },
{ name => 'mode', search => 1, title => $c->loc('Mode') },
{ name => 'description', search => 1, title => $c->loc('Description') },
]);
$c->stash(template => 'ncos/list.tt');
@ -65,13 +65,21 @@ sub base :Chained('levels_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $level_id) = @_;
unless($level_id && $level_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid NCOS level id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid NCOS level id detected',
desc => $c->loc('Invalid NCOS level id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for);
}
my $res = $c->stash->{levels_rs}->find($level_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'NCOS level does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'NCOS level does not exist',
desc => $c->loc('NCOS level does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for);
}
$c->stash(level_result => $res);
@ -110,12 +118,12 @@ sub edit :Chained('base') :PathPart('edit') {
delete $form->values->{reseller};
$level->update($form->values);
delete $c->session->{created_objects}->{reseller};
$c->flash(messages => [{type => 'success', text => 'NCOS level successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('NCOS level successfully updated') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update NCOS level.",
desc => $c->loc('Failed to update NCOS level.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/ncos'));
@ -133,12 +141,12 @@ sub delete :Chained('base') :PathPart('delete') {
try {
$c->stash->{level_result}->delete;
$c->flash(messages => [{type => 'success', text => 'NCOS level successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('NCOS level successfully deleted') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete NCOS level.",
desc => $c->loc('Failed to delete NCOS level.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for);
@ -177,12 +185,12 @@ sub create :Chained('levels_list') :PathPart('create') :Args(0) {
}
$level->create($form->values);
delete $c->session->{created_objects}->{reseller};
$c->flash(messages => [{type => 'success', text => 'NCOS level successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('NCOS level successfully created') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create NCOS level.",
desc => $c->loc('Failed to create NCOS level.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/ncos'));
@ -204,9 +212,9 @@ sub pattern_list :Chained('base') :PathPart('pattern') :CaptureArgs(0) {
$c->uri_for_action("/ncos/pattern_root", [$c->req->captures->[0]]));
$c->stash->{pattern_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'pattern', search => 1, title => 'Pattern' },
{ name => 'description', search => 1, title => 'Description' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'pattern', search => 1, title => $c->loc('Pattern') },
{ name => 'description', search => 1, title => $c->loc('Description') },
]);
$c->stash(local_ac_checked => $c->stash->{level_result}->local_ac,
@ -229,13 +237,21 @@ sub pattern_base :Chained('pattern_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $pattern_id) = @_;
unless($pattern_id && $pattern_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid NCOS pattern id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid NCOS pattern id detected',
desc => $c->loc('Invalid NCOS pattern id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{pattern_base_uri});
}
my $res = $c->stash->{pattern_rs}->find($pattern_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'NCOS pattern does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'NCOS pattern does not exist',
desc => $c->loc('NCOS pattern does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{pattern_base_uri});
}
$c->stash(pattern_result => $res);
@ -260,12 +276,12 @@ sub pattern_edit :Chained('pattern_base') :PathPart('edit') {
if($posted && $form->validated) {
try {
$c->stash->{pattern_result}->update($form->values);
$c->flash(messages => [{type => 'success', text => 'NCOS pattern successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('NCOS pattern successfully updated')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update NCOS pattern.",
desc => $c->loc('Failed to update NCOS pattern.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{pattern_base_uri});
@ -283,12 +299,12 @@ sub pattern_delete :Chained('pattern_base') :PathPart('delete') {
try {
$c->stash->{pattern_result}->delete;
$c->flash(messages => [{type => 'success', text => 'NCOS pattern successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('NCOS pattern successfully deleted') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete NCOS pattern.",
desc => $c->loc('Failed to delete NCOS pattern.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{pattern_base_uri});
@ -312,12 +328,12 @@ sub pattern_create :Chained('pattern_list') :PathPart('create') :Args(0) {
if($posted && $form->validated) {
try {
$c->stash->{pattern_rs}->create($form->values);
$c->flash(messages => [{type => 'success', text => 'NCOS pattern successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('NCOS pattern successfully created') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create NCOS pattern.",
desc => $c->loc('Failed to create NCOS pattern.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{pattern_base_uri});
@ -349,12 +365,12 @@ sub pattern_edit_local_ac :Chained('pattern_list') :PathPart('edit_local_ac') :A
if($posted && $form->validated) {
try {
$c->stash->{level_result}->update($form->values);
$c->flash(messages => [{type => 'success', text => 'Setting successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Setting successfully updated') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update NCOS level setting.",
desc => $c->loc('Failed to update NCOS level setting.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{pattern_base_uri});

@ -23,11 +23,11 @@ sub group_list :Chained('/') :PathPart('peering') :CaptureArgs(0) {
my ( $self, $c ) = @_;
$c->stash->{peering_group_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'contract.contact.email', search => 1, title => 'Contact Email' },
{ name => 'name', search => 1, title => 'Name' },
{ name => 'priority', search => 1, title => 'Priority' },
{ name => 'description', search => 1, title => 'Description' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'contract.contact.email', search => 1, title => $c->loc('Contact Email') },
{ name => 'name', search => 1, title => $c->loc('Name') },
{ name => 'priority', search => 1, title => $c->loc('Priority') },
{ name => 'description', search => 1, title => $c->loc('Description') },
]);
$c->stash(template => 'peering/list.tt');
@ -50,7 +50,11 @@ sub base :Chained('group_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $group_id) = @_;
unless($group_id && $group_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid group id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid group id detected',
desc => $c->loc('Invalid group id detected'),
);
$c->response->redirect($c->uri_for());
$c->detach;
return;
@ -58,28 +62,32 @@ sub base :Chained('group_list') :PathPart('') :CaptureArgs(1) {
my $res = $c->model('DB')->resultset('voip_peer_groups')->find($group_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'Peering group does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Peering group does not exist',
desc => $c->loc('Peering group does not exist'),
);
$c->response->redirect($c->uri_for());
$c->detach;
return;
}
$c->stash->{server_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'name', search => 1, title => 'Name' },
{ name => 'ip', search => 1, title => 'IP Address' },
{ name => 'host', search => 1, title => 'Hostname' },
{ name => 'port', search => 1, title => 'Port' },
{ name => 'transport', search => 1, title => 'Protocol' },
{ name => 'weight', search => 1, title => 'Weight' },
{ name => 'via_route', search => 1, title => 'Via Route Set' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'name', search => 1, title => $c->loc('Name') },
{ name => 'ip', search => 1, title => $c->loc('IP Address') },
{ name => 'host', search => 1, title => $c->loc('Hostname') },
{ name => 'port', search => 1, title => $c->loc('Port') },
{ name => 'transport', search => 1, title => $c->loc('Protocol') },
{ name => 'weight', search => 1, title => $c->loc('Weight') },
{ name => 'via_route', search => 1, title => $c->loc('Via Route Set') },
]);
$c->stash->{rules_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'callee_prefix', search => 1, title => 'Callee Prefix' },
{ name => 'callee_pattern', search => 1, title => 'Callee Pattern' },
{ name => 'caller_pattern', search => 1, title => 'Caller Pattern' },
{ name => 'description', search => 1, title => 'Description' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'callee_prefix', search => 1, title => $c->loc('Callee Prefix') },
{ name => 'callee_pattern', search => 1, title => $c->loc('Callee Pattern') },
{ name => 'caller_pattern', search => 1, title => $c->loc('Caller Pattern') },
{ name => 'description', search => 1, title => $c->loc('Description') },
]);
@ -111,12 +119,12 @@ sub edit :Chained('base') :PathPart('edit') {
$c->stash->{group_result}->update($form->custom_get_values);
$self->_sip_lcr_reload;
delete $c->session->{created_objects}->{contract};
$c->flash(messages => [{type => 'success', text => 'Peering group successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->('Peering group successfully updated')}]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update peering group.",
desc => $c->('Failed to update peering group.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for)
@ -132,12 +140,12 @@ sub delete :Chained('base') :PathPart('delete') {
try {
$c->stash->{group_result}->delete;
$self->_sip_lcr_reload;
$c->flash(messages => [{type => 'success', text => 'Peering Group successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Peering Group successfully deleted') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete peering group.",
desc => $c->loc('Failed to delete peering group.'),
);
};
$c->response->redirect($c->uri_for());
@ -167,12 +175,12 @@ sub create :Chained('group_list') :PathPart('create') :Args(0) {
$formdata );
$self->_sip_lcr_reload;
delete $c->session->{created_objects}->{contract};
$c->flash(messages => [{type => 'success', text => 'Peering group successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Peering group successfully created') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create peering group.",
desc => $c->loc('Failed to create peering group.'),
);
};
$c->response->redirect($c->uri_for_action('/peering/root'));
@ -220,12 +228,12 @@ sub servers_create :Chained('servers_list') :PathPart('create') :Args(0) {
try {
$c->stash->{group_result}->voip_peer_hosts->create($form->values);
$self->_sip_lcr_reload;
$c->flash(messages => [{type => 'success', text => 'Peering server successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Peering server successfully created') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create peering server.",
desc => $c->loc('Failed to create peering server.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/peering/servers_root', [$c->req->captures->[0]]));
@ -242,7 +250,11 @@ sub servers_base :Chained('servers_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $server_id) = @_;
unless($server_id && $server_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid peering server id'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid peering server id',
desc => $c->loc('Invalid peering server id'),
);
$c->response->redirect($c->stash->{sr_list_uri});
$c->detach;
return;
@ -250,7 +262,11 @@ sub servers_base :Chained('servers_list') :PathPart('') :CaptureArgs(1) {
my $res = $c->stash->{group_result}->voip_peer_hosts->find($server_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'Peering server does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Peering server does not exist',
desc => $c->loc('Peering server does not exist'),
);
$c->response->redirect($c->stash->{sr_list_uri});
$c->detach;
return;
@ -279,12 +295,12 @@ sub servers_edit :Chained('servers_base') :PathPart('edit') :Args(0) {
try {
$c->stash->{server_result}->update($form->values);
$self->_sip_lcr_reload;
$c->flash(messages => [{type => 'success', text => 'Peering server successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Peering server successfully updated') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update peering server.",
desc => $c->loc('Failed to update peering server.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/peering/servers_root', [$c->req->captures->[0]]));
@ -303,12 +319,12 @@ sub servers_delete :Chained('servers_base') :PathPart('delete') :Args(0) {
try {
$c->stash->{server_result}->delete;
$self->_sip_lcr_reload;
$c->flash(messages => [{type => 'success', text => 'Peering server successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Peering server successfully deleted') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete peering server.",
desc => $c->loc("Failed to delete peering server."),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/peering/servers_root', [$c->req->captures->[0]]));
@ -431,12 +447,12 @@ sub rules_create :Chained('rules_list') :PathPart('create') :Args(0) {
$form->values->{callee_prefix} //= '';
$c->stash->{group_result}->voip_peer_rules->create($form->values);
$self->_sip_lcr_reload;
$c->flash(rules_messages => [{type => 'success', text => 'Peering rule successfully created'}]);
$c->flash(rules_messages => [{type => 'success', text => $c->loc('Peering rule successfully created') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create peering rule.",
desc => $c->loc('Failed to create peering rule.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/peering/servers_root', [$c->req->captures->[0]]));
@ -453,7 +469,11 @@ sub rules_base :Chained('rules_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $rule_id) = @_;
unless($rule_id && $rule_id->is_integer) {
$c->flash(rules_messages => [{type => 'error', text => 'Invalid peering rule id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid peering rule id detected',
desc => $c->loc('Invalid peering rule id detected'),
);
$c->response->redirect($c->stash->{sr_list_uri});
$c->detach;
return;
@ -461,7 +481,11 @@ sub rules_base :Chained('rules_list') :PathPart('') :CaptureArgs(1) {
my $res = $c->stash->{group_result}->voip_peer_rules->find($rule_id);
unless(defined($res)) {
$c->flash(rules_messages => [{type => 'error', text => 'Peering Rule does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Peering Rule does not exist',
desc => $c->loc('Peering Rule does not exist'),
);
$c->response->redirect($c->stash->{sr_list_uri});
$c->detach;
return;
@ -491,12 +515,12 @@ sub rules_edit :Chained('rules_base') :PathPart('edit') :Args(0) {
$form->values->{callee_prefix} //= '';
$c->stash->{rule_result}->update($form->values);
$self->_sip_lcr_reload;
$c->flash(rules_messages => [{type => 'success', text => 'Peering rule successfully changed'}]);
$c->flash(rules_messages => [{type => 'success', text => $c->loc('Peering rule successfully changed') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update peering rule.",
desc => $c->loc("Failed to update peering rule."),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/peering/servers_root', [$c->req->captures->[0]]));
@ -515,12 +539,12 @@ sub rules_delete :Chained('rules_base') :PathPart('delete') :Args(0) {
try {
$c->stash->{rule_result}->delete;
$self->_sip_lcr_reload;
$c->flash(rules_messages => [{type => 'success', text => 'Peering rule successfully deleted'}]);
$c->flash(rules_messages => [{type => 'success', text => $c->loc('Peering rule successfully deleted') }]);
} catch ($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete peering rule.",
desc => $c->loc("Failed to delete peering rule."),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for_action('/peering/servers_root', [$c->req->captures->[0]]));

@ -19,8 +19,8 @@ sub prod_list :Chained('/') :PathPart('product') :CaptureArgs(0) {
class => { 'not in' => ['sippeering', 'pstnpeering', 'reseller'] }
});
$c->stash->{product_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'name', search => 1, title => 'Name' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'name', search => 1, title => $c->loc('Name') },
]);
$c->stash(

@ -29,19 +29,19 @@ sub list_reseller :Chained('/') :PathPart('reseller') :CaptureArgs(0) {
);
$c->stash->{reseller_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "contract_id", search => 1, title => "Contract #" },
{ name => "name", search => 1, title => "Name" },
{ name => "status", search => 1, title => "Status" },
{ name => "id", search => 1, title => $c->loc("#") },
{ name => "contract_id", search => 1, title => $c->loc("Contract #") },
{ name => "name", search => 1, title => $c->loc("Name") },
{ name => "status", search => 1, title => $c->loc("Status") },
]);
# we need this in ajax_contracts also
$c->stash->{contract_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "external_id", search => 1, title => "External #" },
{ name => "contact.email", search => 1, title => "Contact Email" },
{ name => "billing_mappings.billing_profile.name", search => 1, title => "Billing Profile" },
{ name => "status", search => 1, title => "Status" },
{ name => "id", search => 1, title => $c->loc("#") },
{ name => "external_id", search => 1, title => $c->loc("External #") },
{ name => "contact.email", search => 1, title => $c->loc("Contact Email") },
{ name => "billing_mappings.billing_profile.name", search => 1, title => $c->loc("Billing Profile") },
{ name => "status", search => 1, title => $c->loc("Status") },
]);
}
@ -88,12 +88,12 @@ sub create :Chained('list_reseller') :PathPart('create') :Args(0) {
delete $c->session->{created_objects}->{contract};
$c->session->{created_objects}->{reseller} = { id => $reseller->id };
$c->flash(messages => [{type => 'success', text => 'Reseller successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Reseller successfully created') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create reseller.",
desc => $c->loc("Failed to create reseller."),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/reseller'));
@ -108,47 +108,55 @@ sub base :Chained('list_reseller') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $reseller_id) = @_;
unless($reseller_id && $reseller_id->is_int) {
$c->flash(messages => [{type => 'error', text => 'Invalid reseller id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid reseller id detected',
desc => $c->loc('Invalid reseller id detected'),
);
$c->response->redirect($c->uri_for());
return;
}
$c->stash->{contact_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "firstname", search => 1, title => "First Name" },
{ name => "lastname", search => 1, title => "Last Name" },
{ name => "company", search => 1, title => "Company" },
{ name => "email", search => 1, title => "Email" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "firstname", search => 1, title => $c->loc('First Name') },
{ name => "lastname", search => 1, title => $c->loc('Last Name') },
{ name => "company", search => 1, title => $c->loc('Company') },
{ name => "email", search => 1, title => $c->loc('Email') },
]);
$c->stash->{reseller_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "name", search => 1, title => "Name" },
{ name => "status", search => 1, title => "Status" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "name", search => 1, title => $c->loc('Name') },
{ name => "status", search => 1, title => $c->loc('Status') },
]);
$c->stash->{admin_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "login", search => 1, title => "Name" },
{ name => "is_master", title => "Master" },
{ name => "is_active", title => "Active" },
{ name => "read_only", title => "Read-Only" },
{ name => "show_passwords", title => "Show Passwords" },
{ name => "call_data", title => "Show CDRs" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "login", search => 1, title => $c->loc('Name') },
{ name => "is_master", title => $c->loc('Master') },
{ name => "is_active", title => $c->loc('Active') },
{ name => "read_only", title => $c->loc('Read-Only') },
{ name => "show_passwords", title => $c->loc('Show Passwords') },
{ name => "call_data", title => $c->loc('Show CDRs') },
]);
$c->stash->{customer_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "external_id", search => 1, title => "External #" },
{ name => "billing_mappings.product.name", search => 1, title => "Product" },
{ name => "contact.email", search => 1, title => "Contact Email" },
{ name => "status", search => 1, title => "Status" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "external_id", search => 1, title => $c->loc('External #') },
{ name => "billing_mappings.product.name", search => 1, title => $c->loc('Product') },
{ name => "contact.email", search => 1, title => $c->loc('Contact Email') },
{ name => "status", search => 1, title => $c->loc('Status') },
]);
$c->stash->{domain_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "domain", search => 1, title => "Domain" },
{ name => "domain_resellers.reseller.name", search => 1, title => "Reseller" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "domain", search => 1, title => $c->loc('Domain') },
{ name => "domain_resellers.reseller.name", search => 1, title => $c->loc('Reseller') },
]);
$c->stash(reseller => $c->stash->{resellers}->search_rs({ id => $reseller_id }));
unless($c->stash->{reseller}->first) {
$c->flash(messages => [{type => 'error', text => 'Reseller not found'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Reseller not found',
desc => $c->loc('Reseller not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/reseller'));
}
}
@ -221,12 +229,12 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) {
delete $c->session->{created_objects}->{contract};
delete $c->session->{edit_contract_id};
$c->flash(messages => [{type => 'success', text => 'Reseller successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Reseller successfully updated')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update reseller.",
desc => $c->loc('Failed to update reseller.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/reseller'));
@ -245,7 +253,11 @@ sub terminate :Chained('base') :PathPart('terminate') :Args(0) {
my $reseller = $c->stash->{reseller}->first;
if ($reseller->id == 1) {
$c->flash(messages => [{type => 'error', text => 'Cannot terminate reseller with the id 1'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Cannot terminate reseller with the id 1',
desc => $c->loc('Cannot terminate reseller with the id 1'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/reseller'));
}
@ -258,12 +270,12 @@ sub terminate :Chained('base') :PathPart('terminate') :Args(0) {
$self->_handle_reseller_status_change($c,$reseller);
}
});
$c->flash(messages => [{type => 'success', text => 'Successfully terminated reseller'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully terminated reseller')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to terminate reseller.",
desc => $c->loc('Failed to terminate reseller.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/reseller'));
@ -392,7 +404,9 @@ sub create_defaults :Path('create_defaults') :Args(0) {
desc => "Failed to create reseller.",
);
};
$c->flash(messages => [{type => 'success', text => "Reseller successfully created with login <b>".$defaults{admins}->{login}."</b> and password <b>".$defaults{admins}->{md5pass}."</b>, please review your settings below" }]);
$c->flash(messages => [{type => 'success', text =>
$c->loc("Reseller successfully created with login <b>[_1]</b> and password <b>[_2]</b>, please review your settings below",
$defaults{admins}->{login},$defaults{admins}->{md5pass}) }]);
$c->res->redirect($c->uri_for_action('/reseller/details', [$r{resellers}->id]));
$c->detach;
return;

@ -28,10 +28,10 @@ sub set_list :Chained('/') :PathPart('rewrite') :CaptureArgs(0) {
});
}
$c->stash->{set_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => 'id', search => 1, title => '#' },
{ name => 'reseller.name', search => 1, title => 'Reseller' },
{ name => 'name', search => 1, title => 'Name' },
{ name => 'description', search => 1, title => 'Description' },
{ name => 'id', search => 1, title => $c->loc('#') },
{ name => 'reseller.name', search => 1, title => $c->loc('Reseller') },
{ name => 'name', search => 1, title => $c->loc('Name') },
{ name => 'description', search => 1, title => $c->loc('Description') },
]);
$c->stash(template => 'rewrite/set_list.tt');
@ -52,13 +52,21 @@ sub set_base :Chained('set_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $set_id) = @_;
unless($set_id && $set_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid rewrite rule set id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid rewrite rule set id detected',
desc => $c->loc('Invalid rewrite rule set id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/rewrite'));
}
my $res = $c->stash->{sets_rs}->find($set_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'Rewrite rule set does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Rewrite rule set does not exist',
desc => $c->loc('Rewrite rule set does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/rewrite'));
}
$c->stash(set_result => $res);
@ -98,12 +106,12 @@ sub set_edit :Chained('set_base') :PathPart('edit') {
}
$c->stash->{set_result}->update($form->values);
delete $c->session->{created_objects}->{reseller};
$c->flash(messages => [{type => 'success', text => 'Rewrite rule set successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule set successfully updated')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update rewrite rule set.",
desc => $c->loc('Failed to update rewrite rule set.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/rewrite'));
@ -118,12 +126,12 @@ sub set_delete :Chained('set_base') :PathPart('delete') {
try {
$c->stash->{set_result}->delete;
$c->flash(messages => [{type => 'success', text => 'Rewrite rule set successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule set successfully deleted')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete rewrite rule set.",
desc => $c->loc('Failed to delete rewrite rule set.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/rewrite'));
@ -165,12 +173,12 @@ sub set_clone :Chained('set_base') :PathPart('clone') {
});
}
$c->flash(messages => [{type => 'success', text => 'Rewrite rule set successfully cloned'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule set successfully cloned')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to clone rewrite rule set.",
desc => $c->loc('Failed to clone rewrite rule set.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/rewrite'));
@ -216,12 +224,12 @@ sub set_create :Chained('set_list') :PathPart('create') :Args(0) {
}
$c->stash->{sets_rs}->create($form->values);
delete $c->session->{created_objects}->{reseller};
$c->flash(messages => [{type => 'success', text => 'Rewrite rule set successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule set successfully created')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create rewrite rule set.",
desc => $c->loc('Failed to create rewrite rule set.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/rewrite'));
@ -279,7 +287,7 @@ sub rules_root :Chained('rules_list') :PathPart('') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to move rewrite rule.",
desc => $c->loc('Failed to move rewrite rule.'),
);
}
}
@ -334,13 +342,21 @@ sub rules_base :Chained('rules_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $rule_id) = @_;
unless($rule_id && $rule_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid rewrite rule id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid rewrite rule id detected',
desc => $c->loc('Invalid rewrite rule id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{rules_uri});
}
my $res = $c->stash->{rules_rs}->find($rule_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'Rewrite rule does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Rewrite rule does not exist',
desc => $c->loc('Rewrite rule does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{rules_uri});
}
$c->stash(rule_result => $res);
@ -366,12 +382,12 @@ sub rules_edit :Chained('rules_base') :PathPart('edit') {
try {
$c->stash->{rule_result}->update($form->values);
$self->_sip_dialplan_reload();
$c->flash(messages => [{type => 'success', text => 'Rewrite rule successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule successfully updated')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update rewrite rule.",
desc => $c->loc('Failed to update rewrite rule.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{rules_uri});
@ -387,12 +403,12 @@ sub rules_delete :Chained('rules_base') :PathPart('delete') {
try {
$c->stash->{rule_result}->delete;
$self->_sip_dialplan_reload();
$c->flash(messages => [{type => 'success', text => 'Rewrite rule successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule successfully deleted') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete rewrite rule.",
desc => $c->loc('Failed to delete rewrite rule.'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{rules_uri});
@ -419,12 +435,12 @@ sub rules_create :Chained('rules_list') :PathPart('create') :Args(0) {
$form->values->{priority} = int($last_priority) + 1;
$c->stash->{rules_rs}->create($form->values);
$self->_sip_dialplan_reload();
$c->flash(messages => [{type => 'success', text => 'Rewrite rule successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Rewrite rule successfully created') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create rewrite rule.",
desc => $c->loc('Failed to create rewrite rule.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{rules_uri});

@ -142,7 +142,7 @@ EOF
$dispatcher->dispatch("loadbalancer", 1, 1, $xml);
$c->flash(messages => [{type => 'success', text => 'IP successfully unbanned'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('IP successfully unbanned')}]);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/security'));
}
@ -173,7 +173,7 @@ EOF
$dispatcher->dispatch("loadbalancer", 1, 1, $xml);
}
$c->flash(messages => [{type => 'success', text => 'User successfully unbanned'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('User successfully unbanned')}]);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/security'));
}

@ -43,7 +43,7 @@ sub auto :Private {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "No product for customer contract id $contract_id found",
desc => "No product for this customer contract found.",
desc => $c->loc('No product for this customer contract found.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -80,7 +80,7 @@ sub contract_sets_list :Chained('/') :PathPart('sound/contract') :CaptureArgs(1)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "Invalid contract id $contract_id found",
desc => "Invalid contract id found",
desc => $c->loc('Invalid contract id found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -88,7 +88,7 @@ sub contract_sets_list :Chained('/') :PathPart('sound/contract') :CaptureArgs(1)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "access violatio, subscriberadmin ".$c->user->uuid." with contract id ".$c->user->account_id." tries to access foreign contract id $contract_id",
desc => "Invalid contract id found",
desc => $c->loc('Invalid contract id found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -97,7 +97,7 @@ sub contract_sets_list :Chained('/') :PathPart('sound/contract') :CaptureArgs(1)
NGCP::Panel::Utils::Message->error(
c => $c,
error => "Contract id $contract_id not found",
desc => "Invalid contract id detected",
desc => $c->loc('Invalid contract id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -133,13 +133,21 @@ sub base :Chained('sets_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $set_id) = @_;
unless($set_id && $set_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid sound set id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid sound set id detected',
desc => $c->loc('Invalid sound set id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
my $res = $c->stash->{sets_rs}->find($set_id);
unless(defined($res)) {
$c->flash(messages => [{type => 'error', text => 'Sound set does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Sound set does not exist',
desc => $c->loc('Sound set does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
$c->stash(set_result => $res);
@ -228,10 +236,13 @@ sub edit :Chained('base') :PathPart('edit') {
});
delete $c->session->{created_objects}->{reseller};
delete $c->session->{created_objects}->{contract};
$c->flash(messages => [{type => 'success', text => 'Sound set successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Sound set successfully updated')}]);
} catch($e) {
$c->log->error("failed to update sound set: $e");
$c->flash(messages => [{type => 'error', text => 'Sound set successfully updated'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to update sound set'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -261,10 +272,13 @@ sub delete :Chained('base') :PathPart('delete') {
$c->stash->{set_result}->delete;
});
$c->flash(messages => [{type => 'success', text => 'Sound set successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Sound set successfully deleted')}]);
} catch($e) {
$c->log->error("failed to delete sound set: $e");
$c->flash(messages => [{type => 'error', text => 'Delete failed.'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to delete sound set'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -367,10 +381,13 @@ sub create :Chained('sets_list') :PathPart('create') :Args() {
});
delete $c->session->{created_objects}->{reseller};
$c->flash(messages => [{type => 'success', text => 'Sound set successfully created'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Sound set successfully created')}]);
} catch($e) {
$c->log->error("failed to create sound set: $e");
$c->flash(messages => [{type => 'error', text => 'Failed to create sound set'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to create sound set'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound'));
}
@ -453,18 +470,30 @@ sub handles_base :Chained('handles_list') :PathPart('') :CaptureArgs(1) {
my ($self, $c, $handle_id) = @_;
unless($handle_id && $handle_id->is_integer) {
$c->flash(messages => [{type => 'error', text => 'Invalid sound handle id detected'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid sound handle id detected',
desc => $c->loc('Invalid sound handle id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
my @tmph = $c->stash->{handles_rs}->all;
unless($c->stash->{handles_rs}->find({ 'handles.id' => $handle_id })) {
$c->flash(messages => [{type => 'error', text => 'Sound handle id does not exist'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Sound handle id does not exist',
desc => $c->loc('Sound handle id does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
my $res = $c->stash->{files_rs}->find_or_create(handle_id => $handle_id);
unless(defined $res ) {
$c->flash(messages => [{type => 'error', text => 'Sound handle not found'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Sound handle not found',
desc => $c->loc('Sound handle not found'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
$c->stash(file_result => $res);
@ -500,7 +529,11 @@ sub handles_edit :Chained('handles_base') :PathPart('edit') {
my $ft = File::Type->new();
unless ($ft->checktype_contents($soundfile) eq 'audio/x-wav') {
$c->flash(messages => [{type => 'error', text => 'Invalid file type detected, only WAV supported'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Invalid file type detected, only WAV supported',
desc => $c->loc('Invalid file type detected, only WAV supported'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
@ -515,7 +548,7 @@ sub handles_edit :Chained('handles_base') :PathPart('edit') {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "Failed to clear audio cache for " . $file_result->handle->group->name . " at appserver",
desc => "Failed to clear audio cache.",
desc => $c->loc('Failed to clear audio cache.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
@ -534,7 +567,7 @@ sub handles_edit :Chained('handles_base') :PathPart('edit') {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "Failed to clear audio cache for " . $file_result->handle->group->name . " on $service",
desc => "Failed to clear audio cache.",
desc => $c->loc('Failed to clear audio cache.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
@ -550,8 +583,11 @@ sub handles_edit :Chained('handles_base') :PathPart('edit') {
$soundfile = NGCP::Panel::Utils::Sounds::transcode_file(
$upload->tempname, 'WAV', $target_codec);
} catch ($e) {
$c->flash(messages => [{type => 'error', text => 'Transcoding audio file failed'}]);
$c->log->error("failed to transcode audio file: $e");
NGCP::Panel::Utils::Message->error(
c => $c,
log => 'Transcoding audio file failed',
desc => $c->loc('Transcoding audio file failed'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
@ -562,20 +598,26 @@ sub handles_edit :Chained('handles_base') :PathPart('edit') {
data => $soundfile,
codec => $target_codec,
});
$c->flash(messages => [{type => 'success', text => 'Sound handle successfully uploaded'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Sound handle successfully uploaded') }]);
} catch($e) {
$c->log->error("failed to update sound handle with data: $e");
$c->flash(messages => [{type => 'error', text => 'Failed to update sound handle upload'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to update uploaded sound handle'),
);
}
} else {
try {
$file_result->update({
loopplay => $form->values->{loopplay},
});
$c->flash(messages => [{type => 'success', text => 'Sound handle successfully updated'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Sound handle successfully updated') }]);
} catch($e) {
$c->log->error("failed to update sound handle: $e");
$c->flash(messages => [{type => 'error', text => 'Failed to update sound handle'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to update sound handle'),
);
}
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
@ -590,10 +632,13 @@ sub handles_delete :Chained('handles_base') :PathPart('delete') {
try {
$c->stash->{file_result}->delete;
$c->flash(messages => [{type => 'success', text => 'Sound handle successfully deleted'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Sound handle successfully deleted')}]);
} catch($e) {
$c->log->error("failed to delete sound handle: $e");
$c->flash(messages => [{type => 'error', text => 'Failed to delete sound handle'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to delete sound handle'),
);
};
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
@ -611,8 +656,11 @@ sub handles_download :Chained('handles_base') :PathPart('download') :Args(0) {
$data = NGCP::Panel::Utils::Sounds::transcode_data(
$file->data, $file->codec, 'WAV');
} catch($e) {
$c->log->error("failed to transcode audio file: $e");
$c->flash(messages => [{type => 'error', text => 'Failed to transcode audio file'}]);
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => $c->loc('Failed to transcode audio file'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
}
} else {

@ -103,14 +103,14 @@ sub sub_list :Chained('/') :PathPart('subscriber') :CaptureArgs(0) {
}
$c->stash->{dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "contract_id", search => 1, title => "Contract #"},
{ name => "contract.contact.email", search => 1, title => "Contact Email" },
{ name => "username", search => 1, title => "Username" },
{ name => "domain.domain", search => 1, title => "Domain" },
{ name => "uuid", search => 1, title => "UUID" },
{ name => "status", search => 1, title => "Status" },
{ name => "number", search => 1, title => "Number", literal_sql => "concat(primary_number.cc, primary_number.ac, primary_number.sn)"},
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "contract_id", search => 1, title => $c->loc('Contract #') },
{ name => "contract.contact.email", search => 1, title => $c->loc('Contact Email') },
{ name => "username", search => 1, title => $c->loc('Username') },
{ name => "domain.domain", search => 1, title => $c->loc('Domain') },
{ name => "uuid", search => 1, title => $c->loc('UUID') },
{ name => "status", search => 1, title => $c->loc('Status') },
{ name => "number", search => 1, title => $c->loc('Number'), literal_sql => "concat(primary_number.cc, primary_number.ac, primary_number.sn)"},
{ name => "primary_number.cc", search => 1, title => "" }, #need this to get the relationship
]);
}
@ -245,12 +245,12 @@ sub create_list :Chained('sub_list') :PathPart('create') :Args(0) :Does(ACL) :AC
delete $c->session->{created_objects}->{contract};
delete $c->session->{created_objects}->{domain};
});
$c->flash(messages => [{type => 'success', text => 'Subscriber successfully created!'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Subscriber successfully created!')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create subscriber.",
desc => $c->loc('Failed to create subscriber.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/subscriber'));
@ -267,7 +267,7 @@ sub base :Chained('sub_list') :PathPart('') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "subscriber id '$subscriber_id' is not an integer",
desc => "Invalid subscriber id detected",
desc => $c->loc('Invalid subscriber id detected'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/subscriber'));
}
@ -277,7 +277,7 @@ sub base :Chained('sub_list') :PathPart('') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => "subscriber id '$subscriber_id' does not exist",
desc => "Subscriber does not exist",
desc => $c->loc('Subscriber does not exist'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/subscriber'));
}
@ -285,14 +285,14 @@ sub base :Chained('sub_list') :PathPart('') :CaptureArgs(1) {
$c->stash(subscriber => $res);
$c->stash->{sd_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "slot", search => 1, title => "Slot" },
{ name => "destination", search => 1, title => "Destination" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "slot", search => 1, title => $c->loc('Slot') },
{ name => "destination", search => 1, title => $c->loc('Destination') },
]);
$c->stash->{aa_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "choice", search => 1, title => "Slot" },
{ name => "destination", search => 1, title => "Destination" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "choice", search => 1, title => $c->loc('Slot') },
{ name => "destination", search => 1, title => $c->loc('Destination') },
]);
}
@ -312,7 +312,7 @@ sub terminate :Chained('base') :PathPart('terminate') :Args(0) :Does(ACL) :ACLDe
NGCP::Panel::Utils::Message->error(
c => $c,
error => 'unauthorized termination of own subscriber for uuid '.$c->user->uuid,
desc => "Terminating own subscriber is prohibited.",
desc => $c->loc('Terminating own subscriber is prohibited.'),
);
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/subscriber'));
}
@ -360,12 +360,12 @@ sub terminate :Chained('base') :PathPart('terminate') :Args(0) :Does(ACL) :ACLDe
}
$subscriber->update({ status => 'terminated' });
});
$c->flash(messages => [{type => 'success', text => 'Successfully terminated subscriber'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully terminated subscriber') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to terminate subscriber.",
desc => $c->loc('Failed to terminate subscriber.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/subscriber'));
@ -498,7 +498,7 @@ sub preferences_edit :Chained('preferences_base') :PathPart('edit') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
log => "Failed to set peer registration: $e",
desc => "Peer registration error: $e",
desc => $c->loc('Peer registration error'),
);
}
}
@ -513,15 +513,15 @@ sub preferences_callforward :Chained('base') :PathPart('preferences/callforward'
my $cf_desc;
given($cf_type) {
when("cfu") { $cf_desc = "Call Forward Unconditional" }
when("cfb") { $cf_desc = "Call Forward Busy" }
when("cft") { $cf_desc = "Call Forward Timeout" }
when("cfna") { $cf_desc = "Call Forward Unavailable" }
when("cfu") { $cf_desc = $c->loc('Call Forward Unconditional') }
when("cfb") { $cf_desc = $c->loc('Call Forward Busy') }
when("cft") { $cf_desc = $c->loc('Call Forward Timeout') }
when("cfna") { $cf_desc = $c->loc('Call Forward Unavailable') }
default {
NGCP::Panel::Utils::Message->error(
c => $c,
log => "Invalid call-forward type '$cf_type'",
desc => "Invalid Call Forward type.",
desc => $c->loc('Invalid Call Forward type.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -747,12 +747,12 @@ sub preferences_callforward :Chained('base') :PathPart('preferences/callforward'
}
}
});
$c->flash(messages => [{type => 'success', text => 'Successfully saved Call Forward'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully saved Call Forward') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to save Call Forward.",
desc => $c->loc('Failed to save Call Forward.'),
);
}
@ -784,15 +784,15 @@ sub preferences_callforward_advanced :Chained('base') :PathPart('preferences/cal
my $cf_desc;
given($cf_type) {
when("cfu") { $cf_desc = "Call Forward Unconditional" }
when("cfb") { $cf_desc = "Call Forward Busy" }
when("cft") { $cf_desc = "Call Forward Timeout" }
when("cfna") { $cf_desc = "Call Forward Unavailable" }
when("cfu") { $cf_desc = $c->loc('Call Forward Unconditional') }
when("cfb") { $cf_desc = $c->loc('Call Forward Busy') }
when("cft") { $cf_desc = $c->loc('Call Forward Timeout') }
when("cfna") { $cf_desc = $c->loc('Call Forward Unavailable') }
default {
NGCP::Panel::Utils::Message->error(
c => $c,
log => "Invalid call-forward type '$cf_type'",
desc => "Invalid Call Forward type.",
desc => $c->loc('Invalid Call Forward type.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -876,7 +876,7 @@ sub preferences_callforward_advanced :Chained('base') :PathPart('preferences/cal
unless(@active) {
$ringtimeout_preference->first->delete
if($cf_type eq "cft" && $ringtimeout_preference->first);
$c->flash(messages => [{type => 'success', text => 'Successfully cleared Call Forward'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully cleared Call Forward') }]);
# we don't use back_or, as we might end up in the simple view again
$c->res->redirect(
$c->uri_for_action('/subscriber/preferences',
@ -901,13 +901,13 @@ sub preferences_callforward_advanced :Chained('base') :PathPart('preferences/cal
}
}
$c->flash(messages => [{type => 'success', text => 'Successfully saved Call Forward'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully saved Call Forward') }]);
});
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to save Call Forward.",
desc => $c->loc('Failed to save Call Forward.'),
);
}
# we don't use back_or, as we might end up in the simple view again
@ -954,7 +954,7 @@ sub preferences_callforward_destinationset :Chained('base') :PathPart('preferenc
$c->stash(template => 'subscriber/preferences.tt');
$c->stash(
edit_cfset_flag => 1,
cf_description => "Destination Sets",
cf_description => $c->loc('Destination Sets'),
cf_form => $cf_form,
cf_type => $cf_type,
);
@ -1065,7 +1065,7 @@ sub preferences_callforward_destinationset_create :Chained('base') :PathPart('pr
$c->stash(template => 'subscriber/preferences.tt');
$c->stash(
edit_cf_flag => 1,
cf_description => "Destination Set",
cf_description => $c->loc('Destination Set'),
cf_form => $form,
cf_type => $cf_type,
);
@ -1318,7 +1318,7 @@ sub preferences_callforward_timeset :Chained('base') :PathPart('preferences/time
$c->stash(template => 'subscriber/preferences.tt');
$c->stash(
edit_timeset_flag => 1,
cf_description => "Time Sets",
cf_description => $c->loc('Time Sets'),
cf_form => $cf_form,
cf_type => $cf_type,
);
@ -1505,7 +1505,7 @@ sub preferences_callforward_timeset_edit :Chained('preferences_callforward_times
$c->stash(
edit_cf_flag => 1,
cf_description => "Time Set",
cf_description => $c->loc('Time Set'),
cf_form => $form,
);
@ -1550,12 +1550,12 @@ sub preferences_callforward_delete :Chained('base') :PathPart('preferences/callf
prov_subscriber => $prov_subscriber,
);
$cf_pref->delete_all;
$c->flash(messages => [{type => 'success', text => 'Successfully deleted Call Forward'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully deleted Call Forward') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete Call Forward.",
desc => $c->loc('Failed to delete Call Forward.'),
);
}
@ -1618,28 +1618,28 @@ sub master :Chained('base') :PathPart('details') :CaptureArgs(0) {
my ($self, $c) = @_;
$c->stash->{calls_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "source_user", search => 1, title => "Caller" },
{ name => "destination_user", search => 1, title => "Callee" },
{ name => "call_status", search => 1, title => "Status" },
{ name => "start_time", search_from_epoch => 1, search_to_epoch => 1, title => "Start Time" },
{ name => "duration", search => 1, title => "Duration" },
{ name => "source_user", search => 1, title => $c->loc('Caller') },
{ name => "destination_user", search => 1, title => $c->loc('Callee') },
{ name => "call_status", search => 1, title => $c->loc('Status') },
{ name => "start_time", search_from_epoch => 1, search_to_epoch => 1, title => $c->loc('Start Time') },
{ name => "duration", search => 1, title => $c->loc('Duration') },
]);
$c->stash->{vm_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "callerid", search => 1, title => "Caller" },
{ name => "origtime", search_from_epoch => 1, search_to_epoch => 1, title => "Time" },
{ name => "duration", search => 1, title => "Duration" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "callerid", search => 1, title => $c->loc('Caller') },
{ name => "origtime", search_from_epoch => 1, search_to_epoch => 1, title => $c->loc('Time') },
{ name => "duration", search => 1, title => $c->loc('Duration') },
]);
$c->stash->{reg_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "user_agent", search => 1, title => "User Agent" },
{ name => "contact", search => 1, title => "Contact" },
{ name => "expires", search => 1, title => "Expires" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "user_agent", search => 1, title => $c->loc('User Agent') },
{ name => "contact", search => 1, title => $c->loc('Contact') },
{ name => "expires", search => 1, title => $c->loc('Expires') },
]);
$c->stash->{capture_dt_columns} = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "timestamp", search => 1, title => "Timestamp" },
{ name => "call_id", search => 1, title => "Call-ID" },
{ name => "cseq_method", search => 1, title => "Method" },
{ name => "timestamp", search => 1, title => $c->loc('Timestamp') },
{ name => "call_id", search => 1, title => $c->loc('Call-ID') },
{ name => "cseq_method", search => 1, title => $c->loc('Method') },
]);
$c->stash(
@ -1910,12 +1910,12 @@ sub edit_master :Chained('master') :PathPart('edit') :Args(0) :Does(ACL) :ACLDet
}
});
delete $c->session->{created_objects}->{group};
$c->flash(messages => [{type => 'success', text => 'Successfully updated subscriber'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated subscriber') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update subscriber.",
desc => $c->loc('Failed to update subscriber.'),
);
}
@ -1924,7 +1924,7 @@ sub edit_master :Chained('master') :PathPart('edit') :Args(0) :Does(ACL) :ACLDet
$c->stash(
edit_flag => 1,
description => 'Subscriber Master Data',
description => $c->loc('Subscriber Master Data'),
form => $form,
close_target => $c->uri_for_action('/subscriber/details', [$c->req->captures->[0]]),
);
@ -1944,9 +1944,9 @@ sub aliases_ajax :Chained('master') :PathPart('aliases/ajax') :Args(0) :Does(ACL
});
my $alias_columns = NGCP::Panel::Utils::Datatables::set_columns($c, [
{ name => "id", search => 1, title => "#" },
{ name => "number", search => 1, title => "Number", literal_sql => "concat(cc,' ',ac,' ',sn)"},
{ name => "subscriber.username", search => 1, title => "Subscriber" },
{ name => "id", search => 1, title => $c->loc('#') },
{ name => "number", search => 1, title => $c->loc('Number'), literal_sql => "concat(cc,' ',ac,' ',sn)"},
{ name => "subscriber.username", search => 1, title => $c->loc('Subscriber') },
]);
NGCP::Panel::Utils::Datatables::process($c, $num_rs, $alias_columns);
@ -1967,7 +1967,7 @@ sub edit_voicebox :Chained('base') :PathPart('preferences/voicebox/edit') :Args(
NGCP::Panel::Utils::Message->error(
c => $c,
log => "no voicemail user found for subscriber uuid ".$c->stash->{subscriber}->uuid,
desc => "Failed to find voicemail user.",
desc => $c->loc('Failed to find voicemail user.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -2028,7 +2028,7 @@ sub edit_voicebox :Chained('base') :PathPart('preferences/voicebox/edit') :Args(
NGCP::Panel::Utils::Message->error(
c => $c,
log => "trying to set invalid voicemail param '$attribute' for subscriber uuid ".$c->stash->{subscriber}->uuid,
desc => "Invalid voicemail setting.",
desc => $c->loc('Invalid voicemail setting.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]), 1);
@ -2036,7 +2036,7 @@ sub edit_voicebox :Chained('base') :PathPart('preferences/voicebox/edit') :Args(
}
}
if($posted && $form->validated) {
$c->flash(messages => [{type => 'success', text => 'Successfully updated voicemail setting'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated voicemail setting') }]);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]), 1);
return;
@ -2045,7 +2045,7 @@ sub edit_voicebox :Chained('base') :PathPart('preferences/voicebox/edit') :Args(
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update voicemail setting.",
desc => $c->loc('Failed to update voicemail setting.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -2174,7 +2174,7 @@ sub edit_fax :Chained('base') :PathPart('preferences/fax/edit') :Args(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
log => "trying to set invalid fax param '$attribute' for subscriber uuid ".$c->stash->{subscriber}->uuid,
desc => "Invalid fax setting.",
desc => $c->loc('Invalid fax setting.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]), 1);
@ -2182,7 +2182,7 @@ sub edit_fax :Chained('base') :PathPart('preferences/fax/edit') :Args(1) {
}
}
if($posted && $form->validated) {
$c->flash(messages => [{type => 'success', text => 'Successfully updated fax setting'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated fax setting') }]);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]), 1);
return;
@ -2191,7 +2191,7 @@ sub edit_fax :Chained('base') :PathPart('preferences/fax/edit') :Args(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update fax setting.",
desc => $c->loc('Failed to update fax setting.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -2252,12 +2252,12 @@ sub edit_reminder :Chained('base') :PathPart('preferences/reminder/edit') {
$reminder->delete;
}
$c->flash(messages => [{type => 'success', text => 'Successfully updated reminder setting'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated reminder setting')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update reminder setting.",
desc => $c->loc('Failed to update reminder setting.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2352,7 +2352,7 @@ sub voicemail :Chained('master') :PathPart('voicemail') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
log => "no such voicemail file with id '$vm_id' for uuid ".$c->stash->{subscriber}->uuid,
desc => "No such voicemail file.",
desc => $c->loc('No such voicemail file.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/details', [$c->req->captures->[0]]));
@ -2374,7 +2374,7 @@ sub play_voicemail :Chained('voicemail') :PathPart('play') :Args(0) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Transcode of audio file failed.",
desc => $c->loc('Transcode of audio file failed.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/details', [$c->req->captures->[0]]));
@ -2393,12 +2393,12 @@ sub delete_voicemail :Chained('voicemail') :PathPart('delete') :Args(0) {
try {
$c->stash->{voicemail}->delete;
$c->flash(messages => [{type => 'success', text => 'Successfully deleted voicemail'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully deleted voicemail') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete voicemail message.",
desc => $c->loc('Failed to delete voicemail message.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2423,7 +2423,7 @@ sub registered :Chained('master') :PathPart('registered') :CaptureArgs(1) {
NGCP::Panel::Utils::Message->error(
c => $c,
log => "failed to find location id '$reg_id' for subscriber uuid " . $s->uuid,
desc => "Failed to find registered device.",
desc => $c->loc('Failed to find registered device.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/details', [$c->req->captures->[0]]));
@ -2458,7 +2458,7 @@ EOF
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete registered device.",
desc => $c->loc('Failed to delete registered device.'),
);
}
@ -2468,7 +2468,7 @@ EOF
# $c->flash(messages => [{type => 'error', text => 'Failed to delete registered device'}]);
# }
$c->flash(messages => [{type => 'success', text => 'Successfully deleted registered device'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully deleted registered device')}]);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/details', [$c->req->captures->[0]]));
}
@ -2516,12 +2516,12 @@ sub create_registered :Chained('master') :PathPart('registered/create') :Args(0)
</methodCall>
EOF
# TODO: error check
$c->flash(messages => [{type => 'success', text => 'Successfully added registered device'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully added registered device')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to add registered device.",
desc => $c->loc('Failed to add registered device.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2530,7 +2530,7 @@ EOF
$c->stash(
reg_create_flag => 1,
description => 'Registered Device',
description => $c->loc('Registered Device'),
form => $form,
);
}
@ -2562,12 +2562,12 @@ sub create_trusted :Chained('base') :PathPart('preferences/trusted/create') :Arg
protocol => $form->field('protocol')->value,
from_pattern => $form->field('from_pattern') ? $form->field('from_pattern')->value : undef,
});
$c->flash(messages => [{type => 'success', text => 'Successfully created trusted source'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully created trusted source') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create trusted source.",
desc => $c->loc('Failed to create trusted source.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2577,7 +2577,7 @@ sub create_trusted :Chained('base') :PathPart('preferences/trusted/create') :Arg
$c->stash(
template => 'subscriber/preferences.tt',
edit_cf_flag => 1,
cf_description => 'Trusted Source',
cf_description => $c->loc('Trusted Source'),
cf_form => $form,
);
}
@ -2592,7 +2592,7 @@ sub trusted_base :Chained('base') :PathPart('preferences/trusted') :CaptureArgs(
NGCP::Panel::Utils::Message->error(
c => $c,
log => "trusted source id '$trusted_id' not found for subscriber uuid ".$c->stash->{subscriber}->uuid,
desc => "Trusted source entry not found.",
desc => $c->loc('Trusted source entry not found.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -2636,12 +2636,12 @@ sub edit_trusted :Chained('trusted_base') :PathPart('edit') {
from_pattern => $form->field('from_pattern') ? $form->field('from_pattern')->value : undef,
});
$c->flash(messages => [{type => 'success', text => 'Successfully updated trusted source'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated trusted source')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update trusted source.",
desc => $c->loc('Failed to update trusted source.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2651,7 +2651,7 @@ sub edit_trusted :Chained('trusted_base') :PathPart('edit') {
$c->stash(
template => 'subscriber/preferences.tt',
edit_cf_flag => 1,
cf_description => 'Trusted Source',
cf_description => $c->loc('Trusted Source'),
cf_form => $form,
);
}
@ -2664,12 +2664,12 @@ sub delete_trusted :Chained('trusted_base') :PathPart('delete') :Args(0) {
try {
$c->stash->{trusted}->delete;
$c->flash(messages => [{type => 'success', text => 'Successfully deleted trusted source'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully deleted trusted source') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete trusted source.",
desc => $c->loc('Failed to delete trusted source.'),
);
}
@ -2722,12 +2722,12 @@ sub create_speeddial :Chained('base') :PathPart('preferences/speeddial/create')
slot => $form->field('slot')->value,
destination => $d,
});
$c->flash(messages => [{type => 'success', text => 'Successfully created speed dial slot'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully created speed dial slot') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to create speed dial slot.",
desc => $c->loc('Failed to create speed dial slot.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2738,7 +2738,7 @@ sub create_speeddial :Chained('base') :PathPart('preferences/speeddial/create')
$c->stash(
template => 'subscriber/preferences.tt',
edit_cf_flag => 1,
cf_description => "Speed Dial Slot",
cf_description => $c->loc('Speed Dial Slot'),
cf_form => $form,
);
}
@ -2752,7 +2752,7 @@ sub speeddial :Chained('base') :PathPart('preferences/speeddial') :CaptureArgs(1
NGCP::Panel::Utils::Message->error(
c => $c,
log => "no such speed dial slot with id '$sd_id' for uuid ".$c->stash->{subscriber}->uuid,
desc => "No such speed dial id.",
desc => $c->loc('No such speed dial id.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -2768,12 +2768,12 @@ sub delete_speeddial :Chained('speeddial') :PathPart('delete') :Args(0) {
try {
$c->stash->{speeddial}->delete;
$c->flash(messages => [{type => 'success', text => 'Successfully deleted speed dial slot'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully deleted speed dial slot') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete speed dial slot.",
desc => $c->loc('Failed to delete speed dial slot.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2818,7 +2818,7 @@ sub edit_speeddial :Chained('speeddial') :PathPart('edit') :Args(0) {
slot => $form->field('slot')->value,
destination => $d,
});
$c->flash(messages => [{type => 'success', text => 'Successfully updated speed dial slot'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated speed dial slot')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
@ -2834,7 +2834,7 @@ sub edit_speeddial :Chained('speeddial') :PathPart('edit') :Args(0) {
$c->stash(
template => 'subscriber/preferences.tt',
edit_cf_flag => 1,
cf_description => "Speed Dial Slot",
cf_description => $c->loc('Speed Dial Slot'),
cf_form => $form,
);
}
@ -2858,7 +2858,7 @@ sub autoattendant :Chained('base') :PathPart('preferences/autoattendant') :Captu
NGCP::Panel::Utils::Message->error(
c => $c,
log => "no such auto attendant slot with id '$aa_id' for uuid ".$c->stash->{subscriber}->uuid,
desc => "No such auto attendant id.",
desc => $c->loc('No such auto attendant id.'),
);
NGCP::Panel::Utils::Navigation::back_or($c,
$c->uri_for_action('/subscriber/preferences', [$c->req->captures->[0]]));
@ -2874,12 +2874,12 @@ sub delete_autoattendant :Chained('autoattendant') :PathPart('delete') :Args(0)
try {
$c->stash->{autoattendant}->delete;
$c->flash(messages => [{type => 'success', text => 'Successfully deleted auto attendant slot'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully deleted auto attendant slot') }]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to delete auto attendant slot.",
desc => $c->loc('Failed to delete auto attendant slot.'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2938,12 +2938,12 @@ sub edit_autoattendant :Chained('base') :PathPart('preferences/speeddial/edit')
}
});
$c->flash(messages => [{type => 'success', text => 'Successfully updated auto attendant slots'}]);
$c->flash(messages => [{type => 'success', text => $c->loc('Successfully updated auto attendant slots')}]);
} catch($e) {
NGCP::Panel::Utils::Message->error(
c => $c,
error => $e,
desc => "Failed to update autoattendant slots",
desc => $c->loc('Failed to update autoattendant slots'),
);
}
NGCP::Panel::Utils::Navigation::back_or($c,
@ -2953,7 +2953,7 @@ sub edit_autoattendant :Chained('base') :PathPart('preferences/speeddial/edit')
$c->stash(
template => 'subscriber/preferences.tt',
edit_cf_flag => 1,
cf_description => "Auto Attendant Slot",
cf_description => $c->loc('Auto Attendant Slot'),
cf_form => $form,
);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -13,7 +13,7 @@
[%- IF c.user.roles == 'admin' || c.user.roles == 'reseller' -%]
[% login_name = c.user.login %]
[%- ELSE -%]
[% login_name = c.user.webusername %]@[% c.user.domain.domain %]
[% login_name = c.user.webusername _'@'_ c.user.domain.domain %]
[%- END -%]
<i class="icon-user"></i> [% c.loc("Logged in as [_1]", login_name) %]
</li>
@ -159,11 +159,11 @@ $(function () {
$('#'+lastTab).parent().addClass("open");
}
if($('.accordion-body').length) {
$('#content').children('.container').prepend('<a href="#" id="toggle-accordions" class="btn btn-small btn-tertiary pull-right ngcp-accordion-closed"><i class="icon-resize-full"></i> Expand Groups</a>');
$('#content').children('.container').prepend('<a href="#" id="toggle-accordions" class="btn btn-small btn-tertiary pull-right ngcp-accordion-closed"><i class="icon-resize-full"></i> [% c.loc('Expand Groups') %]</a>');
$('#toggle-accordions').click(function() {
if($('#toggle-accordions').hasClass('ngcp-accordion-closed')) {
$('#toggle-accordions').removeClass('ngcp-accordion-closed');
$('#toggle-accordions').html('<i class="icon-resize-small"></i> Collapse Groups');
$('#toggle-accordions').html('<i class="icon-resize-small"></i> [% c.loc('Collapse Groups') %]');
$('.accordion-body').each(function() {
$(this).removeClass('collapse');
$(this).addClass('in');
@ -177,7 +177,7 @@ $(function () {
});
} else {
$('#toggle-accordions').addClass('ngcp-accordion-closed');
$('#toggle-accordions').html('<i class="icon-resize-full"></i> Expand Groups');
$('#toggle-accordions').html('<i class="icon-resize-full"></i> [% c.loc('Expand Groups') %]');
$('.accordion-body').each(function() {
$(this).removeClass('in');
$(this).addClass('collapse');

@ -1,4 +1,4 @@
[% site_config.title = 'Call Flow for Call-ID ' _ callid -%]
[% site_config.title = c.loc('Call Flow for Call-ID [_1]', callid) -%]
<script type="text/javascript" src="/js/libs/jquery.popup.js"></script>
<script type="text/javascript">
@ -12,8 +12,8 @@
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/callflow/get_pcap', c.req.captures) %]"><i class="icon-file"></i> Download PCAP</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/callflow/get_pcap', c.req.captures) %]"><i class="icon-file"></i> [% c.loc('Download PCAP') %]</a>
</span>
</div>
[% back_created = 1 -%]

@ -1,6 +1,7 @@
[% META title = 'SIP Call Flows' -%]
[% site_config.title = c.loc('SIP Call Flows') -%]
[%
helper.name = 'Captured Calls';
helper.name = c.loc('Captured Calls');
helper.identifier = 'captured_calls';
helper.data = calls;
helper.messages = messages;
helper.dt_columns = capture_dt_columns;
@ -13,7 +14,7 @@
helper.ajax_uri = c.uri_for('/callflow/ajax');
helper.dt_buttons = [
{ name = 'Call Flow', uri = "/callflow/'+encodeURIComponent(full.call_id)+'/callmap", class = 'btn-small btn-primary', icon = 'icon-random' },
{ name = c.loc('Call Flow'), uri = "/callflow/'+encodeURIComponent(full.call_id)+'/callmap", class = 'btn-small btn-primary', icon = 'icon-random' },
];
PROCESS 'helpers/datatables.tt';

@ -1,4 +1,4 @@
[% META title = 'Call Distribution' -%]
[% site_config.title = c.loc('Call Distribution') -%]
<style>
#circle circle {
@ -36,24 +36,24 @@
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
<div class="ngcp-separator"></div>
<p>Mouseover on a country name to focus on calls to or from a single country. The thickness of links between countries encodes the relative frequency of calls between two countries: thicker links represent more calls.</p>
<p>Links are colored by the more frequent origin. Mouseover on a link to see the direction details.</p>
<p>[% c.loc('Mouseover on a country name to focus on calls to or from a single country. The thickness of links between countries encodes the relative frequency of calls between two countries: thicker links represent more calls.') %]</p>
<p>[% c.loc('Links are colored by the more frequent origin. Mouseover on a link to see the direction details.') %]</p>
<div class="row-fluid" style="margin-top:50px">
<div class="span3">
<label>From Date: <input type="text" id="datepicker_start" class="ngcp-datepicker" rel="tooltip" data-original-title="YYYY-MM-DD" value="2013-11-27"/></label>
<label>[% c.loc('From Date:') %] <input type="text" id="datepicker_start" class="ngcp-datepicker" rel="tooltip" data-original-title="YYYY-MM-DD" value="2013-11-27"/></label>
</div>
<div class="span3">
<label>To Date: <input type="text" id="datepicker_end" class="ngcp-datepicker" rel="tooltip" data-original-title="YYYY-MM-DD" value="2013-11-27"/></label>
<label>[% c.loc('To Date:') %] <input type="text" id="datepicker_end" class="ngcp-datepicker" rel="tooltip" data-original-title="YYYY-MM-DD" value="2013-11-27"/></label>
</div>
<div class="span2">
<a href="#" id="load-chord" class="btn btn-primary"><i class="icon-repeat" style="padding-top:3px"></i> Reload</a>
<a href="#" id="load-chord" class="btn btn-primary"><i class="icon-repeat" style="padding-top:3px"></i> [% c.loc('Reload') %]</a>
</div>
</div>
<script>

@ -1,9 +1,10 @@
[% site_config.title = "Contracts" -%]
[% site_config.title = c.loc('Contracts') -%]
[%
helper.name = "Contract";
helper.name = c.loc('Contract');
IF edit_flag;
helper.name = "Contract #" _ contract.id;
helper.name = c.loc('Contract #[_1]', contract.id);
END;
helper.identifier = 'contract';
helper.data = contracts;
helper.messages = messages;
helper.dt_columns = contract_dt_columns;
@ -17,11 +18,11 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/contract/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Edit'), uri = "/contract/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
];
helper.top_buttons = [
{ name = 'Create Peering Contract', uri = c.uri_for_action('/contract/peering_create'), icon = 'icon-star' },
{ name = 'Create Reseller Contract', uri = c.uri_for_action('/contract/reseller_create'), icon = 'icon-star' },
{ name = c.loc('Create Peering Contract'), uri = c.uri_for_action('/contract/peering_create'), icon = 'icon-star' },
{ name = c.loc('Create Reseller Contract'), uri = c.uri_for_action('/contract/reseller_create'), icon = 'icon-star' },
];
END;

@ -1,26 +1,26 @@
[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" -%]
[% site_config.title = 'Customer Details' -%]
[% site_config.title = c.loc('Customer Details') -%]
[% ELSE -%]
[% site_config.title = 'Customer Details for #' _ contract.id _ " (" _ product.name _ ")" -%]
[% site_config.title = c.loc('Customer Details for #[_1] ([_2])',contract.id,product.name) -%]
[% END -%]
[%
lock_levels = [
{ level = 0, text = "none" },
{ level = 1, text = "foreign calls" },
{ level = 2, text = "all outgoing calls" },
{ level = 3, text = "incoming and outgoing" },
{ level = 4, text = "global (including web login)" },
{ level = 0, text = c.loc("none") },
{ level = 1, text = c.loc("foreign calls") },
{ level = 2, text = c.loc("all outgoing calls") },
{ level = 3, text = c.loc("incoming and outgoing") },
{ level = 4, text = c.loc("global (including web login)") },
];
-%]
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
[% IF !c.user.read_only && (c.user.roles == 'admin' || c.user.roles == 'reseller') -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/customer/edit', [ contract.id ]) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/customer/edit', [ contract.id ]) %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
</span>
[% END -%]
</div>
@ -42,22 +42,24 @@
[% IF c.user.is_superuser -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_reseller">Reseller</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_reseller">[% c.loc('Reseller') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_reseller">
<div class="accordion-inner">
<table class="table table-bordered table-striped table-highlight table-hover">
<thead>
<th>Name</th>
<th>Value</th>
<tr>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Value') %]</th>
</tr>
</thead>
<tbody>
<tr>
<td>#</td>
<td>[% c.loc('#') %]</td>
<td>[% contract.contact.reseller.id %]</td>
</tr>
<tr>
<td>Name</td>
<td>[% c.loc('Name') %]</td>
<td>[% contract.contact.reseller.name %]</td>
</tr>
</tbody>
@ -70,38 +72,40 @@
[% IF c.user.roles == 'admin' || c.user.roles == 'reseller' %]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_contact">Contact Details</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_contact">[% c.loc('Contact Details') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_contact">
<div class="accordion-inner">
[% UNLESS c.user.read_only -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/contact', contact_hash.id, 'edit') %]"><i class="icon-edit"></i> Edit Contact</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/contact', contact_hash.id, 'edit') %]"><i class="icon-edit"></i> [% c.loc('Edit Contact') %]</a>
</span>
<div class="ngcp-separator"></div>
[% END -%]
<table class="table table-bordered table-striped table-highlight table-hover">
<thead>
<th>Name</th>
<th>Value</th>
<tr>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Value') %]</th>
</tr>
</thead>
<tbody>
<tr>
<td>Email</td>
<td>[% c.loc('Email') %]</td>
<td>[% contact_hash.email%]</td>
</tr>
<tr>
<td>Name</td>
<td>[% c.loc('Name') %]</td>
<td>[% contact_hash.firstname %] [% contact_hash.lastname %]</td>
</tr>
<tr>
<td>Company</td>
<td>[% c.loc('Company') %]</td>
<td>[% contact_hash.company%]</td>
</tr>
<tr>
<td>Address</td>
<td>[% c.loc('Address') %]</td>
<td>
[% contact_hash.street %]<br/>
[% contact_hash.postcode %] [% contact_hash.city %]<br/>
@ -109,7 +113,7 @@
</td>
</tr>
<tr>
<td>Phone/Fax</td>
<td>[% c.loc('Phone/Fax') %]</td>
<td>
Mobile: [% contact_hash.mobilenumber %]<br/>
Fixed: [% contact_hash.phonenumber %]<br/>
@ -124,15 +128,15 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_bilprofs">Billing Profiles</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_bilprofs">[% c.loc('Billing Profiles') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_bilprofs">
<div class="accordion-inner">
<table class="table table-bordered table-striped table-highlight table-hover">
<thead>
<tr>
<th>Date</th>
<th>Billing Profile Name</th>
<th>[% c.loc('Date') %]</th>
<th>[% c.loc('Billing Profile Name') %]</th>
</tr>
</thead>
<tbody>
@ -153,28 +157,38 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_subs">Subscribers</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_subs">[% c.loc('Subscribers') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_subs">
<div class="accordion-inner">
[% IF contract.max_subscribers.defined && subscriber_count < contract.max_subscribers -%]
<div class="alert alert-info">[% subscriber_count -%] of maximum [% contract.max_subscribers %] subscribers [% IF c.config.features.cloudpbx %](including PBX groups) [% END %]created</div>
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/subscriber_create', [ c.req.captures.0 ]) %]"><i class="icon-star"></i> Create Subscriber</a>
<div class="alert alert-info">
[% c.loc('[_1] of maximum [_2] subscribers [_3]created',subscriber_count,contract.max_subscribers,
c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
</div>
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/subscriber_create', [ c.req.captures.0 ]) %]">
<i class="icon-star"></i> [% c.loc('Create Subscriber') %]
</a>
[% ELSIF contract.max_subscribers.defined -%]
<div class="alert">Maximum number of [% contract.max_subscribers %] subscribers [% IF c.config.features.cloudpbx %](including PBX groups) [% END %]created</div>
<div class="alert">
[% c.loc('Maximum number of [_1] subscribers [_2]created',contract.max_subscribers,
c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
</div>
[% ELSE -%]
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/subscriber_create', [ c.req.captures.0 ]) %]"><i class="icon-star"></i> Create Subscriber</a>
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/subscriber_create', [ c.req.captures.0 ]) %]">
<i class="icon-star"></i> [% c.loc('Create Subscriber') %]
</a>
[% END -%]
<div class="ngcp-separator"></div>
<table class="table table-bordered table-striped table-highlight table-hover" id="subscribers_table">
<thead>
<tr>
<th>SIP URI</th>
<th>Primary Number</th>
<th>[% c.loc('SIP URI') %]</th>
<th>[% c.loc('Primary Number') %]</th>
[% IF c.config.features.cloudpbx && product.class == 'pbxaccount' -%]
<th>PBX Group</th>
<th>[% c.loc('PBX Group') %]</th>
[% END -%]
<th>Registered Devices</th>
<th>[% c.loc('Registered Devices') %]</th>
<th class="ngcp-actions-column"></th>
</tr>
</thead>
@ -195,10 +209,15 @@
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/details", [subscriber.id]) %]"><i class="icon-th-list"></i> Details</a>
<a class="btn btn-tertiary btn-small" href="[% c.uri_for_action("/subscriber/preferences", [subscriber.id]) %]"><i class="icon-list"></i> Preferences</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/details", [subscriber.id]) %]">
<i class="icon-th-list"></i> [% c.loc('Details') %]
</a>
<a class="btn btn-tertiary btn-small" href="[% c.uri_for_action("/subscriber/preferences", [subscriber.id]) %]">
<i class="icon-list"></i> [% c.loc('Preferences') %]
</a>
[% IF (!c.user.readonly && (c.user.role == 'admin' || c.user.role == 'reseller')) || c.user.uuid != subscriber.uuid -%]
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/subscriber/terminate", [subscriber.id]) %]" data-confirm="Terminate"><i class="icon-remove"></i> Terminate</a>
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/subscriber/terminate", [subscriber.id]) %]" data-confirm="Terminate">
<i class="icon-remove"></i> [% c.loc('Terminate') %]</a>
[% END -%]
</div>
</td>
@ -213,26 +232,34 @@
[% IF c.config.features.cloudpbx && product.class == 'pbxaccount' && subscribers.size -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_pbxgroups">PBX Groups</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_pbxgroups">[% c.loc('PBX Groups') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_pbxgroups">
<div class="accordion-inner">
[% IF contract.max_subscribers.defined && subscriber_count < contract.max_subscribers -%]
<div class="alert alert-info">[% subscriber_count -%] of maximum [% contract.max_subscribers %] subscribers [% IF c.config.features.cloudpbx %](including PBX groups) [% END %]created</div>
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/pbx_group_create', [ c.req.captures.0 ]) %]"><i class="icon-star"></i> Create PBX Group</a>
<div class="alert alert-info">
[% c.loc('[_1] of maximum [_2] subscribers [_3]created',subscriber_count, contract.max_subscribers,
c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
</div>
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/pbx_group_create', [ c.req.captures.0 ]) %]">
<i class="icon-star"></i> [% c.loc('Create PBX Group') %]
</a>
[% ELSIF contract.max_subscribers.defined -%]
<div class="alert">Maximum number of [% contract.max_subscribers %] subscribers [% IF c.config.features.cloudpbx %](including PBX groups) [% END %]created</div>
<div class="alert">
[% c.loc('Maximum number of [_1] subscribers [_2]created',contract.max_subscribers,
c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
</div>
[% END -%]
<div class="ngcp-separator"></div>
<table class="table table-bordered table-striped table-highlight table-hover" id="subscribers_table">
<thead>
<tr>
<th>Name</th>
<th>SIP URI</th>
<th>Primary Number</th>
<th>Hunting Policy</th>
<th>Hunting Timeout</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('SIP URI') %]</th>
<th>[% c.loc('Primary Number') %]</th>
<th>[% c.loc('Hunting Policy') %]</th>
<th>[% c.loc('Hunting Timeout') %]</th>
<th class="ngcp-actions-column"></th>
</tr>
</thead>
@ -247,11 +274,19 @@
<td class="ngcp-actions-column">
<div class="sw_actions">
[% UNLESS c.user.readonly -%]
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/subscriber/terminate", [subscriber.id]) %]" data-confirm="Terminate"><i class="icon-remove"></i> Terminate</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/customer/pbx_group_edit", [contract.id, subscriber.voip_pbx_group.id]) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/subscriber/terminate", [subscriber.id]) %]" data-confirm="Terminate">
<i class="icon-remove"></i> [% c.loc('Terminate') %]
</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/customer/pbx_group_edit", [contract.id, subscriber.voip_pbx_group.id]) %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/details", [subscriber.id]) %]"><i class="icon-th-list"></i> Details</a>
<a class="btn btn-tertiary btn-small" href="[% c.uri_for_action("/subscriber/preferences", [subscriber.id]) %]"><i class="icon-list"></i> Preferences</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/details", [subscriber.id]) %]">
<i class="icon-th-list"></i> [% c.loc('Details') %]
</a>
<a class="btn btn-tertiary btn-small" href="[% c.uri_for_action("/subscriber/preferences", [subscriber.id]) %]">
<i class="icon-list"></i> [% c.loc('Preferences') %]
</a>
</div>
</td>
</tr>
@ -264,20 +299,20 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_pbxdevs">PBX Devices</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_pbxdevs">[% c.loc('PBX Devices') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_pbxdevs">
<div class="accordion-inner">
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/pbx_device_create', [ c.req.captures.0 ]) %]"><i class="icon-star"></i> Create PBX Device</a>
<a class="btn btn-large btn-primary" href="[% c.uri_for_action('/customer/pbx_device_create', [ c.req.captures.0 ]) %]"><i class="icon-star"></i> [% c.loc('Create PBX Device') %]</a>
<div class="ngcp-separator"></div>
<table class="table table-bordered table-striped table-highlight table-hover" id="subscribers_table">
<thead>
<tr>
<th></th>
<th>Station Name</th>
<th>Subscriber</th>
<th>MAC Address / Identifier</th>
<th>Device Profile</th>
<th>[% c.loc('Station Name') %]</th>
<th>[% c.loc('Subscriber') %]</th>
<th>[% c.loc('MAC Address / Identifier') %]</th>
<th>[% c.loc('Device Profile') %]</th>
<th class="ngcp-actions-column"></th>
</tr>
</thead>
@ -299,9 +334,15 @@
<td class="ngcp-actions-column">
<div class="sw_actions">
[% UNLESS c.user.readonly -%]
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/customer/pbx_device_delete", [contract.id, dev.id])%]" data-confirm="Delete"><i class="icon-remove"></i> Delete</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/customer/pbx_device_edit", [contract.id, dev.id]) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/customer/pbx_device_sync", [contract.id, dev.id]) %]"><i class="icon-edit"></i> Sync Device</a>
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/customer/pbx_device_delete", [contract.id, dev.id])%]" data-confirm="Delete">
<i class="icon-remove"></i> [% c.loc('Delete') %]
</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/customer/pbx_device_edit", [contract.id, dev.id]) %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/customer/pbx_device_sync", [contract.id, dev.id]) %]">
<i class="icon-edit"></i> [% c.loc('Sync Device') %]
</a>
[% END -%]
</div>
</td>
@ -320,28 +361,29 @@
-%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_soundsets">Sound Sets</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_soundsets">[% c.loc('Sound Sets') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_soundsets">
<div class="accordion-inner">
[%
helper.name = 'Sound Sets';
helper.name = c.loc('Sound Set');
helper.identifier = 'sound_sets';
helper.dt_columns = soundset_dt_columns;
helper.ajax_uri = c.uri_for_action('/sound/contract_ajax', [ c.req.captures.0 ]);
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/sound/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "/sound/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Files', uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/sound/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/sound/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Files'), uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Sound Set', uri = c.uri_for_action('/sound/create', c.req.captures.0), icon = 'icon-star', accordion_button = 1 },
{ name = c.loc('Create Sound Set'), uri = c.uri_for_action('/sound/create', c.req.captures.0), icon = 'icon-star', accordion_button = 1 },
];
ELSE;
helper.dt_buttons = [
{ name = 'Files', uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Files'), uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;
@ -354,7 +396,7 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_balance">Contract Balance</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_balance">[% c.loc('Contract Balance') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_balance">
<div class="accordion-inner">
@ -362,8 +404,8 @@
<thead>
<tr>
<th></th>
<th>Cash</th>
<th>Free time</th>
<th>[% c.loc('Cash') %]</th>
<th>[% c.loc('Free time') %]</th>
<th class="ngcp-actions-column"></th>
</tr>
</thead>
@ -371,20 +413,20 @@
[% USE format %]
[% money_format = format('%.2f') %]
<tr class="sw_action_row">
<td>Current totals</td>
<td>[% c.loc('Current totals') %]</td>
<td>[% money_format(balance.cash_balance / 100) %]</td>
<td>[% balance.free_time_balance %]</td>
<td class="ngcp-actions-column">
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary"
href="[% c.uri_for_action("/customer/edit_balance", [contract.id]) %]">
<i class="icon-edit"></i> Edit
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
</div>
</td>
</tr>
<tr>
<td>Spent this interval</td>
<td>[% c.loc('Spent this interval') %]</td>
<td>[% money_format( balance.cash_balance_interval / 100 ) %]</td>
<td>[% balance.free_time_balance_interval %]</td>
<td></td>
@ -398,7 +440,7 @@
[% IF c.user.roles == 'admin' || c.user.roles == 'reseller' %]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_fraud">Fraud Limits</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#customer_details" href="#collapse_fraud">[% c.loc('Fraud Limits') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_fraud">
<div class="accordion-inner">
@ -406,16 +448,16 @@
<thead>
<tr>
<th></th>
<th>Limit</th>
<th>Lock Level</th>
<th>Notify</th>
<th>[% c.loc('Limit') %]</th>
<th>[% c.loc('Lock Level') %]</th>
<th>[% c.loc('Notify') %]</th>
<th class="ngcp-actions-column"></th>
</tr>
</thead>
<tbody>
<tr class="sw_action_row">
<td>Monthly Settings</td>
[% fraud_def_message = (fraud.fraud_interval_limit.defined ? "none" : "billing profile default") %]
<td>[% c.loc('Monthly Settings') %]</td>
[% fraud_def_message = (fraud.fraud_interval_limit.defined ? "none" : c.loc("billing profile default")) %]
<td>[% fraud.fraud_interval_limit.defined ? fraud.fraud_interval_limit : fraud_def_message %]</td>
<td>
[% IF fraud.fraud_interval_lock.defined -%]
@ -433,18 +475,18 @@
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary"
href="[% c.uri_for_action("/customer/edit_fraud", [c.req.captures.0], "month") %]">
<i class="icon-edit"></i> Edit</i>
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
<a class="btn btn-small btn-secondary" data-confirm="Delete"
href="[% c.uri_for_action("/customer/delete_fraud", [c.req.captures.0], "month") %]">
<i class="icon-trash"></i> Delete</i>
<i class="icon-trash"></i> [% c.loc('Delete') %]
</a>
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Daily Settings</td>
[% fraud_def_message = (fraud.fraud_daily_limit.defined ? "none" : "billing profile default") %]
<td>[% c.loc('Daily Settings') %]</td>
[% fraud_def_message = (fraud.fraud_daily_limit.defined ? "none" : c.loc("billing profile default")) %]
<td>[% fraud.fraud_daily_limit.defined ? fraud.fraud_daily_limit : fraud_def_message %]</td>
<td>
[% IF fraud.fraud_daily_lock.defined -%]
@ -462,11 +504,11 @@
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary"
href="[% c.uri_for_action("/customer/edit_fraud", [c.req.captures.0], "day") %]">
<i class="icon-edit"></i> Edit</i>
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
<a class="btn btn-small btn-secondary" data-confirm="Delete"
href="[% c.uri_for_action("/customer/delete_fraud", [c.req.captures.0], "day") %]">
<i class="icon-trash"></i> Delete</i>
<i class="icon-trash"></i> [% c.loc('Delete') %]
</a>
</div>
</td>
@ -486,7 +528,7 @@
END;
PROCESS "helpers/modal.tt";
modal_header(m.create_flag = create_flag,
m.name = description.defined ? description : "Subscriber");
m.name = description.defined ? description : c.loc("Subscriber"));
form.render;
modal_footer();
modal_script(m.close_target = close_target);
@ -498,7 +540,7 @@
END;
PROCESS "helpers/modal.tt";
modal_header(m.create_flag=0,
m.name = "Settings");
m.name = c.loc("Settings"));
form.render;
modal_footer();
modal_script(m.close_target = close_target);
@ -507,7 +549,7 @@
[%
PROCESS "helpers/modal.tt";
modal_header(m.create_flag=0, m.edit_flag=0,
m.name = "Deployed Device");
m.name = c.loc("Deployed Device"));
form.render;
modal_footer();
modal_script(m.close_target = close_target);

@ -1,6 +1,7 @@
[% META title = 'Customers' -%]
[% site_config.title = c.loc('Customers') -%]
[%
helper.name = 'Customer';
helper.name = c.loc('Customer');
helper.identifier = 'Customer';
helper.data = contracts;
helper.messages = messages;
helper.dt_columns = contract_dt_columns;
@ -14,20 +15,20 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/customer/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Terminate', uri = "/customer/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' },
{ name = 'Details', uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/customer/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Terminate'), uri = "/customer/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' },
{ name = c.loc('Details'), uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Customer', uri = c.uri_for_action('/customer/create'), icon = 'icon-star' },
{ name = c.loc('Create Customer'), uri = c.uri_for_action('/customer/create'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Details', uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Details'), uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;
IF helper.edit_flag; helper.name = 'Customer #' _ contract.id; END;
IF helper.edit_flag; helper.name = c.loc('Customer #[_1]',contract.id); END;
PROCESS 'helpers/datatables.tt';
-%]

@ -1,4 +1,4 @@
[% META title = 'Dashboard' -%]
[% site_config.title = c.loc('Dashboard') -%]
[% wcount = widgets.size() > 4 ? 4 : widgets.size() -%]
<div class="row">
<div class="span12">

@ -4,12 +4,12 @@
<div class="error-container">
<h1>Forbidden!</h1>
<h1>[% c.loc('Forbidden!') %]</h1>
<h2>[% c.response.status %] Access Denied</h2>
<h2>[% c.loc('[_1] Access Denied', c.response.status) %]</h2>
<div class="error-details">
Sorry, an error has occured, requested operation denied!
[% c.loc('Sorry, an error has occured, requested operation denied!') %]
</div> <!-- /error-details -->
@ -17,13 +17,13 @@
<a href="[% c.uri_for('/back') %]" class="btn btn-large btn-primary">
<i class="icon-chevron-left"></i>
&nbsp;
Back
[% c.loc('Back') %]
</a>
<a href="mailto:[% c.config.contact.email %]" class="btn btn-large">
<i class="icon-envelope"></i>
&nbsp;
Contact Support
[% c.loc('Contact Support') %]
</a>
</div> <!-- /error-actions -->

@ -1,8 +1,8 @@
[% META title = 'Device Management' -%]
[%site_config.title = c.loc('Device Management') -%]
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -19,18 +19,19 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devmod">Device Models</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devmod">[% c.loc('Device Models') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_devmod">
<div class="accordion-inner">
[% UNLESS c.user.read_only -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/model/create') %]"><i class="icon-star"></i> Create Device Model</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/model/create') %]"><i class="icon-star"></i> [% c.loc('Create Device Model') %]</a>
</span>
<div class="ngcp-separator"></div>
[% END -%]
[%
helper.name = 'Device Model';
helper.name = c.loc('Device Model');
helper.identifier = 'device_model';
helper.data = devmod;
helper.dt_columns = devmod_dt_columns;
helper.length_change = 1;
@ -43,8 +44,8 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "/device/model/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Edit', uri = "/device/model/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/device/model/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = "/device/model/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
];
END;
@ -56,18 +57,19 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devfw">Device Firmwares</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devfw">[% c.loc('Device Firmwares') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_devfw">
<div class="accordion-inner">
[% UNLESS c.user.read_only -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/firmware/create') %]"><i class="icon-star"></i> Upload Device Firmware</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/firmware/create') %]"><i class="icon-star"></i> [% c.loc('Upload Device Firmware') %]</a>
</span>
<div class="ngcp-separator"></div>
[% END -%]
[%
helper.name = 'Device Firmware';
helper.name = c.loc('Device Firmware');
helper.identifier = 'device_firmware';
helper.data = devfw;
helper.dt_columns = devfw_dt_columns;
helper.length_change = 1;
@ -80,9 +82,9 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "/device/firmware/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Edit', uri = "/device/firmware/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Download', uri = "/device/firmware/'+full.id+'/download", class = 'btn-small btn-tertiary', icon = 'icon-download-alt' },
{ name = c.loc('Delete'), uri = "/device/firmware/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = "/device/firmware/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Download'), uri = "/device/firmware/'+full.id+'/download", class = 'btn-small btn-tertiary', icon = 'icon-download-alt' },
];
END;
@ -94,18 +96,19 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devconf">Device Configurations</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devconf">[% c.loc('Device Configurations') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_devconf">
<div class="accordion-inner">
[% UNLESS c.user.read_only -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/config/create') %]"><i class="icon-star"></i> Create Device Configuration</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/config/create') %]"><i class="icon-star"></i> [% c.loc('Create Device Configuration') %]</a>
</span>
<div class="ngcp-separator"></div>
[% END -%]
[%
helper.name = 'Device Configuration';
helper.name = c.loc('Device Configuration');
helper.identifier = 'device_configuration';
helper.data = devconf;
helper.dt_columns = devconf_dt_columns;
helper.length_change = 1;
@ -118,9 +121,9 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "/device/config/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Edit', uri = "/device/config/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Download', uri = "/device/config/'+full.id+'/download", class = 'btn-small btn-tertiary', icon = 'icon-download-alt' },
{ name = c.loc('Delete'), uri = "/device/config/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = "/device/config/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Download'), uri = "/device/config/'+full.id+'/download", class = 'btn-small btn-tertiary', icon = 'icon-download-alt' },
];
END;
@ -132,18 +135,19 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devprof">Device Profiles</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#device_details" href="#collapse_devprof">[% c.loc('Device Profiles') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_devprof">
<div class="accordion-inner">
[% UNLESS c.user.read_only -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/profile/create') %]"><i class="icon-star"></i> Create Device Profile</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/device/profile/create') %]"><i class="icon-star"></i> [% c.loc('Create Device Profile') %]</a>
</span>
<div class="ngcp-separator"></div>
[% END -%]
[%
helper.name = 'Device Profile';
helper.name = c.loc('Device Profile');
helper.identifier = 'device_profile';
helper.data = devprof;
helper.dt_columns = devprof_dt_columns;
helper.length_change = 1;
@ -156,8 +160,8 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "/device/profile/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Edit', uri = "/device/profile/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/device/profile/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = "/device/profile/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
];
END;

@ -1,6 +1,7 @@
[% META title = 'Domains' -%]
[% site_config.title = c.loc('Domains') -%]
[%
helper.name = 'Domain';
helper.name = c.loc('Domain');
helper.identifier = 'Domain';
helper.data = domains;
helper.messages = messages;
helper.dt_columns = domain_dt_columns;
@ -14,15 +15,15 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "/domain/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Preferences', uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Delete'), uri = "/domain/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Preferences'), uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Domain', uri = c.uri_for('/domain/create'), icon = 'icon-star' },
{ name = c.loc('Create Domain'), uri = c.uri_for('/domain/create'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Preferences', uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Preferences'), uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -1,7 +1,8 @@
[% site_config.title = 'Domain "' _ domain.domain _ '" Preferences' -%]
[% site_config.title = c.loc('Domain "[_1]" Preferences', domain.domain) -%]
[%
helper.name = 'Domain';
helper.name = c.loc('Domain');
helper.identifier = 'domain';
helper.messages = messages;
helper.edit_preference = edit_preference;
@ -16,7 +17,7 @@
helper.man_aip_grp_rs = man_aip_grp_rs;
helper.top_buttons = [
{ name = 'Back', uri = c.uri_for(), icon = 'icon-arrow-left' },
{ name = c.loc('Back'), uri = c.uri_for(), icon = 'icon-arrow-left' },
];
PROCESS 'helpers/pref_table.tt';

@ -4,24 +4,23 @@
<div class="error-container">
<h1>Sorry!</h1>
<h1>[% c.loc('Sorry!') %]</h1>
<h2>[% c.response.status %] Internal server error </h2>
<h2>[% c.loc('[_1] Internal server error', c.response.status) %]</h2>
<div class="error-details">
<p>We are terribly sorry, an exceptional error has occured:</p>
<div><strong>incident number:</strong> [% exception_incident %]</div>
<div><strong>time of incident:</strong> [% exception_timestamp %]</div>
<p>[% c.loc('We are terribly sorry, an exceptional error has occured:') %]</p>
<div><strong>[% c.loc('incident number:') %]</strong> [% exception_incident %]</div>
<div><strong>[% c.loc('time of incident:') %]</strong> [% exception_timestamp %]</div>
<br/>
<p>Details have been logged on the server. If you want to report the error,
describe what you were doing or attempting to do just before.</p>
<p>[% c.loc('Details have been logged on the server. If you want to report the error, describe what you were doing or attempting to do just before.') %]</p>
</div> <!-- /error-details -->
<div class="error-actions">
<a href="[% c.uri_for('/back') %]" class="btn btn-large btn-primary ngcp-error-button">
<i class="icon-chevron-left"></i> Back to Dashboard</a>
<i class="icon-chevron-left"></i> [% c.loc('Back to Dashboard') %]</a>
<a href="mailto:[% c.config.contact.email %]?subject=NGCP-Panel Incident [% exception_incident %]" class="btn btn-large ngcp-error-button">
<i class="icon-envelope"></i> Contact Support</a>
<i class="icon-envelope"></i> [% c.loc('Contact Support') %]</a>
</div> <!-- /error-actions -->

@ -34,10 +34,10 @@
[% # one for description -%]
<th></th>
[% UNLESS c.user.roles == 'subscriber' || c.user.roles == 'subscriberadmin' -%]
<th>Attribute</th>
<th>[% c.loc('Attribute') %]</th>
[% END -%]
<th>Name</th>
<th>Value</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Value') %]</th>
[% # one for actions -%]
<th class="span3"></th>
</tr>

@ -1,13 +1,12 @@
<body class="login">
<div class="account-container login stacked">
<div class="content clearfix">
<h1>[% realm FILTER ucfirst %] Sign In</h1>
<p>Sign in using your [% realm %] credentials:</p>
<h1>[% c.loc('[_1] Sign In', realm.ucfirst) %]</h1>
<p>[% c.loc('Sign in using your [_1] credentials:', realm) %]</p>
[% form.render %]
</div>
</div>
<div class="login-extra">
Go to
[%
realms = ['subscriber', 'admin'];
links = [];
@ -17,16 +16,15 @@
links.push(link);
END;
END;
links.join(' or ');
-%]
login.
[% c.loc('Go to [_1] login.', links.join(c.loc(' or '))) %]
<br/>
</div>
[%#
TODO: load this only if a signup plugin is installed
<div class="login-extra">
Don't have an account? <a href="signup.html">Sign Up</a><br/>
c.loc('Don't have an account?') <a href="signup.html">c.loc('Sign Up')</a><br/>
</div>
%]

@ -1,6 +1,7 @@
[% META title = 'NCOS Levels' -%]
[% site_config.title = c.loc('NCOS Levels') -%]
[%
helper.name = 'NCOS Levels';
helper.name = c.loc('NCOS Level');
helper.identifier = 'ncos_level';
helper.messages = messages;
helper.dt_columns = level_dt_columns;
helper.length_change = 1;
@ -13,16 +14,16 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/ncos/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "/ncos/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Patterns', uri = "/ncos/'+full[\"id\"]+'/pattern", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/ncos/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/ncos/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Patterns'), uri = "/ncos/'+full[\"id\"]+'/pattern", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create NCOS Level', uri = c.uri_for('/ncos/create'), icon = 'icon-star' },
{ name = c.loc('Create NCOS Level'), uri = c.uri_for('/ncos/create'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Patterns', uri = "/ncos/'+full[\"id\"]+'/pattern", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Patterns'), uri = "/ncos/'+full[\"id\"]+'/pattern", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -1,7 +1,8 @@
[% site_config.title = 'Number Patterns for ' _ level_result.level -%]
[% site_config.title = c.loc('Number Patterns for [_1]', level_result.level) -%]
[%
helper.name = 'Number Pattern';
helper.name = c.loc('Number Pattern');
helper.identifier = 'number_pattern';
helper.messages = messages;
helper.dt_columns = pattern_dt_columns;
helper.length_change = 1;
@ -16,11 +17,11 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
helper.top_buttons = [
{ name = 'Create Pattern Entry', uri = c.uri_for_action( "/ncos/pattern_create", [c.req.captures.0] ), icon = 'icon-star' },
{ name = c.loc('Create Pattern Entry'), uri = c.uri_for_action( "/ncos/pattern_create", [c.req.captures.0] ), icon = 'icon-star' },
];
END;
@ -30,12 +31,12 @@
<div id="number_patterns_local_ac">
<input id="local_ac" type="checkbox" name="local_ac" disabled="disabled"
[% IF local_ac_checked %]checked="checked"[% END %]>
<label for="local_ac">Include local area code</label>
<label for="local_ac">[% c.loc('Include local area code') %]</label>
<div>
<a class="btn btn-primary btn-small"
href="[% c.uri_for_action("/ncos/pattern_edit_local_ac", [c.req.captures.0]) %]">
<i class="icon-edit"></i> Edit
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
</div>
</div>

@ -4,12 +4,12 @@
<div class="error-container">
<h1>Oops!</h1>
<h1>[% c.loc('Oops!') %]</h1>
<h2>[% c.response.status %] Not found</h2>
<h2>[% c.loc('[_1] Not found', c.response.status) %]</h2>
<div class="error-details">
Sorry, an error has occured, Requested page not found!
[% c.loc('Sorry, an error has occured, Requested page not found!') %]
</div> <!-- /error-details -->
@ -17,13 +17,13 @@
<a href="[% c.uri_for('/back') %]" class="btn btn-large btn-primary">
<i class="icon-chevron-left"></i>
&nbsp;
Back to Dashboard
[% c.loc('Back to Dashboard') %]
</a>
<a href="mailto:[% c.config.contact.email %]" class="btn btn-large">
<i class="icon-envelope"></i>
&nbsp;
Contact Support
[% c.loc('Contact Support') %]
</a>
</div> <!-- /error-actions -->

@ -1,6 +1,7 @@
[% META title = 'SIP Peering Groups' -%]
[% site_config.title = c.loc('SIP Peering Groups') -%]
[%
helper.name = 'SIP Peering Groups';
helper.name = c.loc('SIP Peering Group');
helper.identifier = 'sip_peering_group';
helper.messages = messages;
helper.dt_columns = peering_group_dt_columns;
helper.length_change = 1;
@ -13,16 +14,16 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/peering/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "/peering/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Details', uri = "/peering/'+full.id+'/servers", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/peering/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/peering/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Details'), uri = "/peering/'+full.id+'/servers", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Peering Group', uri = c.uri_for('/peering/create'), icon = 'icon-star' },
{ name = c.loc('Create Peering Group'), uri = c.uri_for('/peering/create'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Details', uri = "/peering/'+full.id+'/servers", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Details'), uri = "/peering/'+full.id+'/servers", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -1,4 +1,4 @@
[% site_config.title = 'Peer Host "' _ server.name _ '" Preferences' -%]
[% site_config.title = c.loc('Peer Host "[_1]" Preferences',server.name) -%]
[%
helper.messages = messages;
@ -14,10 +14,10 @@
helper.man_aip_grp_rs = man_aip_grp_rs;
helper.dt_buttons = [
{ name = 'Edit', uri = c.uri_for_action("/peering/servers_preferences_root", [c.req.captures.0, c.req.captures.1]), class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Edit'), uri = c.uri_for_action("/peering/servers_preferences_root", [c.req.captures.0, c.req.captures.1]), class = 'btn-small btn-primary', icon = 'icon-edit' },
];
helper.top_buttons = [
{ name = 'Back', uri = c.uri_for(group.id, "servers"), icon = 'icon-arrow-left' },
{ name = c.loc('Back'), uri = c.uri_for(group.id, "servers"), icon = 'icon-arrow-left' },
];
PROCESS 'helpers/pref_table.tt';

@ -1,7 +1,8 @@
[% site_config.title = 'SIP Peering Group ' _ group.name -%]
<h3>Peering Servers</h3>
[% site_config.title = c.loc('SIP Peering Group [_1]', group.name) -%]
<h3>[% c.loc('Peering Servers') %]</h3>
[%
helper.name = 'Peering Servers';
helper.name = c.loc('Peering Server');
helper.identifier = 'peering_servers';
helper.messages = messages;
helper.dt_columns = server_dt_columns;
@ -14,16 +15,16 @@
helper.tmpuri = c.uri_for_action("/peering/servers_root", [c.req.captures.0]);
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Preferences', uri = helper.tmpuri _ "/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Preferences'), uri = helper.tmpuri _ "/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Peering Server', uri = helper.tmpuri _ "/create", icon = 'icon-star' },
{ name = c.loc('Create Peering Server'), uri = helper.tmpuri _ "/create", icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Preferences', uri = helper.tmpuri _ "/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Preferences'), uri = helper.tmpuri _ "/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;
@ -31,9 +32,10 @@
-%]
<div class="ngcp-separator"></div>
<h3>Peering Rules</h3>
<h3>[% c.loc('Peering Rules') %]</h3>
[%
helper.name = 'Peering Rules';
helper.name = c.loc('Peering Rule');
helper.identifier = 'PeeringRules';
helper.messages = rules_messages;
helper.dt_columns = rules_dt_columns;
helper.close_target = close_target;
@ -45,11 +47,11 @@
helper.tmpuri = c.uri_for(group.id, "rules");
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
helper.top_buttons = [
{ name = 'Create Peering Rule', uri = helper.tmpuri _ "/create", icon = 'icon-star' },
{ name = c.loc('Create Peering Rule'), uri = helper.tmpuri _ "/create", icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [];

@ -1,8 +1,8 @@
[% site_config.title = 'Reseller Details for ' _ reseller.first.name -%]
[% site_config.title = c.loc('Reseller Details for [_1]', reseller.first.name) -%]
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -14,7 +14,7 @@
<div class="alert alert-[% m.type %]">[% m.text %]</div>
[% END -%]
[% IF reseller.first.status != "active" -%]
<div class="alert">Reseller is <b>[% reseller.first.status %]</b></div>
<div class="alert">[% c.loc('Reseller is <b>[_1]</b>', reseller.first.status) %]</div>
[% END -%]
[% messages = [] -%]
</div>
@ -24,12 +24,13 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_reseller">Reseller Base Information</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_reseller">[% c.loc('Reseller Base Information') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_reseller">
<div class="accordion-inner">
[%
helper.name = 'Reseller';
helper.name = c.loc('Reseller');
helper.identifier = 'Reseller';
helper.messages = messages;
helper.dt_columns = reseller_dt_columns;
helper.paginate = 'false';
@ -43,7 +44,7 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/reseller/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Edit'), uri = "/reseller/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
];
END;
@ -55,12 +56,13 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_contract">Reseller Contract</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_contract">[% c.loc('Reseller Contract') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_contract">
<div class="accordion-inner">
[%
helper.name = 'Contract';
helper.name = c.loc('Contract');
helper.identifier = "Contract";
helper.messages = messages;
helper.dt_columns = contract_dt_columns;
helper.close_target = close_target;
@ -74,7 +76,7 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/contract/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Edit'), uri = "/contract/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
];
END;
@ -86,12 +88,12 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_contact">Reseller Contact</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_contact">[% c.loc('Reseller Contact') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_contact">
<div class="accordion-inner">
[%
helper.name = 'Contact';
helper.name = c.loc('Contact');
helper.messages = messages;
helper.dt_columns = contact_dt_columns;
helper.close_target = c.uri_for('');
@ -105,7 +107,7 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/contact/'+full.id+'/edit/noreseller", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Edit'), uri = "/contact/'+full.id+'/edit/noreseller", class = 'btn-small btn-primary', icon = 'icon-edit' },
];
END;
@ -117,12 +119,13 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_admin">Administrator Logins</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_admin">[% c.loc('Administrator Logins') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_admin">
<div class="accordion-inner">
[%
helper.name = 'Administrator';
helper.name = c.loc('Administrator');
helper.identifier = 'Administrator';
helper.messages = messages;
helper.dt_columns = admin_dt_columns;
helper.close_target = close_target;
@ -133,8 +136,8 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/administrator/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "/administrator/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = "/administrator/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/administrator/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
END;
@ -146,12 +149,13 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_domain">Domains</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_domain">[% c.loc('Domains') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_domain">
<div class="accordion-inner">
[%
helper.name = 'Domain';
helper.name = c.loc('Domain');
helper.identifier = 'Domain';
helper.messages = messages;
helper.dt_columns = domain_dt_columns;
helper.paginate = 'true';
@ -164,12 +168,12 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "/domain/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Preferences', uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Delete'), uri = "/domain/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Preferences'), uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Preferences', uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Preferences'), uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;
@ -181,12 +185,13 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_customer">Customers</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#reseller_details" href="#collapse_customer">[% c.loc('Customers') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_customer">
<div class="accordion-inner">
[%
helper.name = 'Customer';
helper.name = c.loc('Customer');
helper.identifier = "Customer";
helper.messages = messages;
helper.dt_columns = customer_dt_columns;
helper.paginate = 'true';
@ -199,13 +204,13 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/contract/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Terminate', uri = "/customer/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' },
{ name = 'Details', uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/contract/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Terminate'), uri = "/customer/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' },
{ name = c.loc('Details'), uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Details', uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Details'), uri = "/customer/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -1,6 +1,7 @@
[% META title = 'Resellers' -%]
[% site_config.title = c.loc('Resellers') -%]
[%
helper.name = 'Resellers';
helper.name = c.loc('Resellers');
helper.identifier = 'Resellers';
helper.data = resellers;
helper.messages = messages;
helper.dt_columns = reseller_dt_columns;
@ -14,17 +15,17 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/reseller/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Terminate', uri = "/reseller/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' },
{ name = 'Details', uri = "/reseller/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/reseller/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Terminate'), uri = "/reseller/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' },
{ name = c.loc('Details'), uri = "/reseller/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Reseller', uri = c.uri_for('/reseller/create'), icon = 'icon-star' },
{ name = 'Create Reseller with default values', uri = c.uri_for('/reseller/create_defaults'), icon = 'icon-star', method = 'post' },
{ name = c.loc('Create Reseller'), uri = c.uri_for('/reseller/create'), icon = 'icon-star' },
{ name = c.loc('Create Reseller with default values'), uri = c.uri_for('/reseller/create_defaults'), icon = 'icon-star', method = 'post' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Details', uri = "/reseller/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Details'), uri = "/reseller/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -1,13 +1,13 @@
[% site_config.title = 'Rewrite Rules for ' _ set_result.name -%]
[% site_config.title = c.loc('Rewrite Rules for [_1]', set_result.name) -%]
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> $c->loc('Back')</a>
</span>
[% back_created = 1 -%]
[% UNLESS c.user.read_only -%]
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/rewrite/rules_create', [c.req.captures.0]) %]"><i class="icon-star"></i> Create Rewrite Rule</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/rewrite/rules_create', [c.req.captures.0]) %]"><i class="icon-star"></i> $c->loc('Create Rewrite Rule')</a>
</span>
[% END -%]
</div>
@ -27,9 +27,9 @@
<thead>
<tr>
<th></th>
<th>Match Pattern</th>
<th>Replacement Pattern</th>
<th>Description</th>
<th>[% c.loc('Match Pattern') %]</th>
<th>[% c.loc('Replacement Pattern') %]</th>
<th>[% c.loc('Description') %]</th>
<th class="ngcp-actions-column"></th>
</tr>
</thead>
@ -51,10 +51,10 @@
[% UNLESS c.user.read_only -%]
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary" href="[% c.uri_for_action('/rewrite/rules_edit',[set_result.id, r.id]) %]">
<i class="icon-edit"></i> Edit
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
<a data-confirm="Delete" class="btn btn-small btn-secondary" href="[% c.uri_for_action('/rewrite/rules_delete',[set_result.id, r.id]) %]">
<i class="icon-trash"></i> Delete
<i class="icon-trash"></i> [% c.loc('Delete') %]
</a>
</div>
[% END -%]
@ -68,7 +68,7 @@
<div class="accordion" id="rewrite_rules">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_icaller">Inbound Rewrite Rules for Caller</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_icaller">[% c.loc('Inbound Rewrite Rules for Caller') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_icaller">
<div class="accordion-inner">
@ -78,7 +78,7 @@
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_icallee">Inbound Rewrite Rules for Callee</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_icallee">[% c.loc('Inbound Rewrite Rules for Callee') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_icallee">
<div class="accordion-inner">
@ -88,7 +88,7 @@
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_ocaller">Outbound Rewrite Rules for Caller</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_ocaller">[% c.loc('Outbound Rewrite Rules for Caller') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_ocaller">
<div class="accordion-inner">
@ -98,7 +98,7 @@
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_ocallee">Outbound Rewrite Rules for Callee</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#rewrite_rules" href="#collapse_ocallee">[% c.loc('Outbound Rewrite Rules for Callee') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_ocallee">
<div class="accordion-inner">
@ -111,7 +111,7 @@
[% IF edit_flag || create_flag -%]
[%
PROCESS "helpers/modal.tt";
modal_header(m.name = 'Rule',
modal_header(m.name = c.loc('Rule'),
m.create_flag = create_flag);
-%]

@ -1,6 +1,7 @@
[% META title = 'Rewrite Rule Sets' -%]
[% site_config.title = c.loc('Rewrite Rule Sets') -%]
[%
helper.name = 'Rewrite Rule Set';
helper.name = c.loc('Rewrite Rule Set');
helper.identifier = 'rewrite_rule_set';
helper.messages = messages;
helper.dt_columns = set_dt_columns;
helper.length_change = 1;
@ -12,22 +13,22 @@
helper.ajax_uri = c.uri_for_action( "/rewrite/set_ajax" );
IF clone_flag;
helper.name = 'cloned Rewrite Rule Set';
helper.name = c.loc('cloned Rewrite Rule Set');
END;
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/rewrite/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "/rewrite/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Rules', uri = "/rewrite/'+full.id+'/rules", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = 'Clone', uri = "/rewrite/'+full.id+'/clone", class = 'btn-small btn-tertiary', icon = 'icon-retweet' },
{ name = c.loc('Edit'), uri = "/rewrite/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/rewrite/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Rules'), uri = "/rewrite/'+full.id+'/rules", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Clone'), uri = "/rewrite/'+full.id+'/clone", class = 'btn-small btn-tertiary', icon = 'icon-retweet' },
];
helper.top_buttons = [
{ name = 'Create Rewrite Rule Set', uri = c.uri_for('/rewrite/create'), icon = 'icon-star' },
{ name = c.loc('Create Rewrite Rule Set'), uri = c.uri_for('/rewrite/create'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Rules', uri = "/rewrite/'+full.id+'/rules", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Rules'), uri = "/rewrite/'+full.id+'/rules", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -1,8 +1,8 @@
[% site_config.title = 'Security Bans' -%]
[% site_config.title = c.loc('Security Bans') -%]
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -19,7 +19,7 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#security_data" href="#collapse_ips">Banned IPs</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#security_data" href="#collapse_ips">[% c.loc('Banned IPs') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_ips">
<div class="accordion-inner">
@ -27,7 +27,7 @@
<table class="table table-bordered table-striped table-highlight table-hover" id="subscribers_table">
<thead>
<tr>
<th>IP</th>
<th>[% c.loc('IP') %]</th>
<th></th>
</tr>
</thead>
@ -40,7 +40,7 @@
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary"
href="[% c.uri_for_action("/security/ip_unban", [enc_ip]) %]">
<i class="icon-remove"></i> Unban
<i class="icon-remove"></i> [% c.loc('Unban') %]
</a>
</div>
</td>
@ -54,7 +54,7 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#security_data" href="#collapse_users">Banned Users</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#security_data" href="#collapse_users">[% c.loc('Banned Users') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_users">
<div class="accordion-inner">
@ -62,9 +62,9 @@
<table class="table table-bordered table-striped table-highlight table-hover" id="subscribers_table">
<thead>
<tr>
<th>User</th>
<th>Fail Count</th>
<th>Last Attempt</th>
<th>[% c.loc('User') %]</th>
<th>[% c.loc('Fail Count') %]</th>
<th>[% c.loc('Last Attempt') %]</th>
<th></th>
</tr>
</thead>
@ -79,7 +79,7 @@
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary"
href="[% c.uri_for_action("/security/user_unban", [enc_user]) %]">
<i class="icon-remove"></i> Unban
<i class="icon-remove"></i> [% c.loc('Unban') %]
</a>
</div>
</td>

@ -1,6 +1,6 @@
[% site_config.title = 'Manage Sound Set ' _ set_result.name -%]
[% site_config.title = c.loc('Manage Sound Set [_1]', set_result.name) -%]
<a class="btn btn-large btn-primary" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-large btn-primary" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
[% back_created = 1 -%]
[% IF messages -%]
@ -26,9 +26,9 @@
<thead>
<tr>
[% # one for description -%]
<th>Name</th>
<th>Filename</th>
<th>Loop</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Filename') %]</th>
<th>[% c.loc('Loop') %]</th>
[% # one for actions -%]
<th></th>
</tr>
@ -49,12 +49,12 @@
<div class="sw_actions pull-right">
[% IF r.get_column("filename").size -%]
[% UNLESS c.user.read_only -%]
<a class="btn btn-small btn-primary" href="[% handles_base_uri _ "/" _ r.get_column("handleid") _ "/edit" %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-small btn-secondary" data-confirm="Delete" href="[% handles_base_uri _ "/" _ r.get_column("handleid") _ "/delete" %]"><i class="icon-edit"></i> Delete</a>
<a class="btn btn-small btn-primary" href="[% handles_base_uri _ "/" _ r.get_column("handleid") _ "/edit" %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
<a class="btn btn-small btn-secondary" data-confirm="Delete" href="[% handles_base_uri _ "/" _ r.get_column("handleid") _ "/delete" %]"><i class="icon-edit"></i> [% c.loc('Delete') %]</a>
[% END -%]
<a class="btn btn-small btn-tertiary" href="[% c.uri_for_action('/sound/handles_download', [c.req.captures.0, r.get_column('handleid')]) %]"><i class="icon-play"></i> Play</a>
<a class="btn btn-small btn-tertiary" href="[% c.uri_for_action('/sound/handles_download', [c.req.captures.0, r.get_column('handleid')]) %]"><i class="icon-play"></i> [% c.loc('Play') %]</a>
[% ELSIF !c.user.read_only -%]
<a class="btn btn-small btn-primary" href="[% handles_base_uri _ "/" _ r.get_column("handleid") _ "/edit" %]"><i class="icon-edit"></i> Upload</a>
<a class="btn btn-small btn-primary" href="[% handles_base_uri _ "/" _ r.get_column("handleid") _ "/edit" %]"><i class="icon-edit"></i> [% c.loc('Upload') %]</a>
[% END -%]
</div>
</td>

@ -1,6 +1,7 @@
[% META title = 'Sound Sets' -%]
[% site_config.title = c.loc('Sound Sets') -%]
[%
helper.name = 'Sound Sets';
helper.name = c.loc('Sound Set');
helper.identifier = 'sound_set';
helper.messages = messages;
helper.dt_columns = soundset_dt_columns;
helper.length_change = 1;
@ -13,16 +14,16 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Edit', uri = "/sound/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "/sound/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = 'Files', uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Edit'), uri = "/sound/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "/sound/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Files'), uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
helper.top_buttons = [
{ name = 'Create Sound Set', uri = c.uri_for('/sound/create'), icon = 'icon-star' },
{ name = c.loc('Create Sound Set'), uri = c.uri_for('/sound/create'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Files', uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
{ name = c.loc('Files'), uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' },
];
END;

@ -20,7 +20,7 @@
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -34,13 +34,13 @@
<div class="ngcp-statistics">
<p>Click&amp;Drag on the graphs to zoom individual ranges.</p>
<p>[% c.loc('Click&Drag on the graphs to zoom individual ranges.') | html %]</p>
<div class="row-fluid">
[% even = 0 %]
[% FOREACH item IN plotdata %]
<h3>[% item.title %]</h3>
<div id="plot_[% item.name | replace('[^a-zA-Z0-9_]+', '_') %]" class="ngcp-plot"><div style="margin: 20px;"><img src="/img/loader.gif" alt="loading" style="margin-right: 10px;"/>loading...</div></div>
<div id="plot_[% item.name | replace('[^a-zA-Z0-9_]+', '_') %]" class="ngcp-plot"><div style="margin: 20px;"><img src="/img/loader.gif" alt="loading" style="margin-right: 10px;"/>[% c.loc('loading...') %]</div></div>
[% END %]
</div>
</div>

@ -1,8 +1,8 @@
[% site_config.title = 'Call List for ' _ subscriber.username _ '@' _ subscriber.domain.domain -%]
[% site_config.title = c.loc('Call List for [_1]@[_2]', subscriber.username, subscriber.domain.domain) -%]
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]

@ -1,4 +1,4 @@
[% site_config.title = 'Call Flow for Call-ID ' _ callid -%]
[% site_config.title = c.loc('Call Flow for Call-ID [_1]', callid) -%]
<script type="text/javascript" src="/js/libs/jquery.popup.js"></script>
<script type="text/javascript">
@ -12,8 +12,8 @@
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/subscriber/get_pcap', c.req.captures) %]"><i class="icon-file"></i> Download PCAP</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/subscriber/get_pcap', c.req.captures) %]"><i class="icon-file"></i> [% c.loc('Download PCAP') %]</a>
</span>
</div>
[% back_created = 1 -%]

@ -1,6 +1,7 @@
[% META title = 'Subscribers' -%]
[% site_config.title = c.loc('Subscribers') -%]
[%
helper.name = 'Subscriber';
helper.name = c.loc('Subscriber');
helper.identifier = 'subscriber';
helper.data = subscribers;
helper.messages = messages;
helper.column_sort = 'status';
@ -15,17 +16,17 @@
UNLESS c.user.read_only;
helper.dt_buttons = [
{ name = 'Terminate', uri = "/subscriber/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove', condition = 'full.status != "terminated"' },
{ name = 'Details', uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-th-list', condition = 'full.status != "terminated"' },
{ name = 'Customer', uri = "/customer/'+full.contract_id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-user' },
{ name = c.loc('Terminate'), uri = "/subscriber/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove', condition = 'full.status != "terminated"' },
{ name = c.loc('Details'), uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-th-list', condition = 'full.status != "terminated"' },
{ name = c.loc('Customer'), uri = "/customer/'+full.contract_id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-user' },
];
helper.top_buttons = [
{ name = 'Create Subscriber', uri = c.uri_for_action('/subscriber/create_list'), icon = 'icon-star' },
{ name = c.loc('Create Subscriber'), uri = c.uri_for_action('/subscriber/create_list'), icon = 'icon-star' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Details', uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-th-list', condition = 'full.status != "terminated"' },
{ name = 'Customer', uri = "/customer/'+full.contract_id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-user' },
{ name = c.loc('Details'), uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-th-list', condition = 'full.status != "terminated"' },
{ name = c.loc('Customer'), uri = "/customer/'+full.contract_id+'/details", class = 'btn-small btn-tertiary', icon = 'icon-user' },
];
END;

@ -1,10 +1,10 @@
[% site_config.title = 'Subscriber ' _ subscriber.username _ '@' _ subscriber.domain.domain -%]
[% site_config.title = c.loc('Subscriber [_1]@[_2]', subscriber.username, subscriber.domain.domain) -%]
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/subscriber/preferences', [ subscriber.id ]) %]"><i class="icon-list"></i> Preferences</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/customer/details', [ subscriber.contract_id ]) %]"><i class="icon-user"></i> Customer</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/subscriber/preferences', [ subscriber.id ]) %]"><i class="icon-list"></i> [% c.loc('Preferences') %]</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for_action('/customer/details', [ subscriber.contract_id ]) %]"><i class="icon-user"></i> [% c.loc('Customer') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -14,10 +14,10 @@
<div class="alert alert-[% m.type %]">[% m.text %]</div>
[% END -%]
[% IF subscriber && subscriber.status != "active" -%]
<div class="alert">Subscriber status is <b>[% subscriber.status %]</b></div>
<div class="alert">[% c.loc('Subscriber status is <b>[_1]</b>', subscriber.status) %]</div>
[% END -%]
[% IF prov_lock_string && prov_lock_string != "none" -%]
<div class="alert">Subscriber is locked for <b>[% prov_lock_string %]</b></div>
<div class="alert">[% c.loc('Subscriber is locked for <b>[_1]</b>', prov_lock_string) %]</div>
[% END -%]
</div>
@ -28,51 +28,51 @@
|| c.user.roles == 'subscriberadmin' -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_master">Master Data</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_master">[% c.loc('Master Data') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_master">
<div class="accordion-inner">
[% UNLESS (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only -%]
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/edit_master', [ subscriber.id ]) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/edit_master', [ subscriber.id ]) %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% END -%]
<div class="ngcp-separator"></div>
<table class="table table-bordered table-striped table-highlight table-hover" id="subscribers_table">
<thead>
<tr>
<th>Setting</th>
<th>Values</th>
<th>[% c.loc('Setting') %]</th>
<th>[% c.loc('Values') %]</th>
</tr>
</thead>
<tbody>
[% IF c.user.roles == "admin" || c.user.roles == "reseller" -%]
<tr class="sw_action_row">
<td>Customer #</td>
<td>[% c.loc('Customer #') %]</td>
<td>[% subscriber.contract.id %]</td>
</tr>
[% END -%]
[%
elements = [];
elements.push({ value = subscriber.status, desc = 'Status'});
elements.push({ value = subscriber.provisioning_voip_subscriber.webusername, desc = 'Web Username'});
elements.push({ value = subscriber.status, desc = c.loc('Status') });
elements.push({ value = subscriber.provisioning_voip_subscriber.webusername, desc = c.loc('Web Username') });
IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.show_passwords;
elements.push({ value = subscriber.provisioning_voip_subscriber.webpassword, desc = 'Web Password'});
elements.push({ value = subscriber.provisioning_voip_subscriber.webpassword, desc = c.loc('Web Password') });
END;
elements.push({ value = subscriber.username _ '@' _ subscriber.domain.domain, desc = 'SIP URI'});
elements.push({ value = subscriber.username _ '@' _ subscriber.domain.domain, desc = c.loc('SIP URI') });
IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.show_passwords;
elements.push({ value = subscriber.provisioning_voip_subscriber.password, desc = 'SIP Password'});
elements.push({ value = subscriber.provisioning_voip_subscriber.password, desc = c.loc('SIP Password') });
END;
IF subscriber.provisioning_voip_subscriber.voip_pbx_group.defined;
elements.push({ value = subscriber.provisioning_voip_subscriber.voip_pbx_group.name, desc = 'PBX Group' });
elements.push({ value = subscriber.provisioning_voip_subscriber.voip_pbx_group.name, desc = c.loc('PBX Group') });
END;
IF c.user.roles == "admin" || c.user.roles == "reseller";
elements.push({ value = subscriber.provisioning_voip_subscriber.admin ? 'yes' : 'no', desc = 'Administrative'});
elements.push({ value = subscriber.external_id, desc = 'External #'});
elements.push({ value = subscriber.uuid, desc = 'UUID'});
elements.push({ value = subscriber.provisioning_voip_subscriber.admin ? 'yes' : 'no', desc = c.loc('Administrative') });
elements.push({ value = subscriber.external_id, desc = c.loc('External #')});
elements.push({ value = subscriber.uuid, desc = c.loc('UUID') });
END;
elements.push({ value = subscriber.primary_number.cc _ ' ' _ subscriber.primary_number.ac _ ' ' _ subscriber.primary_number.sn, desc = 'Primary Number'});
elements.push({ value = subscriber.primary_number.cc _ ' ' _ subscriber.primary_number.ac _ ' ' _ subscriber.primary_number.sn, desc = c.loc('Primary Number') });
-%]
[% FOR elem IN elements -%]
@ -82,7 +82,7 @@
</tr>
[% END -%]
<tr>
<td>Alias Numbers</td>
<td>[% c.loc('Alias Numbers') %]</td>
<td>
[% FOR num IN subscriber.voip_numbers.all -%]
[% NEXT IF num.id == subscriber.primary_number.id -%]
@ -103,7 +103,7 @@
-%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_calls">Call History</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_calls">[% c.loc('Call History') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_calls">
<div class="accordion-inner">
@ -125,12 +125,13 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_voicemail">Voice Mails</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_voicemail">[% c.loc('Voice Mails') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_voicemail">
<div class="accordion-inner">
[%
helper.name = 'Voicemails';
helper.name = c.loc('Voicemails');
helper.identifier = 'voicemails';
helper.column_sort = 'origtime';
helper.dt_columns = vm_dt_columns;
@ -140,12 +141,12 @@
UNLESS (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only;
helper.dt_buttons = [
{ name = 'Play', uri = "details/voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' },
{ name = c.loc('Play'), uri = "details/voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' },
];
ELSE;
helper.dt_buttons = [
{ name = 'Play', uri = "details/voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' },
{ name = 'Delete', uri = "details/voicemail/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Play'), uri = "details/voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' },
{ name = c.loc('Delete'), uri = "details/voicemail/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
END;
@ -159,16 +160,17 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_regdev">Registered Devices</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_regdev">[% c.loc('Registered Devices') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_regdev">
<div class="accordion-inner">
[% UNLESS (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only -%]
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/create_registered', [c.req.captures.0]) %]"><i class="icon-star"></i> Create Permanent Registration</a>
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/create_registered', [c.req.captures.0]) %]"><i class="icon-star"></i> [% c.loc('Create Permanent Registration') %]</a>
[% END -%]
[%
helper.name = 'Registered Devices';
helper.name = c.loc('Registered Devices');
helper.identifier = 'registered_devices';
#helper.column_sort = 'origtime';
helper.dt_columns = reg_dt_columns;
@ -180,7 +182,7 @@
UNLESS (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only;
helper.dt_buttons = [
{ name = 'Delete', uri = "details/registered/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Delete'), uri = "details/registered/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
END;
@ -194,13 +196,14 @@
[% IF c.config.features.callflow && c.user.call_data -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_cap">Captured Dialogs</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#subscriber_data" href="#collapse_cap">[% c.loc('Captured Dialogs') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_cap">
<div class="accordion-inner">
[%
helper.name = 'Captured Dialogs';
helper.name = c.loc('Captured Dialogs');
helper.identifier = 'captured_dialogs';
#helper.column_sort = 'origtime';
helper.dt_columns = capture_dt_columns;
@ -211,7 +214,7 @@
helper.ajax_uri = c.uri_for_action('/subscriber/ajax_captured_calls', [c.req.captures.0]);
helper.dt_buttons = [
{ name = 'Call Flow', uri = "callflow/'+encodeURIComponent(full.call_id)+'/callmap", class = 'btn-small btn-primary', icon = 'icon-random' },
{ name = c.loc('Call Flow'), uri = "callflow/'+encodeURIComponent(full.call_id)+'/callmap", class = 'btn-small btn-primary', icon = 'icon-random' },
];

@ -1,7 +1,7 @@
[% site_config.title = 'Subscriber Preferences for ' _ subscriber.username _ '@' _ subscriber.domain.domain -%]
[% site_config.title = c.loc('Subscriber Preferences for [_1]@[_2]', subscriber.username, subscriber.domain.domain) -%]
[%
helper.name = 'Subscriber';
helper.name = c.loc('Subscriber');
helper.messages = messages;
helper.edit_preference = edit_preference;
@ -23,7 +23,7 @@
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 %]
@ -41,7 +41,7 @@
<div class="accordion" id="preference_groups">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_cf">Call Forwards</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_cf">[% c.loc('Call Forwards') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_cf">
<div class="accordion-inner">
@ -49,21 +49,21 @@
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_cf">
<thead>
<tr>
<th>Type</th>
<th>Answer Timeout</th>
<th>Destinations</th>
<th>Timeset</th>
<th>[% c.loc('Type') %]</th>
<th>[% c.loc('Answer Timeout') %]</th>
<th>[% c.loc('Destinations') %]</th>
<th>[% c.loc('Timeset') %]</th>
[% # one for actions -%]
<th class="ngcp-actions-column"></th>
</tr>
</thead>
<tbody>
[% FOR cf IN [ { type = "cfu", desc = "Unconditional" },
{ type = "cfb", desc = "Busy" },
{ type = "cft", desc = "Timeout" },
{ type = "cfna", desc = "Unavailable" } ] -%]
[% FOR cf IN [ { type = "cfu", desc = c.loc("Call Forward Unconditional") },
{ type = "cfb", desc = c.loc("Call Forward Busy") },
{ type = "cft", desc = c.loc("Call Forward Timeout") },
{ type = "cfna", desc = c.loc("Call Forward Unavailable") } ] -%]
<tr class="sw_action_row">
<td>Call Forward [% cf.desc %]</td>
<td>[% cf.desc %]</td>
<td>
[% cf_ringtimeout _ 's' IF cf.type == "cft" && cf_destinations.${cf.type}.size %]
</td>
@ -78,7 +78,7 @@
[% dset_unique_id = cf.type _ "dset" _ idx _ jdx _ maps.id -%]
<a href="#" data-toggle="modal" data-target="#[% dset_unique_id %]" class="pull-right"><i class="icon-question-sign"></i></a>
[% modal_header_dynamic(m.header = 'Destination Set "' _ maps.dset_name _ '" Details', m.id=dset_unique_id) %]
[% modal_header_dynamic(m.header = c.loc('Destination Set "[_1]" Details', maps.dset_name), m.id=dset_unique_id) %]
<div class="modal-body">
[% FOR d IN maps.destinations -%]
[% d.as_string %] <span class="pull-right">for [% d.timeout %]s</span><br/>
@ -104,7 +104,7 @@
[% IF maps.tset_name.defined -%]
[% tset_unique_id = cf.type _ idx _ jdx _ maps.id -%]
<a href="#" data-toggle="modal" data-target="#[% tset_unique_id %]" class="pull-right"><i class="icon-question-sign"></i></a>
[% modal_header_dynamic(m.header = 'Timeset "' _ maps.tset_name _ '" Details', m.id=tset_unique_id) %]
[% modal_header_dynamic(m.header = c.loc('Timeset "[_1]" Details', maps.tset_name), m.id=tset_unique_id) %]
<div class="modal-body">
[% FOR p IN maps.periods -%]
[% p.as_string %]<br/>
@ -119,9 +119,9 @@
<td class="ngcp-actions-column">
<div class="sw_actions">
[% UNLESS (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/preferences_callforward", [c.req.captures.0], cf.type) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/preferences_callforward", [c.req.captures.0], cf.type) %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% IF cf_destinations.${cf.type}.size -%]
<a class="btn btn-secondary btn-small" data-confirm="Delete" href="[% c.uri_for_action("/subscriber/preferences_callforward_delete", [c.req.captures.0], cf.type) %]"><i class="icon-trash"></i> Delete</a>
<a class="btn btn-secondary btn-small" data-confirm="Delete" href="[% c.uri_for_action("/subscriber/preferences_callforward_delete", [c.req.captures.0], cf.type) %]"><i class="icon-trash"></i> [% c.loc('Delete') %]</a>
[% END -%]
[% END -%]
</div>
@ -138,7 +138,7 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_vm">Voicemail and Voicebox</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_vm">[% c.loc('Voicemail and Voicebox') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_vm">
<div class="accordion-inner">
@ -146,64 +146,64 @@
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_vm">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Value') %]</th>
[% # one for actions -%]
<th class="ngcp-actions-column"></th>
</tr>
</thead>
<tbody>
<tr class="sw_action_row">
<td>PIN</td>
<td>[% c.loc('PIN') %]</td>
<td>
[% subscriber.provisioning_voip_subscriber.voicemail_user.password %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'pin') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'pin') %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Email</td>
<td>[% c.loc('Email') %]</td>
<td>
[% subscriber.provisioning_voip_subscriber.voicemail_user.email %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'email') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'email') %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Delete after sending Email</td>
<td>[% c.loc('Delete after sending Email') %]</td>
<td>
[% subscriber.provisioning_voip_subscriber.voicemail_user.get_column('delete') %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'delete') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'delete') %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Attach WAV in Email</td>
<td>[% c.loc('Attach WAV in Email') %]</td>
<td>
[% subscriber.provisioning_voip_subscriber.voicemail_user.attach %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'attach') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_voicebox", [c.req.captures.0], 'attach') %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% END -%]
</div>
@ -219,7 +219,7 @@
[% IF c.config.features.faxserver -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_fax">Fax2Mail and Sendfax</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_fax">[% c.loc('Fax2Mail and Sendfax') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_fax">
<div class="accordion-inner">
@ -227,8 +227,8 @@
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_fax">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Value') %]</th>
[% # one for actions -%]
<th class="ngcp-actions-column"></th>
</tr>
@ -239,86 +239,96 @@
faxdests = subscriber.provisioning_voip_subscriber.voip_fax_destinations.all;
-%]
<tr class="sw_action_row">
<td>Name in Fax Header for Sendfax</td>
<td>[% c.loc('Name in Fax Header for Sendfax') %]</td>
<td>
[% faxpref.name %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'name') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'name') %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Password for Sendfax</td>
<td>[% c.loc('Password for Sendfax') %]</td>
<td>
[% faxpref.password %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'password') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'password') %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Active</td>
<td>[% c.loc('Active') %]</td>
<td>
[% faxpref.active ? 'yes' : 'no' %]
[% faxpref.active ? c.loc('yes') : c.loc('no') %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'active') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'active') %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Send Reports</td>
<td>[% c.loc('Send Reports') %]</td>
<td>
[% faxpref.send_status ? 'yes' : 'no' %]
[% faxpref.send_status ? c.loc('yes') : ('no') %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'send_status') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'send_status') %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Send Copies</td>
<td>[% c.loc('Send Copies') %]</td>
<td>
[% faxpref.send_copy ? 'yes' : 'no' %]
[% faxpref.send_copy ? c.loc('yes') : c.loc('no') %]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'send_copy') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'send_copy') %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
</div>
</td>
</tr>
<tr class="sw_action_row">
<td>Destinations</td>
<td>[% c.loc('Destinations') %]</td>
<td>
[% FOR faxdest IN faxdests -%]
[% faxdest.destination %] as [% faxdest.filetype %]<br/>
[% c.loc('[_1] as [_2]', faxdest.destination, faxdest.filetype) %]<br/>
[% END -%]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'destinations') %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_fax", [c.req.captures.0], 'destinations') %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
[% END -%]
</div>
@ -335,24 +345,27 @@
[% IF c.config.features.cloudpbx -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_aa">Auto Attendant Slots</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_aa">[% c.loc('Auto Attendant Slots') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_aa">
<div class="accordion-inner">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/edit_autoattendant', [c.req.captures.0]) %]"><i class="icon-star"></i> Edit Slots</a>
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/edit_autoattendant', [c.req.captures.0]) %]">
<i class="icon-star"></i> [% c.loc('Edit Slots') %]
</a>
[% END -%]
[%
helper.messages = '';
helper.name = 'Autoattendant';
helper.name = c.loc('Autoattendant');
helper.identifier = 'autoattendant';
helper.column_sort = 'choice';
helper.dt_columns = aa_dt_columns;
helper.length_change = 1;
helper.ajax_uri = c.uri_for_action('/subscriber/ajax_autoattendant', [c.req.captures.0]);
helper.dt_buttons = [
{ name = 'Delete', uri = "preferences/autoattendant/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Delete'), uri = "preferences/autoattendant/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
PROCESS 'helpers/datatables.tt';
@ -364,24 +377,25 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_speed">Speed Dial</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_speed">[% c.loc('Speed Dial') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_speed">
<div class="accordion-inner">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/create_speeddial', [c.req.captures.0]) %]"><i class="icon-star"></i> Create Slot</a>
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action('/subscriber/create_speeddial', [c.req.captures.0]) %]"><i class="icon-star"></i> [% c.loc('Create Slot') %]</a>
[% END -%]
[%
helper.messages = '';
helper.name = 'Speeddial';
helper.name = c.loc('Speeddial');
helper.identifier = 'subs_speeddial';
helper.column_sort = 'slot';
helper.dt_columns = sd_dt_columns;
helper.ajax_uri = c.uri_for_action('/subscriber/ajax_speeddial', [c.req.captures.0]);
helper.dt_buttons = [
{ name = 'Edit', uri = "preferences/speeddial/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = "preferences/speeddial/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Edit'), uri = "preferences/speeddial/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = c.loc('Delete'), uri = "preferences/speeddial/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
PROCESS 'helpers/datatables.tt';
@ -392,7 +406,7 @@
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_rm">Reminder</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_rm">[% c.loc('Reminder') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_rm">
<div class="accordion-inner">
@ -400,8 +414,8 @@
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_rm">
<thead>
<tr>
<th>Time</th>
<th>Recurrence</th>
<th>[% c.loc('Time') %]</th>
<th>[% c.loc('Recurrence') %]</th>
[% # one for actions -%]
<th class="ngcp-actions-column"></th>
</tr>
@ -417,7 +431,9 @@
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_reminder", [c.req.captures.0]) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_reminder", [c.req.captures.0]) %]">
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
[% END -%]
</div>
@ -433,22 +449,24 @@
[% UNLESS c.user.roles == 'subscriber' || c.user.roles == 'subscriberadmin' -%]
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_ts">Trusted Sources</a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_ts">[% c.loc('Trusted Sources') %]</a>
</div>
<div class="accordion-body collapse" id="collapse_ts">
<div class="accordion-inner">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action("/subscriber/create_trusted", [c.req.captures.0]) %]"><i class="icon-star"></i> Create</a>
<a class="btn btn-tertiary btn-large" href="[% c.uri_for_action("/subscriber/create_trusted", [c.req.captures.0]) %]">
<i class="icon-star"></i> [% c.loc('Create') %]
</a>
[% END -%]
<div class="ngcp-separator"></div>
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_ts">
<thead>
<tr>
<th>Source IP</th>
<th>Protocol</th>
<th>From-Pattern</th>
<th>[% c.loc('Source IP') %]</th>
<th>[% c.loc('Protocol') %]</th>
<th>[% c.loc('From-Pattern') %]</th>
[% # one for actions -%]
<th class="ngcp-actions-column"></th>
</tr>
@ -468,8 +486,8 @@
<td class="ngcp-actions-column">
<div class="sw_actions">
[% IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only != 1 -%]
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_trusted", [c.req.captures.0, trusted.id]) %]"><i class="icon-edit"></i> Edit</a>
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/subscriber/delete_trusted", [c.req.captures.0, trusted.id]) %]" data-confirm="Delete"><i class="icon-trash"></i> Delete</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for_action("/subscriber/edit_trusted", [c.req.captures.0, trusted.id]) %]"><i class="icon-edit"></i> [% c.loc('Edit') %]</a>
<a class="btn btn-secondary btn-small" href="[% c.uri_for_action("/subscriber/delete_trusted", [c.req.captures.0, trusted.id]) %]" data-confirm="Delete"><i class="icon-trash"></i> [% c.loc('Delete') %]</a>
[% END -%]
</div>
@ -513,15 +531,15 @@
<div class="modal-body">
<div class="row" style="margin-left: 10px">
<a class="btn btn-primary btn-medium" href="[% c.uri_for_action('/subscriber/preferences_callforward_destinationset_create', [c.req.captures.0], cf_type) %]"><i class="icon-star"></i>Create New</a>
<a class="btn btn-primary btn-medium" href="[% c.uri_for_action('/subscriber/preferences_callforward_destinationset_create', [c.req.captures.0], cf_type) %]"><i class="icon-star"></i>[% c.loc('Create New') %]</a>
</div>
<div class="ngcp-separator"></div>
[% IF cf_sets.size -%]
<table class="table table-bordered table-striped table-highlight table-hover">
<thead>
<tr>
<th>Name</th>
<th>Values</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Values') %]</th>
<th></th>
</tr>
</thead>
@ -531,16 +549,16 @@
<td>[% set.name %]</td>
<td>
[% FOREACH d IN set.destinations -%]
[% d.as_string %] <span class="pull-right">for [% d.timeout %]s</span><br/>
[% c.loc('[_1]<span class="pull-right">for [_2]s</span>', d.as_string, d.timeout) %]<br/>
[% END -%]
</td>
<td class="ngcp-actions-column">
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary" href="[% c.uri_for_action('/subscriber/preferences_callforward_destinationset_edit', [ c.req.captures.0, set.id ], cf_type) %]">
<i class="icon-edit"></i> Edit
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
<a class="btn btn-small btn-secondary" data-confirm="Delete" href="[% c.uri_for_action('/subscriber/preferences_callforward_destinationset_delete', [ c.req.captures.0, set.id ], cf_type) %]">
<i class="icon-trash"></i> Delete
<i class="icon-trash"></i> [% c.loc('Delete') %]
</a>
</div>
</td>
@ -563,15 +581,15 @@
<div class="modal-body">
<div class="row" style="margin-left: 10px">
<a class="btn btn-primary btn-medium" href="[% c.uri_for_action('/subscriber/preferences_callforward_timeset_create', [c.req.captures.0], cf_type) %]"><i class="icon-star"></i>Create New</a>
<a class="btn btn-primary btn-medium" href="[% c.uri_for_action('/subscriber/preferences_callforward_timeset_create', [c.req.captures.0], cf_type) %]"><i class="icon-star"></i>[% c.loc('Create New') %]</a>
</div>
<div class="ngcp-separator"></div>
[% IF cf_sets.size -%]
<table class="table table-bordered table-striped table-highlight table-hover">
<thead>
<tr>
<th>Name</th>
<th>Values</th>
<th>[% c.loc('Name') %]</th>
<th>[% c.loc('Values') %]</th>
<th></th>
</tr>
</thead>
@ -587,10 +605,10 @@
<td class="ngcp-actions-column">
<div class="sw_actions pull-right">
<a class="btn btn-small btn-primary" href="[% c.uri_for_action('/subscriber/preferences_callforward_timeset_edit', [ c.req.captures.0, set.id ], cf_type) %]">
<i class="icon-edit"></i> Edit
<i class="icon-edit"></i> [% c.loc('Edit') %]
</a>
<a class="btn btn-small btn-secondary" data-confirm="Delete" href="[% c.uri_for_action('/subscriber/preferences_callforward_timeset_delete', [ c.req.captures.0, set.id ], cf_type) %]">
<i class="icon-trash"></i> Delete
<i class="icon-trash"></i> [% c.loc('Delete') %]
</a>
</div>
</td>

@ -1,8 +1,8 @@
[% site_config.title = 'Registered Devices for ' _ subscriber.username _ '@' _ subscriber.domain.domain -%]
[% site_config.title = c.loc('Registered Devices for [_1]@[_2]', subscriber.username, subscriber.domain.domain) -%]
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -10,7 +10,7 @@
<div class="ngcp-separator"></div>
[%
helper.name = 'Registered Devices';
helper.name = c.loc('Registered Devices');
helper.dt_columns = reg_dt_columns;
helper.column_sort = 'expires';
helper.form_object = form;

@ -1,8 +1,8 @@
[% site_config.title = 'Voicebox Messages for ' _ subscriber.username _ '@' _ subscriber.domain.domain -%]
[% site_config.title = c.loc('Voicebox Messages for [_1]@[_2]', subscriber.username, subscriber.domain.domain) -%]
<div class="row">
<span class="pull-left" style="margin:0 5px 0 5px;">
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
[% back_created = 1 -%]
@ -10,7 +10,7 @@
<div class="ngcp-separator"></div>
[%
helper.name = 'Voicemails';
helper.name = c.loc('Voicemails');
helper.column_sort = 'origtime';
helper.dt_columns = vm_dt_columns;
@ -18,8 +18,8 @@
helper.ajax_uri = c.uri_for_action('/subscriber/ajax_voicemails', [c.req.captures.0]);
helper.dt_buttons = [
{ name = 'Play', uri = "voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' },
{ name = 'Delete', uri = "voicemail/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
{ name = c.loc('Play'), uri = "voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' },
{ name = c.loc('Delete'), uri = "voicemail/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];

@ -1,21 +1,21 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Billing</div>
<div class="plan-title">[% c.loc('Billing') %]</div>
<div class="plan-price">
<span>[% profiles.count %]</span>
<span class="term">Billing Profile[% profiles.count == 1 ? "" : "s" %]</span>
<span class="term">[% profiles.count == 1 ? c.loc('Billing Profile') : c.loc('Billing Profiles') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li><strong>[% FILTER format("%.02f") %][% (peering_sum || 0) / 100.0 %][% END %]</strong> Peering Costs</li>
<li><strong>[% FILTER format("%.02f") %][% (reseller_sum || 0) / 100.0 %][% END %]</strong> Reseller Revenue</li>
<li><strong>[% FILTER format("%.02f") %][% (customer_sum || 0) / 100.0 %][% END %]</strong> Customer Revenue</li>
<li><strong>[% FILTER format("%.02f") %][% (peering_sum || 0) / 100.0 %][% END %]</strong> [% c.loc('Peering Costs') %]</li>
<li><strong>[% FILTER format("%.02f") %][% (reseller_sum || 0) / 100.0 %][% END %]</strong> [% c.loc('Reseller Revenue') %]</li>
<li><strong>[% FILTER format("%.02f") %][% (customer_sum || 0) / 100.0 %][% END %]</strong> [% c.loc('Customer Revenue') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/billing') %]" class="btn">Configure</a>
<a href="[% c.uri_for('/billing') %]" class="btn">[% c.loc('Configure') %]</a>
</div>
</div>
</div>

@ -1,20 +1,20 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Peerings</div>
<div class="plan-title">[% c.loc('Peerings') %]</div>
<div class="plan-price">
<span>[% groups.count %]</span>
<span class="term">Peering Group[% groups.count == 1 ? "" : "s" %]</span>
<span class="term">[% groups.count == 1 ? c.loc('Peering Group') : c.loc('Peering Groups') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li><strong>[% hosts.count %]</strong> Peering Server[% hosts.count == 1 ? "" : "s" %]</li>
<li><strong>[% rules.count %]</strong> Peering Rule[% rules.count == 1 ? "" : "s" %]</li>
<li><strong>[% hosts.count %]</strong> [% hosts.count == 1 ? c.loc('Peering Server') : c.loc('Peering Servers') %]</li>
<li><strong>[% rules.count %]</strong> [% rules.count == 1 ? c.loc('Peering Rule') : c.loc('Peering Rules') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/peering') %]" class="btn">Configure</a>
<a href="[% c.uri_for('/peering') %]" class="btn">[% c.loc('Configure') %]</a>
</div>
</div>
</div>

@ -1,21 +1,21 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Resellers</div>
<div class="plan-title">[% c.loc('Resellers') %]</div>
<div class="plan-price">
<span>[% resellers.count %]</span>
<span class="term">Reseller[% resellers.count == 1 ? "" : "s" %]</span>
<span class="term">[% resellers.count == 1 ? c.loc('Reseller') : c.loc('Resellers') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li><strong>[% domains.count %]</strong> Domain[% domains.count == 1 ? "" : "s" %]</li>
<li><strong>[% customers.count %]</strong> Customer[% customers.count == 1 ? "" : "s" %]</li>
<li><strong>[% subscribers.count %]</strong> Subscriber[% subscribers.count == 1 ? "" : "s" %]</li>
<li><strong>[% domains.count %]</strong> [% domains.count == 1 ? c.loc('Domain') : c.loc('Domains') %]</li>
<li><strong>[% customers.count %]</strong> [% customers.count == 1 ? c.loc('Customer') : c.loc('Customers') %]</li>
<li><strong>[% subscribers.count %]</strong> [% subscribers.count == 1 ? c.loc('Subscriber') : c.loc('Subscribers') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/reseller') %]" class="btn">Configure</a>
<a href="[% c.uri_for('/reseller') %]" class="btn">[% c.loc('Configure') %]</a>
</div>
</div>
</div>

@ -1,21 +1,21 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">System Status</div>
<div class="plan-title">[% c.loc('System Status') %]</div>
<div class="plan-price">
<span class="ngcp-green-ok">&#9702;</span>
<span class="term">All services running</span>
<span class="term">[% c.loc('All services running') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li>Applications <strong>Ok</strong></li>
<li>System <strong>Ok</strong></li>
<li>Hardware <strong>Ok</strong></li>
<li>[% c.loc('Applications <strong>Ok</strong>') %]</li>
<li>[% c.loc('System <strong>Ok</strong>') %]</li>
<li>[% c.loc('Hardware <strong>Ok</strong>') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/statistics') %]" class="btn">View Statistics</a>
<a href="[% c.uri_for('/statistics') %]" class="btn">[% c.loc('View Statistics') %]</a>
</div>
</div>
</div>

@ -4,17 +4,17 @@
<div class="plan-title">Billing</div>
<div class="plan-price">
<span>[% profiles.count %]</span>
<span class="term">Billing Profile[% profiles.count == 1 ? "" : "s" %]</span>
<span class="term">[% profiles.count == 1 ? c.loc('Billing Profile') : c.loc('Billing Profiles') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li><strong>[% FILTER format("%.02f") %][% (reseller_sum || 0) / 100.0 %][% END %]</strong> Reseller Cost</li>
<li><strong>[% FILTER format("%.02f") %][% (customer_sum || 0) / 100.0 %][% END %]</strong> Customer Revenue</li>
<li><strong>[% FILTER format("%.02f") %][% (reseller_sum || 0) / 100.0 %][% END %]</strong> [% c.loc('Reseller Cost') %]</li>
<li><strong>[% FILTER format("%.02f") %][% (customer_sum || 0) / 100.0 %][% END %]</strong> [% c.loc('Customer Revenue') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/billing') %]" class="btn">Configure</a>
<a href="[% c.uri_for('/billing') %]" class="btn">[% c.loc('Configure') %]</a>
</div>
</div>
</div>

@ -1,20 +1,20 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Customers</div>
<div class="plan-title">[% c.loc('Customers') %]</div>
<div class="plan-price">
<span>[% customers.count %]</span>
<span class="term">Customer[% customers.count == 1 ? "" : "s" %]</span>
<span class="term">[% customers.count == 1 ? c.loc('Customer') : c.loc('Customers') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li><strong>[% contacts.count %]</strong> Contact[% contacts.count == 1 ? "" : "s" %]</li>
<li><strong>[% subscribers.count %]</strong> Subscriber[% subscribers.count == 1 ? "" : "s" %]</li>
<li><strong>[% contacts.count %]</strong> [% contacts.count == 1 ? c.loc('Contact') : c.loc('Contacts') %]</li>
<li><strong>[% subscribers.count %]</strong> [% subscribers.count == 1 ? c.loc('Subscriber') : c.loc('Subscribers') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/customer') %]" class="btn">Configure</a>
<a href="[% c.uri_for('/customer') %]" class="btn">[% c.loc('Configure') %]</a>
</div>
</div>
</div>

@ -1,20 +1,20 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Domains</div>
<div class="plan-title">[% c.loc('Domains') %]</div>
<div class="plan-price">
<span>[% domains.count %]</span>
<span class="term">Domain[% domains.count == 1 ? "" : "s" %]</span>
<span class="term">[% domains.count == 1 ? c.loc('Domain') : c.loc('Domains') %]</span>
</div>
</div>
<div class="plan-features">
<ul>
<li><strong>[% rwr_sets.count %]</strong> Rewrite Rule Set[% rwr_sets.count == 1 ? "" : "s" %]</li>
<li><strong>[% sound_sets.count %]</strong> Sound Set[% sound_sets.count == 1 ? "" : "s" %]</li>
<li><strong>[% rwr_sets.count %]</strong> [% rwr_sets.count == 1 ? c.loc('Rewrite Rule Set') : c.loc('Rewrite Rule Sets') %]</li>
<li><strong>[% sound_sets.count %]</strong> [% sound_sets.count == 1 ? c.loc('Sound Set') : c.loc('Sound Set') %]</li>
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/domain') %]" class="btn">Configure</a>
<a href="[% c.uri_for('/domain') %]" class="btn">[% c.loc('Configure') %]</a>
</div>
</div>
</div>

@ -2,16 +2,16 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Call List</div>
<div class="plan-title">[% c.loc('Call List') %]</div>
<div class="plan-price">
<span>[% calls.count %]</span>
<span class="term">Recent Call[% calls.count != 1 ? 's' : '' %]</span>
<span class="term">[% calls.count != 1 ? c.loc('Recent Calls') : c.loc('Recent Call') %]</span>
</div>
</div>
<div class="plan-features large">
<ul>
[% IF calls.count == 0 -%]
<li>No calls yet</li>
<li>[% c.loc('No calls yet') %]</li>
[% ELSE -%]
[% FOR call IN calls.all -%]
<li>
@ -46,7 +46,7 @@
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for_action('/subscriber/calllist', [subscriber.id]) %]" class="btn">View Call List</a>
<a href="[% c.uri_for_action('/subscriber/calllist', [subscriber.id]) %]" class="btn">[% c.loc('View Call List') %]</a>
</div>
</div>
</div>

@ -1,8 +1,8 @@
[%
cfs = [ { type = "cfu", desc = "Unconditional" },
{ type = "cfb", desc = "Busy" },
{ type = "cft", desc = "Timeout" },
{ type = "cfna", desc = "Unavailable" } ];
cfs = [ { type = "cfu", desc = c.loc("Call Forward Unconditional") },
{ type = "cfb", desc = c.loc("Call Forward Busy") },
{ type = "cft", desc = c.loc("Call Forward Timeout") },
{ type = "cfna", desc = c.loc("Call Forward Unavailable") } ];
cfcount = 0;
FOR cf IN cfs;
IF cf_destinations.${cf.type}.size;
@ -14,24 +14,24 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Call Forwards</div>
<div class="plan-title">[% c.loc('Call Forwards') %]</div>
<div class="plan-price">
<span>[% cfcount %]</span>
<span class="term">Call Forward[% cfcount != 1 ? 's' : '' %] Configured</span>
<span class="term">[% cfcount == 1 ? c.loc('Call Forward Configured') : c.loc('Call Forwards Configured') %]</span>
</div>
</div>
<div class="plan-features large">
<ul>
[% FOR cf IN cfs -%]
<li>
Call Forward [% cf.desc %] [% cf_destinations.${cf.type}.size ? '<strong style="color:green">active' : '<strong color="grey">inactive' %]</strong>
[% cf.desc %] [% cf_destinations.${cf.type}.size ? '<strong style="color:green">active' : '<strong color="grey">inactive' %]</strong>
</li>
[% END -%]
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for_action('/subscriber/preferences', [subscriber.id]) %]" class="btn">Configure Line Settings</a>
<a href="[% c.uri_for_action('/subscriber/preferences', [subscriber.id]) %]" class="btn">[% c.loc('Configure Line Settings') %]</a>
</div>
</div>
</div>

@ -2,16 +2,16 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Registered Devices</div>
<div class="plan-title">[% c.loc('Registered Devices') %]</div>
<div class="plan-price">
<span>[% reg_count %]</span>
<span class="term">Registered Device[% reg_count != 1 ? 's' : '' %]</span>
<span class="term">[% reg_count == 1 ? c.loc('Registered Device') : c.loc('Registered Devices') %]</span>
</div>
</div>
<div class="plan-features large">
<ul>
[% IF reg_count == 0 -%]
<li>No devices registered</li>
<li>[% c.loc('No devices registered') %]</li>
[% ELSE -%]
[% FOR reg IN regs.all -%]
<li>
@ -30,7 +30,7 @@
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for_action('/subscriber/reglist', [subscriber.id]) %]" class="btn">View All Registered Devices</a>
<a href="[% c.uri_for_action('/subscriber/reglist', [subscriber.id]) %]" class="btn">[% c.loc('View All Registered Devices') %]</a>
</div>
</div>
</div>

@ -1,16 +1,16 @@
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">Voicebox Messages</div>
<div class="plan-title">[% c.loc('Voicebox Messages') %]</div>
<div class="plan-price">
<span>[% vmails.count %]</span>
<span class="term">New Message[% vmails.count != 1 ? 's' : '' %]</span>
<span class="term">[% vmails.count == 1 ? c.loc('New Message') : c.loc('New Messages') %]</span>
</div>
</div>
<div class="plan-features large">
<ul>
[% IF vmails.count == 0 -%]
<li>No new messages</li>
<li>[% c.loc('No new messages') %]</li>
[% ELSE -%]
[% FOR vmail IN vmails.all -%]
<li>
@ -32,7 +32,7 @@
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for_action('/subscriber/voicemails', [subscriber.id]) %]" class="btn">View Voicebox Messages</a>
<a href="[% c.uri_for_action('/subscriber/voicemails', [subscriber.id]) %]" class="btn">[% c.loc('View Voicebox Messages') %]</a>
</div>
</div>
</div>

Loading…
Cancel
Save