- content_for :title, nil %section.phone-book-entry .content %header %h1.username %a= @phone_book_entry - if !@phone_book_entry.organization.blank? .work %a= @phone_book_entry.organization - if !@phone_book_entry.department.blank? \/ = @phone_book_entry.department - if !@phone_book_entry.job_title.blank? \/ = @phone_book_entry.job_title .personal - if !@phone_book_entry.nickname.blank? %span.nickname a.k.a %strong= @phone_book_entry.nickname - if @phone_book_entry.birthday %span.birthday = l(@phone_book_entry.birthday) .tags %a= l @phone_book_entry.created_at.utc.getlocal, :format => :short , %a= l @phone_book_entry.updated_at.utc.getlocal, :format => :short %section.activity - if @user_log %h2 User Log - @user_log.each do |log_entry| - if log_entry[:type] == 'voicemail' .entry.voice-message %span.motive = log_entry[:text] %span.timestamp = log_entry[:timestamp] - if log_entry[:type] == 'fax_document' .entry.fax %span.motive = log_entry[:text] %span.timestamp = log_entry[:timestamp] - if log_entry[:type] == 'call_placed' .entry.phone %span.motive log_entry[:text] %span.timestamp = log_entry[:timestamp] - elsif log_entry[:type] == 'call_received' .entry.phone %span.motive = log_entry[:text] %span.timestamp = log_entry[:timestamp] - elsif log_entry[:type] == 'call_missed' .entry.phone-down %span.motive = log_entry[:text] %span.timestamp = log_entry[:timestamp] .sidebar = image_tag @phone_book_entry.image_url(:profile).to_s, :class => 'display' %p.description = @phone_book_entry.description .widget.phones - @phone_book_entry.phone_numbers.each do |phone_number| - case phone_number.name.to_s.downcase - when /fax/ .fax = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - when /home/ .home = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span - when /mobile/ .cellphone = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - when /office/ .office = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - else .phone = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name = link_to t('phone_book_entries.show.manage_phone_numbers'), phone_book_entry_phone_numbers_path(@phone_book_entry) .widget.adresses - @phone_book_entry.addresses.each do |address| .home %strong - if !address.line1.blank? = address.line1 %br - if !address.line2.blank? = address.line1 %br - if !address.street.blank? = address.street %br - if !address.city.blank? = "#{address.city} #{address.zip_code}" %br - if !address.country.blank? = address.country.to_s %br / %span Home / .office .widget.social - if !@phone_book_entry.homepage_organization.blank? .home =link_to @phone_book_entry.homepage_organization, @phone_book_entry.homepage_organization %span www - if !@phone_book_entry.homepage_personal.blank? .home =link_to @phone_book_entry.homepage_personal, @phone_book_entry.homepage_personal %span www - if !@phone_book_entry.twitter_account.blank? .twitter =link_to @phone_book_entry.twitter_account, "https://twitter.com/#{@phone_book_entry.twitter_account}" %span Twitter - if !@phone_book_entry.facebook_account.blank? .facebook =link_to @phone_book_entry.facebook_account, "https://www.facebook.com/#{@phone_book_entry.facebook_account}" %span Facebook