summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/serializers/switchboard_serializer.rb2
-rw-r--r--app/views/switchboards/show.html.erb5
-rw-r--r--public/js/app.js1
3 files changed, 6 insertions, 2 deletions
diff --git a/app/serializers/switchboard_serializer.rb b/app/serializers/switchboard_serializer.rb
index c1cc0fe..7ad7792 100644
--- a/app/serializers/switchboard_serializer.rb
+++ b/app/serializers/switchboard_serializer.rb
@@ -1,7 +1,7 @@
class SwitchboardSerializer < ActiveModel::Serializer
embed :ids, :include => true
- attributes :id, :name, :blind_transfer_activated, :attended_transfer_activated
+ attributes :id, :name, :show_avatars, :blind_transfer_activated, :attended_transfer_activated
has_many :switchboard_entries
has_many :sip_accounts, :through => :switchboard_entries
has_many :phone_numbers
diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb
index 61adde7..3bc4da4 100644
--- a/app/views/switchboards/show.html.erb
+++ b/app/views/switchboards/show.html.erb
@@ -26,12 +26,15 @@
{{/each}}
{{/if}}
+
{{#if switchboardEntrys.length}}
<ul class="thumbnails">
{{#each switchboardEntry in switchboardEntrys}}
<li class="span2">
<div class="thumbnail">
- {{avatar_img switchboardEntry.avatar_src}}
+ {{#if switchboardEntry.switchboard.show_avatars}}
+ {{avatar_img switchboardEntry.avatar_src}}
+ {{/if}}
<small>
<p></p>
{{#if switchboardEntry.name}}
diff --git a/public/js/app.js b/public/js/app.js
index 5b7469a..733989a 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -53,6 +53,7 @@ App.Switchboard = DS.Model.extend({
activeCalls: DS.hasMany('App.ActiveCall'),
dispatchableIncomingCalls: DS.hasMany('App.DispatchableIncomingCall'),
name: DS.attr('string'),
+ show_avatars: DS.attr('boolean'),
blind_transfer_activated: DS.attr('boolean'),
attended_transfer_activated: DS.attr('boolean')
});