diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-25 13:19:26 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-25 13:19:26 +0200 |
commit | 1c6646bc732def369e54ef4ac576d748c6ba9c92 (patch) | |
tree | a9eb76adef709d5a9b3b083c636a54433fd3ebe0 /app | |
parent | 14da4be11fe13d4fcd55143c39b73c0d086b901b (diff) |
GUI improvements.
Diffstat (limited to 'app')
-rw-r--r-- | app/serializers/switchboard_entry_serializer.rb | 2 | ||||
-rw-r--r-- | app/views/switchboards/show.html.erb | 40 |
2 files changed, 26 insertions, 16 deletions
diff --git a/app/serializers/switchboard_entry_serializer.rb b/app/serializers/switchboard_entry_serializer.rb index 1b6c761..5d76e16 100644 --- a/app/serializers/switchboard_entry_serializer.rb +++ b/app/serializers/switchboard_entry_serializer.rb @@ -1,5 +1,5 @@ class SwitchboardEntrySerializer < ActiveModel::Serializer - attributes :id, :name, :path_to_user, :avatar_src, :callstate + attributes :id, :name, :path_to_user, :avatar_src, :callstate, :switchable has_one :sip_account, embed: :ids has_one :switchboard, embed: :ids diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index 69b0ed6..b390ce5 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -40,22 +40,32 @@ </p> {{/if}} - <p> - {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} - <span class="label"> - {{phoneNumber.number}} - </span> + {{#if switchboardEntry.switchable}} + <p> + {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} + <span class="label"> + {{phoneNumber.number}} + </span> + {{/each}} + </p> + {{else}} + <p> + {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} + <span class="label"> + {{phoneNumber.number}} + </span> - {{#if dispatchableIncomingCalls.length}} - <p> - {{#each dispatchableIncomingCall in dispatchableIncomingCalls}} - <button {{action transfer_blind dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Transfer</button> - <button {{action transfer_attended dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Attended Transfer</button> - {{/each}} - </p> - {{/if}} - {{/each}} - </p> + {{#if dispatchableIncomingCalls.length}} + <p> + {{#each dispatchableIncomingCall in dispatchableIncomingCalls}} + <button {{action transfer_blind dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Transfer</button> + <button {{action transfer_attended dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Attended Transfer</button> + {{/each}} + </p> + {{/if}} + {{/each}} + </p> + {{/if}} {{#if switchboardEntry.sipAccount.calls.length}} <p> |