blob: 2902a83289279ef6df97776bb2adf9644383fee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
%li.span1{:id => "switchboard_entry_id_#{switchboard_entry.id}"}
%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
|