diff options
| author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-25 10:27:27 +0100 |
|---|---|---|
| committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-25 10:27:27 +0100 |
| commit | df6e17e48995f25e72509986f30700d778b179b6 (patch) | |
| tree | f432c24b8e4ad81009188650dabfd99194883265 /app/views/switchboard_entries/_switchboard_entry.html.haml | |
| parent | 11f186a118285fbc87a536af26730780a9ad01f5 (diff) | |
| parent | cce94a74aa5c9691f9b37cd9be5a6831f8063812 (diff) | |
Merge branch 'develop'5.1.2
Diffstat (limited to 'app/views/switchboard_entries/_switchboard_entry.html.haml')
| -rw-r--r-- | app/views/switchboard_entries/_switchboard_entry.html.haml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app/views/switchboard_entries/_switchboard_entry.html.haml b/app/views/switchboard_entries/_switchboard_entry.html.haml new file mode 100644 index 0000000..8c44153 --- /dev/null +++ b/app/views/switchboard_entries/_switchboard_entry.html.haml @@ -0,0 +1,45 @@ +%li.span2{: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(:profile).to_s, :class => 'img-rounded', :style => 'width: 100px;') + - else + - if switchboard_entry.sip_account.sip_accountable.male? + = image_tag('icons/user-male-16x.png', :class => 'img-rounded', :style => 'width: 100px;') + - else + = image_tag('icons/user-female-16x.png', :class => 'img-rounded', :style => 'width: 100px;') + %p + %small + = truncate(switchboard_entry.to_s, :length => 23) + %br + - if switchboard_entry.sip_account.phone_numbers.any? && !switchboard_entry.sip_account.call_legs.where(callstate: 'ACTIVE').any? && !switchboard_entry.sip_account.b_call_legs.where(b_callstate: 'ACTIVE').any? + %span.label + = switchboard_entry.sip_account.phone_numbers.first.number + + %br + + - if switchboard_entry.sip_account.registration + - switchboard_entry.sip_account.call_legs.where(callstate: 'RINGING').each do |call_leg| + %span.label.label-warning + %i.icon-bell.icon-white + = "#{call_leg.caller_id_number}" + + - switchboard_entry.sip_account.call_legs.where(callstate: 'EARLY').each do |call_leg| + %span.label.label-info + = "calls #{call_leg.destination}" + + - switchboard_entry.sip_account.call_legs.where(callstate: 'ACTIVE').each do |call_leg| + %span.label + = "#{switchboard_entry.sip_account.phone_numbers.first.number} => " + %span.label.label-info + = "#{call_leg.callee_number}" + + - switchboard_entry.sip_account.b_call_legs.where(b_callstate: 'ACTIVE').each do |b_call_leg| + %span.label.label-info + = "#{b_call_leg.b_caller_id_number} =>" + %span.label + = switchboard_entry.sip_account.phone_numbers.first.number + + - else + %span.label.label-inverse + %i.icon-ban-circle.icon-white |
