Sha256: b846c4b7cbf8d5a4a792c518811e832df6c288ad6d1fa8fd244ec9dde969c926

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

format :html do

  def account_links
    #ENGLISH
    links = []
    if Auth.signed_in?
      links << card_link( Auth.current.cardname, :id=>'my-card-link' )
      if Card.new(:type_id=>Card.default_accounted_type_id).ok? :create
        # Shouldn't these use the new paths?
        links << link_to( 'Invite', wagn_path('account/signup'), :id=>'invite-a-friend-link' )
      end
      links << link_to( 'Sign out', wagn_path('delete/:signin'), :id=>'signout-link' )
    else
      if Card.new(:type_id=>Card::SignupID).ok? :create
        links << link_to( 'Sign up', wagn_path('account/signup'), :id=>'signup-link' )
      end
      links << link_to( 'Sign in', wagn_path(':signin'), :id=>'signin-link' )
    end
    links
  end
  
  view :raw do |args|
    %{<span id="logging">#{ account_links.join ' ' }</span>}
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wagn-1.14.9 mod/05_standard/set/self/account_links.rb
wagn-1.14.8 mod/05_standard/set/self/account_links.rb
wagn-1.14.7 mod/05_standard/set/self/account_links.rb
wagn-1.14.6 mod/05_standard/set/self/account_links.rb
wagn-1.14.5 mod/05_standard/set/self/account_links.rb