Sha256: 84dff378f9e082e59a48c8a5479569ebdd690adfc7a5ee05ca08d54159a4b772

Contents?: true

Size: 961 Bytes

Versions: 15

Compression:

Stored size: 961 Bytes

Contents

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
module ContactsHelper
  # Contact summary for RSS/ATOM feeds.
  #----------------------------------------------------------------------------
  def contact_summary(contact)
    summary = [""]
    summary << contact.title.titleize if contact.title?
    summary << contact.department if contact.department?
    if contact.account && contact.account.name?
      summary.last << " #{t(:at)} #{contact.account.name}"
    end
    summary << contact.email if contact.email.present?
    summary << "#{t(:phone_small)}: #{contact.phone}" if contact.phone.present?
    summary << "#{t(:mobile_small)}: #{contact.mobile}" if contact.mobile.present?
    summary.join(', ')
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/helpers/contacts_helper.rb
fat_free_crm-0.15.2 app/helpers/contacts_helper.rb
fat_free_crm-0.16.4 app/helpers/contacts_helper.rb
fat_free_crm-0.14.1 app/helpers/contacts_helper.rb
fat_free_crm-0.15.1 app/helpers/contacts_helper.rb
fat_free_crm-0.16.3 app/helpers/contacts_helper.rb
fat_free_crm-0.16.2 app/helpers/contacts_helper.rb
fat_free_crm-0.16.1 app/helpers/contacts_helper.rb
fat_free_crm-0.16.0 app/helpers/contacts_helper.rb
fat_free_crm-0.15.0 app/helpers/contacts_helper.rb
fat_free_crm-0.15.0.beta.2 app/helpers/contacts_helper.rb
fat_free_crm-0.15.0.beta app/helpers/contacts_helper.rb
fat_free_crm-0.14.0 app/helpers/contacts_helper.rb
reduced_fat_crm-0.15.0.beta app/helpers/contacts_helper.rb
reduced_fat_crm-0.14.0 app/helpers/contacts_helper.rb