From ace935fd2793b09925ab4b8a6b352585b5bdf3d2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 27 Jun 2013 12:29:04 +0200 Subject: Switchboard shows offline label when the SipAccount has no registration. --- app/views/switchboards/show.html.erb | 79 +++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 32 deletions(-) (limited to 'app/views/switchboards') diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index b390ce5..1952a3c 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -40,44 +40,59 @@

{{/if}} - {{#if switchboardEntry.switchable}} -

- {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} - - {{phoneNumber.number}} - - {{/each}} -

- {{else}} -

+ {{#if switchboardEntry.sipAccount.is_registrated}} + {{#if switchboardEntry.switchable}} +

+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} + + {{phoneNumber.number}} + + {{/each}} +

+ {{else}} +

+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} + + {{phoneNumber.number}} + + + {{#if dispatchableIncomingCalls.length}} +

+ {{#each dispatchableIncomingCall in dispatchableIncomingCalls}} + + + {{/each}} +

+ {{/if}} + {{/each}} +

+ {{/if}} + + {{#if switchboardEntry.sipAccount.calls.length}} +

+ {{#each call in switchboardEntry.sipAccount.calls}} + + {{#if call.isRinging}}{{/if}} + von {{call.b_caller_id_number}} an {{call.destination}} + + {{/each}} +

+ {{/if}} + {{else}} +

{{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} {{phoneNumber.number}} - - {{#if dispatchableIncomingCalls.length}} -

- {{#each dispatchableIncomingCall in dispatchableIncomingCalls}} - - - {{/each}} -

- {{/if}} {{/each}} -

- {{/if}} - - {{#if switchboardEntry.sipAccount.calls.length}} -

- {{#each call in switchboardEntry.sipAccount.calls}} - - {{#if call.isRinging}}{{/if}} - von {{call.b_caller_id_number}} an {{call.destination}} - - {{/each}} -

- {{/if}} +

+

+ + offline + +

+ {{/if}} -- cgit v1.2.3