summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-05-17 09:35:05 +0200
committerPeter Kozak <spag@golwen.net>2013-05-17 09:35:05 +0200
commitca490d7215ffb6015573b690cd5b1a53d9b67e34 (patch)
tree55378472d399a34d8c5f162175eb43052808f7db
parentb46ab80284a50575dd7078b9958ce3be21acc594 (diff)
call_histories index view improvements
-rw-r--r--app/views/call_histories/_index_core.html.haml20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
index ef5654a..9c2cf39 100644
--- a/app/views/call_histories/_index_core.html.haml
+++ b/app/views/call_histories/_index_core.html.haml
@@ -41,17 +41,29 @@
%i{:class => 'icon-time'}
-elsif call_history.entry_type == 'forwarded'
- if call_history.callee_account_type.to_s.downcase == 'voicemailaccount'
- %i{:class => 'icon-envelope'}
+ - voicemail_message = call_history.voicemail_message
+ - if voicemail_message
+ - if voicemail_message.read_epoch > 0
+ %i{:class => 'icon-bullhorn'}
+ - else
+ %i{:class => 'icon-envelope'}
+ - else
+ %i{:class => 'icon-random'}
- else
%i{:class => 'icon-random'}
- else
%i{:class => 'icon-arrow-right'}
- if call_history.entry_type == 'forwarded'
- - if call_history.callee_account_type.to_s.downcase == 'phonenumber'
- = call_history.destination_number
- if call_history.callee_account_type.to_s.downcase == 'voicemailaccount'
- = VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s
+ - if voicemail_message
+ %a.name{:href => voicemail_account_voicemail_messages_path(voicemail_message.voicemail_account, :anchor => "message_#{voicemail_message.uuid}")}
+ = voicemail_message.display_duration
+ /= VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s
+ - else
+ = VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s
+ - else
+ = call_history.destination_number
- elsif call_history.entry_type == 'dialed'
= call_history.caller_id_number
- else