[% IF subscriber.provisioning_voip_subscriber.is_pbx_group; site_config.title = c.loc('PBX Group [_1]@[_2]', subscriber.username, subscriber.domain.domain); ELSE; site_config.title = c.loc('Subscriber [_1]@[_2]', subscriber.username, subscriber.domain.domain); END; -%]
[% c.loc('Back') %] [% c.loc('Preferences') %] [% IF c.user.roles != "ccareadmin" && c.user.roles != "ccare" -%] [% c.loc('Calls history') %] [% END -%] [% c.loc('Customer') %]
[% back_created = 1 -%]
[% FOREACH m IN messages -%]
[% m.text %]
[% END -%] [% IF subscriber && subscriber.status != "active" -%]
[% c.loc('Subscriber status is [_1]', subscriber.status) %]
[% END -%] [% IF prov_lock_string && prov_lock_string != "none" -%]
[% c.loc('Subscriber is locked for [_1]', prov_lock_string) %]
[% END -%]
[% IF c.user.roles == 'admin' || c.user.roles == 'reseller' || c.user.roles == 'ccareadmin' || c.user.roles == 'ccare' || c.user.roles == 'subscriberadmin' -%]
[% UNLESS (c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare") && c.user.read_only -%] [% IF subscriber.provisioning_voip_subscriber.is_pbx_group; href = c.uri_for_action('/customer/pbx_group_edit', [ contract.id, subscriber.id ]); ELSE; href = c.uri_for_action('/subscriber/edit_master', [ subscriber.id ]); END; -%] [% c.loc('Edit') %] [% END -%] [% IF subscriber.contract.passreset_email_template -%] [% c.loc('Reset Web Password') %] [% END -%]
[% IF c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare" -%] [% END -%] [% elements = []; elements.push({ value = subscriber.status, desc = c.loc('Status') }); IF subscriber.contact; elements.push({ value = subscriber.contact.email, desc = c.loc('Email Address') }); END; 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 = '******', desc = c.loc('Web Password') }); END; 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 = c.loc('SIP Password') }); END; IF c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare"; 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; IF subscriber.timezone.name; elements.push({ value = subscriber.timezone.name, desc = c.loc('Timezone') }); ELSE; elements.push({ value = c.config.contact.timezone, desc = c.loc('Timezone') }); END; elements.push({ value = subscriber.primary_number.cc _ ' ' _ subscriber.primary_number.ac _ ' ' _ subscriber.primary_number.sn, desc = c.loc('Primary Number') }); -%] [% FOR elem IN elements -%] [% END -%] [% IF subscriber.provisioning_voip_subscriber.pbx_extension -%] [% END -%] [% UNLESS subscriber.provisioning_voip_subscriber.is_pbx_group -%] [% END -%] [% IF subscriber.provisioning_voip_subscriber.is_pbx_group -%] [% END -%]
[% c.loc('Setting') %] [% c.loc('Values') %]
[% c.loc('Customer #') %] [% subscriber.contract.id %]
[% elem.desc %] [% elem.value | html %]
[% c.loc('Alias Numbers') %] [% FOR num IN subscriber.voip_numbers.all -%] [% NEXT IF num.id == subscriber.primary_number.id -%] [% num.cc %] [% num.ac %] [% num.sn %] [% IF num.voip_dbalias.is_devid %] [% num.voip_dbalias.devid_alias.length ? "(" _ num.voip_dbalias.devid_alias _ ")" : "" %] [% END %]
[% END -%]
[% c.loc('Extension') %] [% subscriber.provisioning_voip_subscriber.pbx_extension %]
[% c.loc('Subscriber Profile Set') %] [% subscriber.provisioning_voip_subscriber.voip_subscriber_profile_set.name %]
[% c.loc('Subscriber Profile') %] [% subscriber.provisioning_voip_subscriber.voip_subscriber_profile.name %]
[% c.loc('Hunt Policy') %] [% subscriber.provisioning_voip_subscriber.pbx_hunt_policy %]
[% c.loc('Serial Hunt Timeout') %] [% subscriber.provisioning_voip_subscriber.pbx_hunt_timeout %]
[% END -%] [% IF ((c.user.roles == 'admin' || c.user.roles == 'reseller') && c.user.call_data) || c.user.roles == 'subscriberadmin' -%]
[%PROCESS 'subscriber/pbx_group_items.tt' %]
[% END -%]
[% helper.name = c.loc('Voicemails'); helper.identifier = 'voicemails'; helper.column_sort = 'origtime'; helper.dt_columns = vm_dt_columns; helper.form_object = form; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_voicemails', [c.req.captures.0]); IF (c.user.roles == "admin" || c.user.roles == "reseller") && c.user.read_only; helper.dt_buttons = [ { name = c.loc('Play'), uri = "details/voicemail/'+full.id+'/play", class = 'btn-small btn-tertiary', icon = 'icon-play' }, ]; ELSE; helper.dt_buttons = [ { 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; PROCESS 'helpers/datatables.tt'; %]
[% IF c.user.roles != "ccareadmin" && c.user.roles != "ccare" -%]
[% helper.name = c.loc('Call Recordings'); helper.identifier = 'recordings'; helper.column_sort = 'id'; helper.dt_columns = rec_dt_columns; helper.form_object = form; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_recordings', [c.req.captures.0]); IF ((c.user.roles == "admin" || c.user.roles == "reseller") && !c.user.read_only) || c.user.roles == "subscriber" || c.user.roles == "subscriberadmin"; helper.dt_buttons = [ { name = c.loc('Call Details'), uri = "/subscriber/" _ subscriber.id _ "/calls?callid=' + encodeURIComponent(full.call_id_url) + '", class = 'btn-small btn-tertiary', icon = 'icon-search' }, { name = c.loc('Recorded Files'), uri = "details/recording/'+full.id+'/streams", class = 'btn-small btn-tertiary', icon = 'icon-play' }, #we will confirm deletion in the form { name = c.loc('Delete recording'), uri = "details/recording/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; ELSE; helper.dt_buttons = [ { name = c.loc('Call Details'), uri = "/subscriber/" _ subscriber.id _ "/calls?callid=' + encodeURIComponent(full.call_id_url) + '", class = 'btn-small btn-tertiary', icon = 'icon-search' }, { name = c.loc('Files'), uri = "details/recording/'+full.id+'/streams", class = 'btn-small btn-tertiary', icon = 'icon-play' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% END -%]
[% UNLESS (c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare") && c.user.read_only -%] [% c.loc('Create Permanent Registration') %] [% END -%] [% helper.name = c.loc('Registered Devices'); helper.identifier = 'registered_devices'; helper.column_sort = 'q'; helper.column_sort_order = 'desc'; helper.dt_columns = reg_dt_columns; helper.close_target = close_target; helper.create_flag = reg_create_flag; helper.edit_flag = reg_edit_flag; helper.form_object = form; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_registered', [c.req.captures.0]); UNLESS (c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare") && c.user.read_only; helper.dt_buttons = [ { name = c.loc('Delete'), uri = "details/registered/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% IF c.config.features.callflow && c.user.call_data && c.user.roles != "ccareadmin" && c.user.roles != "ccare" -%]
[% helper.name = c.loc('Captured Dialogs'); helper.identifier = 'captured_dialogs'; #helper.column_sort = 'origtime'; helper.dt_columns = capture_dt_columns; helper.close_target = close_target; helper.create_flag = 0; helper.edit_flag = 0; helper.form_object = form; helper.ajax_uri = c.uri_for_action('/subscriber/ajax_captured_calls', [c.req.captures.0]); helper.dt_buttons = [ { name = c.loc('Call Flow'), uri = "callflow/'+encodeURIComponent(full.call_id_url)+'/callmap", class = 'btn-small btn-primary', icon = 'icon-random' }, ]; PROCESS 'helpers/datatables.tt'; %]
[% END -%] [% IF (c.user.roles == "subscriberadmin" && product.class == "pbxaccount") || c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare" -%]
[% helper.name = c.loc('Phonebook'); helper.identifier = 'phonebook'; helper.create_flag = phonebook_create_flag; helper.edit_flag = phonebook_edit_flag; helper.form_object = form; helper.messages = messages; helper.length_change = 1; helper.dt_columns = phonebook_dt_columns; helper.ajax_uri = c.uri_for_action('/subscriber/phonebook_ajax', [ c.req.captures.0 ]); helper.tmpuri = c.uri_for_action('/subscriber/phonebook_root', [ c.req.captures.0 ]); UNLESS c.user.read_only; helper.dt_buttons = [ { 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-remove' }, ]; helper.top_buttons = [ { name = c.loc('Create Phonebook Entry'), uri = c.uri_for_action('/subscriber/phonebook_create', c.req.captures), class = 'btn-small btn-primary', icon = 'icon-star' }, { name = c.loc('Download CSV'), uri = c.uri_for_action('/subscriber/phonebook_download_csv', c.req.captures), class = 'btn-small btn-primary', icon = 'icon-star' }, { name = c.loc('Upload CSV'), uri = c.uri_for_action('/subscriber/phonebook_upload_csv', c.req.captures), class = 'btn-small btn-primary', icon = 'icon-star' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% END -%]
[% IF edit_flag == 1 -%] [% IF form.has_for_js; form.render_repeatable_js; END; PROCESS "helpers/modal.tt"; modal_header(m.create_flag=0, m.name = description); form.render; modal_footer(); modal_script(m.close_target = close_target); -%] [% END -%] [% # vim: set tabstop=4 syntax=html expandtab: -%]