Sha256: ee81333145bdc38557ac18bcda3681ef3eef3b7b03ae6f54703708b46dae4eab

Contents?: true

Size: 892 Bytes

Versions: 10

Compression:

Stored size: 892 Bytes

Contents

module TiesHelper
  def tie_brief(tie)
    "N contacts in common"
  end

  def tie_link(tie)
    # FIXME: tie name
    if tie.relation.granted
      # There is granted relation, so another user must confirmate it
      # We need to render ties#new with a message
      link_to t("#{ tie.relation.name }.new"),
              new_tie_path("tie[sender_id]" => tie.sender.id,
                           "tie[receiver_id]" => tie.receiver.id,
                           "tie[relation_name]" => tie.relation.name),
              :title => t("#{ tie.relation.name }.confirm_new",
                          :name => tie.receiver_subject.name),
              :remote => true

    else
      # Tie can be established at once.
      render :partial => 'ties/form',
                         :locals => { :tie => tie }
    end
  end

  def link_follow_state
      link_to("Unfollow", home_path)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
social_stream-0.2.3 app/helpers/ties_helper.rb
social_stream-0.2.2 app/helpers/ties_helper.rb
social_stream-0.2.1 app/helpers/ties_helper.rb
social_stream-0.2.0 app/helpers/ties_helper.rb
social_stream-0.1.7 app/helpers/ties_helper.rb
social_stream-0.1.6 app/helpers/ties_helper.rb
social_stream-0.1.5 app/helpers/ties_helper.rb
social_stream-0.1.4 app/helpers/ties_helper.rb
social_stream-0.1.3 app/helpers/ties_helper.rb
social_stream-0.1.2 app/helpers/ties_helper.rb