Module: ApplicationHelper

Defined in:
app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#admin_pathObject



12
13
14
# File 'app/helpers/application_helper.rb', line 12

def admin_path
  '/admin'
end

#adservObject



8
9
10
# File 'app/helpers/application_helper.rb', line 8

def adserv
  true
end

#blog_pathObject



74
75
76
# File 'app/helpers/application_helper.rb', line 74

def blog_path
  "http://infiniteshelter.com/tags/show/Computational_Arts_Corp"
end

#city_path(cityname, opts = {}) ⇒ Object



90
91
92
93
# File 'app/helpers/application_helper.rb', line 90

def city_path cityname, opts = {}
  opts[:lang] ||= :en
  return "/#{opts[:lang]}/cities/travel-to/#{cityname}"
end

#facebook_pathObject



66
67
68
# File 'app/helpers/application_helper.rb', line 66

def facebook_path
  'http://facebook.com/piousbox'
end

#github_pathObject



58
59
60
# File 'app/helpers/application_helper.rb', line 58

def github_path
  'http://github.com/piousbox'
end

#image_docObject



30
31
32
# File 'app/helpers/application_helper.rb', line 30

def image_doc
  image_tag 'icons/32x32/doc.png'
end

#image_emailObject



54
55
56
# File 'app/helpers/application_helper.rb', line 54

def image_email
  image_tag 'icons/32x32/email.png'
end

#image_facebookObject



42
43
44
# File 'app/helpers/application_helper.rb', line 42

def image_facebook
  image_tag 'icons/32x32/facebook.png'
end

#image_githubObject



50
51
52
# File 'app/helpers/application_helper.rb', line 50

def image_github
  image_tag 'icons/32x32/github.png'
end

#image_linkedinObject



38
39
40
# File 'app/helpers/application_helper.rb', line 38

def image_linkedin
  image_tag 'icons/32x32/linkedin.png'
end

#image_pdfObject



34
35
36
# File 'app/helpers/application_helper.rb', line 34

def image_pdf
  image_tag 'icons/32x32/pdf.png'
end

#image_twitterObject



46
47
48
# File 'app/helpers/application_helper.rb', line 46

def image_twitter
  image_tag 'icons/32x32/twitter.png'
end

#linkedin_pathObject



62
63
64
# File 'app/helpers/application_helper.rb', line 62

def linkedin_path
  'http://linkedin.com'
end

#manager_pathObject



26
27
28
# File 'app/helpers/application_helper.rb', line 26

def manager_path
  '/manager'
end

#pretty_date(input) ⇒ Object



4
5
6
# File 'app/helpers/application_helper.rb', line 4

def pretty_date input
  return input.strftime("%Y-%m-%d")
end


82
83
84
85
86
87
88
# File 'app/helpers/application_helper.rb', line 82

def print_site site
  out = ''
  out += link_to image_tag( "flags/#{site.lang}.png" ), manager_site_path(site)
  out += link_to '[~]', edit_manager_site_path(site)
  out += "<div class='inline'>#{button_to '[x]', manager_site_path(site), :method => :delete, :confirm => 'Are you sure?'}</div>"
  return out
end

#search_pathObject



22
23
24
# File 'app/helpers/application_helper.rb', line 22

def search_path
  '/search'
end

#second_tag_path(t) ⇒ Object



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

def second_tag_path t
  return "/tags/view/#{t[:name_seo]}" unless t[:name_seo].blank?
  
  "/tags/#{t.to_param}"
end

#team_pathObject



70
71
72
# File 'app/helpers/application_helper.rb', line 70

def team_path
  "http://computationalartscorp.com/team"
end

#twitter_pathObject



78
79
80
# File 'app/helpers/application_helper.rb', line 78

def twitter_path
  'http://twitter.com/piousbox'
end