Sha256: 06f8d42a230d8f064bf94d3b0812e40f0567dff94b6aa913599dcf4f422d03bc

Contents?: true

Size: 603 Bytes

Versions: 5

Compression:

Stored size: 603 Bytes

Contents

module ContactsHelper
  def contact_brief(subject)
    t 'contact.in_common', :count => current_subject.common_contacts_count(subject)
  end

  def contact_link(c)
    link_to c.status,
            edit_contact_path(c),
            :title => t("contact.#{ c.action }.title", :name => c.receiver.name)

  end

  # Show current ties from current user to actor, if they exist, or provide a link
  # to create new ties to actor
  def contact_to(a)
    if user_signed_in?
      contact_link current_subject.contact_to!(a)
    else
      link_to t("contact.new.link"), new_user_session_path
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
social_stream-base-0.9.5 app/helpers/contacts_helper.rb
social_stream-base-0.9.4 app/helpers/contacts_helper.rb
social_stream-base-0.9.3 app/helpers/contacts_helper.rb
social_stream-base-0.9.2 app/helpers/contacts_helper.rb
social_stream-base-0.9.1 app/helpers/contacts_helper.rb