Module: FlyAdmin::Imbs::ApplicationHelper

Defined in:
app/helpers/fly_admin/imbs/application_helper.rb

Instance Method Summary collapse

Instance Method Details

If anonymous - link to landing page If customer/admin/etc - link to item page (video#show, article#show etc)



6
7
8
9
10
11
12
13
# File 'app/helpers/fly_admin/imbs/application_helper.rb', line 6

def item_link(*args)
  case FlyAdmin.paysite_type
  when "serials"
    serials_item_link(*args)
  when "news"
    news_item_link(*args)
  end  
end


23
24
25
26
27
28
29
# File 'app/helpers/fly_admin/imbs/application_helper.rb', line 23

def news_item_link(category, article)
  if user_signed_in?
    category_article_path(category, article)
  else
    category_start_path(category, article)
  end 
end


15
16
17
18
19
20
21
# File 'app/helpers/fly_admin/imbs/application_helper.rb', line 15

def serials_item_link(category, season, video)
  if user_signed_in?
    category_season_video_path(category, season, video)
  else
    category_season_video_start_path(category, season, video)
  end
end