summaryrefslogtreecommitdiff
path: root/app/views/switchboards/show.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-10 12:36:53 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-10 12:36:53 +0100
commit3f332fe2c8caea0dea445822e7004d9b8f5bebe1 (patch)
treeb33b42f6b14f359b7725eb71807a66f445ed55f3 /app/views/switchboards/show.html.haml
parentc563859fa60defd2b40f17a0b7cf1c4912f72792 (diff)
parent63339834ec520efae48f16f4d16b90d74e7bcdfd (diff)
Merge branch 'switchboard' into develop
Diffstat (limited to 'app/views/switchboards/show.html.haml')
-rw-r--r--app/views/switchboards/show.html.haml29
1 files changed, 1 insertions, 28 deletions
diff --git a/app/views/switchboards/show.html.haml b/app/views/switchboards/show.html.haml
index b81980c..18671c2 100644
--- a/app/views/switchboards/show.html.haml
+++ b/app/views/switchboards/show.html.haml
@@ -1,6 +1,5 @@
- content_for :title, @switchboard.name
-
.row
.span12
.well.pull-right
@@ -8,33 +7,7 @@
=current_user
%ul.thumbnails
- - @switchboard.switchboard_entries.each do |switchboard_entry|
- %li.span1
- %div.thumbnail
- %a.thumbnail{:href => tenant_user_path(switchboard_entry.sip_account.sip_accountable.current_tenant, switchboard_entry.sip_account.sip_accountable)}
- - if switchboard_entry.sip_account.sip_accountable.image?
- = image_tag(switchboard_entry.sip_account.sip_accountable.image_url(:mini).to_s, :class => 'img-rounded')
- - else
- - if switchboard_entry.sip_account.sip_accountable.male?
- = image_tag 'icons/user-male-16x.png', :class => 'img-rounded'
- - else
- = image_tag 'icons/user-female-16x.png', :class => 'img-rounded'
- %p
- %small
- = truncate(switchboard_entry.to_s, :length => 10)
- %span{:class => "label #{(switchboard_entry.sip_account.registration ? '' : 'label-inverse')}"}
- - if !switchboard_entry.sip_account.registration
- %i.icon-ban-circle.icon-white
- - if switchboard_entry.sip_account.phone_numbers.count > 1
- - phone_numbers = []
- - switchboard_entry.sip_account.phone_numbers.order(:position).each do |phone_number|
- - if phone_number.number.length < 6
- - phone_numbers << phone_number
- - if phone_numbers.size == 0
- - phone_numbers = switchboard_entry.sip_account.phone_numbers.order(:position)
- - else
- - phone_numbers = switchboard_entry.sip_account.phone_numbers
- = render 'phone_numbers/listing', :phone_numbers => phone_numbers
+ = render :partial => "switchboard_entries/switchboard_entry", :collection => @switchboard_entries
- if can? :edit, @switchboard
.row