You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
536 lines
24 KiB
536 lines
24 KiB
[% site_config.title = 'Subscriber Preferences for ' _ subscriber.username _ '@' _ subscriber.domain.domain -%]
|
|
|
|
[%
|
|
helper.name = 'Subscriber';
|
|
helper.messages = messages;
|
|
|
|
helper.edit_preference = edit_preference;
|
|
helper.preference = preference;
|
|
helper.preference_meta = preference_meta;
|
|
helper.pref_groups = pref_groups;
|
|
helper.form = form;
|
|
helper.base_uri = c.uri_for(subscriber.id,'preferences');
|
|
helper.rewrite_rule_sets = rwr_sets;
|
|
helper.ncos_levels = ncos_levels;
|
|
helper.sound_sets = sound_sets;
|
|
helper.skip_head = 1;
|
|
%]
|
|
|
|
<div class="row">
|
|
<span>
|
|
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> Back</a>
|
|
</span>
|
|
</div>
|
|
[% back_created = 1 %]
|
|
|
|
[% IF helper.messages -%]
|
|
<div class="row">
|
|
[% FOREACH m IN helper.messages -%]
|
|
<div class="alert alert-[% m.type %]">[% m.text %]</div>
|
|
[% END -%]
|
|
</div>
|
|
[% END -%]
|
|
|
|
<div class="ngcp-separator"></div>
|
|
|
|
<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>
|
|
</div>
|
|
<div class="accordion-body collapse" id="collapse_cf">
|
|
<div class="accordion-inner">
|
|
|
|
<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>Period</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" } ] -%]
|
|
<tr class="sw_action_row">
|
|
[% # let's count the lines of dest/period per map for proper alignment: -%]
|
|
[%
|
|
FOR maps IN cf_destinations.${cf.type};
|
|
destinations.${loop.index} = maps.destinations.size;
|
|
periods.${loop.index} = maps.periods.size;
|
|
END;
|
|
-%]
|
|
<td>Call Forward [% cf.desc %]</td>
|
|
<td>
|
|
[% cf_ringtimeout _ 's' IF cf.type == "cft" && cf_destinations.${cf.type}.size %]
|
|
</td>
|
|
<td>
|
|
[% idx = 0 -%]
|
|
[% FOR maps IN cf_destinations.${cf.type} -%]
|
|
[% jdx = 0 -%]
|
|
[% FOR d IN maps.destinations -%]
|
|
[% d.as_string %] <span class="pull-right">for [% d.timeout %]s</span><br/>
|
|
[% jdx = jdx + 1 %]
|
|
[% END -%]
|
|
[% WHILE jdx < periods.${idx} -%]
|
|
<br/>
|
|
[% jdx = jdx + 1 %]
|
|
[% END -%]
|
|
[% idx = idx + 1 -%]
|
|
[% '<br/>' UNLESS loop.index == loop.max -%]
|
|
[% END -%]
|
|
</td>
|
|
<td>
|
|
[% idx = 0 -%]
|
|
[% FOR maps IN cf_destinations.${cf.type} -%]
|
|
[% jdx = 0 -%]
|
|
[% UNLESS maps.periods.size -%]
|
|
always<br/>
|
|
[% jdx = jdx + 1 %]
|
|
[% END -%]
|
|
[% FOR p IN maps.periods -%]
|
|
[% p.as_string %]<br/>
|
|
[% jdx = jdx + 1 %]
|
|
[% END -%]
|
|
[% WHILE jdx < destinations.${idx} -%]
|
|
<br/>
|
|
[% jdx = jdx + 1 %]
|
|
[% END -%]
|
|
[% idx = idx + 1 -%]
|
|
[% '<br/>' UNLESS loop.index == loop.max -%]
|
|
[% END -%]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
[% IF cf_mappings.${cf.type}.id -%]
|
|
<a class="btn btn-secondary btn-small" data-confirm="Delete" href="[% c.uri_for_action("/subscriber/preferences_callforward_delete", [c.req.captures.0, cf_mappings.${cf.type}.id], cf.type) %]"><i class="icon-delete"></i> Delete</a>
|
|
[% END -%]
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
[% END -%]
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
<div class="accordion-body collapse" id="collapse_vm">
|
|
<div class="accordion-inner">
|
|
|
|
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_vm">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Value</th>
|
|
[% # one for actions -%]
|
|
<th class="ngcp-actions-column"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="sw_action_row">
|
|
<td>PIN</td>
|
|
<td>
|
|
[% subscriber.provisioning_voip_subscriber.voicemail_user.password %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Email</td>
|
|
<td>
|
|
[% subscriber.provisioning_voip_subscriber.voicemail_user.email %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>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">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Attach WAV in Email</td>
|
|
<td>
|
|
[% subscriber.provisioning_voip_subscriber.voicemail_user.attach %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
<div class="accordion-body collapse" id="collapse_fax">
|
|
<div class="accordion-inner">
|
|
|
|
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_fax">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Value</th>
|
|
[% # one for actions -%]
|
|
<th class="ngcp-actions-column"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[%
|
|
faxpref = subscriber.provisioning_voip_subscriber.voip_fax_preference;
|
|
faxdests = subscriber.provisioning_voip_subscriber.voip_fax_destinations.all;
|
|
-%]
|
|
<tr class="sw_action_row">
|
|
<td>Name in Fax Header for Sendfax</td>
|
|
<td>
|
|
[% faxpref.name %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Password for Sendfax</td>
|
|
<td>
|
|
[% faxpref.password %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Active</td>
|
|
<td>
|
|
[% faxpref.active ? 'yes' : 'no' %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Send Reports</td>
|
|
<td>
|
|
[% faxpref.send_status ? 'yes' : 'no' %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Send Copies</td>
|
|
<td>
|
|
[% faxpref.send_copy ? 'yes' : 'no' %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="sw_action_row">
|
|
<td>Destinations</td>
|
|
<td>
|
|
[% FOR faxdest IN faxdests -%]
|
|
[% faxdest.destination %] as [% faxdest.filetype %]<br/>
|
|
[% END -%]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
<div class="accordion-body collapse" id="collapse_speed">
|
|
<div class="accordion-inner">
|
|
|
|
<a class="btn btn-tertiary button-large" href="[% c.uri_for_action('/subscriber/create_speeddial', [c.req.captures.0]) %]"><i class="icon-star"></i> Create Slot</a>
|
|
[%
|
|
helper.messages = '';
|
|
helper.name = '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' },
|
|
];
|
|
|
|
PROCESS 'helpers/datatables.tt';
|
|
%]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="accordion-group">
|
|
<div class="accordion-heading">
|
|
<a class="accordion-toggle" data-toggle="collapse" data-parent="#preference_groups" href="#collapse_rm">Reminder</a>
|
|
</div>
|
|
<div class="accordion-body collapse" id="collapse_rm">
|
|
<div class="accordion-inner">
|
|
|
|
<table class="table table-bordered table-striped table-highlight table-hover" id="preferences_table_rm">
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Recurrence</th>
|
|
[% # one for actions -%]
|
|
<th class="ngcp-actions-column"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="sw_action_row">
|
|
<td>
|
|
[% subscriber.provisioning_voip_subscriber.voip_reminder.get_column('time') %]
|
|
</td>
|
|
<td>
|
|
[% subscriber.provisioning_voip_subscriber.voip_reminder.recur %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
<div class="accordion-body collapse" id="collapse_ts">
|
|
<div class="accordion-inner">
|
|
|
|
<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>
|
|
<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>
|
|
[% # one for actions -%]
|
|
<th class="ngcp-actions-column"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOR trusted IN subscriber.provisioning_voip_subscriber.voip_trusted_sources.all -%]
|
|
<tr class="sw_action_row">
|
|
<td>
|
|
[% trusted.src_ip %]
|
|
</td>
|
|
<td>
|
|
[% trusted.protocol %]
|
|
</td>
|
|
<td>
|
|
[% trusted.from_pattern %]
|
|
</td>
|
|
<td class="ngcp-actions-column">
|
|
<div class="sw_actions">
|
|
<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>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
[%
|
|
PROCESS 'helpers/pref_table.tt';
|
|
%]
|
|
|
|
[% IF edit_cf_flag -%]
|
|
[%
|
|
PROCESS "helpers/modal.tt";
|
|
modal_header(m.name = cf_description);
|
|
-%]
|
|
|
|
[% IF cf_form.has_for_js -%]
|
|
[% cf_form.render_repeatable_js %]
|
|
[% END -%]
|
|
[% cf_form.render %]
|
|
|
|
[%
|
|
modal_footer();
|
|
modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0]));
|
|
-%]
|
|
[% ELSIF edit_cfset_flag -%]
|
|
[%
|
|
PROCESS "helpers/modal.tt";
|
|
modal_header(m.name = cf_description);
|
|
-%]
|
|
|
|
<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>
|
|
</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></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH set IN cf_sets -%]
|
|
<tr class="sw_action_row">
|
|
<td>[% set.name %]</td>
|
|
<td>
|
|
[% FOREACH d IN set.destinations -%]
|
|
[% d.as_string %] <span class="pull-right">for [% d.timeout %]s</span><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
|
|
</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
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
[% END -%]
|
|
</tbody>
|
|
</table>
|
|
[% END -%]
|
|
</div>
|
|
|
|
[%
|
|
modal_footer();
|
|
modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0]));
|
|
-%]
|
|
[% ELSIF edit_timeset_flag -%]
|
|
[%
|
|
PROCESS "helpers/modal.tt";
|
|
modal_header(m.name = cf_description);
|
|
-%]
|
|
|
|
<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>
|
|
</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></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH set IN cf_sets -%]
|
|
<tr class="sw_action_row">
|
|
<td>[% set.name %]</td>
|
|
<td>
|
|
[% FOREACH p IN set.periods -%]
|
|
[% p.as_string %]<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_timeset_edit', [ c.req.captures.0, set.id ], cf_type) %]">
|
|
<i class="icon-edit"></i> 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
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
[% END -%]
|
|
</tbody>
|
|
</table>
|
|
[% END -%]
|
|
</div>
|
|
|
|
[%
|
|
modal_footer();
|
|
modal_script(m.close_target = close_target ? close_target : c.uri_for_action('/subscriber/preferences', [c.req.captures.0]));
|
|
-%]
|
|
[% END -%]
|
|
|
|
[% # vim: set tabstop=4 syntax=html expandtab: -%]
|