summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-30 12:24:09 +0200
committerPeter Kozak <spag@golwen.net>2013-04-30 12:24:09 +0200
commit645901c2cb3fd52df146f086e1bc3ae6f59cabaf (patch)
treec5883296dddb41c27651ab462f605eb50ec39150 /app/views
parentbf29bf2261e955d702e02ea852adb8c9cf46a110 (diff)
phone book lookup added
Diffstat (limited to 'app/views')
-rw-r--r--app/views/voicemail_messages/_index_core.html.haml6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml
index 09e3b95..57226aa 100644
--- a/app/views/voicemail_messages/_index_core.html.haml
+++ b/app/views/voicemail_messages/_index_core.html.haml
@@ -29,6 +29,10 @@
%tbody
- for voicemail_message in voicemail_messages
- phone_book_entry = nil
+ - image = nil
+ - if !voicemail_message.cid_number.blank?
+ - phone_book_entry = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number)
+ - image = phone_book_entry.image_url(:mini)
%tr{:id => "message_#{voicemail_message.uuid}"}
%td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item')
%td
@@ -42,7 +46,6 @@
%i{:class => 'icon-envelope'}
= t("voicemail_messages.index.unread")
%td
- - image = nil
- if image
%ul.thumbnails
=image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded')
@@ -57,6 +60,7 @@
%td
- if ! voicemail_message.flags.blank?
= t("voicemail_messages.index.flags.#{voicemail_message.flags}")
+ = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number)
%td
- if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path)
= link_to raw("<i class = 'icon-download'></i> ") + t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get