Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Instance Method Summary collapse
- #admin_path ⇒ Object
- #adserv ⇒ Object
- #blog_path ⇒ Object
- #city_path(cityname, opts = {}) ⇒ Object
- #facebook_path ⇒ Object
- #github_path ⇒ Object
- #image_doc ⇒ Object
- #image_email ⇒ Object
- #image_facebook ⇒ Object
- #image_github ⇒ Object
- #image_linkedin ⇒ Object
- #image_pdf ⇒ Object
- #image_twitter ⇒ Object
- #linkedin_path ⇒ Object
- #manager_path ⇒ Object
- #pretty_date(input) ⇒ Object
- #print_site(site) ⇒ Object
- #search_path ⇒ Object
- #second_tag_path(t) ⇒ Object
- #team_path ⇒ Object
- #twitter_path ⇒ Object
Instance Method Details
#admin_path ⇒ Object
12 13 14 |
# File 'app/helpers/application_helper.rb', line 12 def admin_path '/admin' end |
#adserv ⇒ Object
8 9 10 |
# File 'app/helpers/application_helper.rb', line 8 def adserv true end |
#blog_path ⇒ Object
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_path ⇒ Object
66 67 68 |
# File 'app/helpers/application_helper.rb', line 66 def facebook_path 'http://facebook.com/piousbox' end |
#github_path ⇒ Object
58 59 60 |
# File 'app/helpers/application_helper.rb', line 58 def github_path 'http://github.com/piousbox' end |
#image_doc ⇒ Object
30 31 32 |
# File 'app/helpers/application_helper.rb', line 30 def image_doc image_tag 'icons/32x32/doc.png' end |
#image_email ⇒ Object
54 55 56 |
# File 'app/helpers/application_helper.rb', line 54 def image_email image_tag 'icons/32x32/email.png' end |
#image_facebook ⇒ Object
42 43 44 |
# File 'app/helpers/application_helper.rb', line 42 def image_facebook image_tag 'icons/32x32/facebook.png' end |
#image_github ⇒ Object
50 51 52 |
# File 'app/helpers/application_helper.rb', line 50 def image_github image_tag 'icons/32x32/github.png' end |
#image_linkedin ⇒ Object
38 39 40 |
# File 'app/helpers/application_helper.rb', line 38 def image_linkedin image_tag 'icons/32x32/linkedin.png' end |
#image_pdf ⇒ Object
34 35 36 |
# File 'app/helpers/application_helper.rb', line 34 def image_pdf image_tag 'icons/32x32/pdf.png' end |
#image_twitter ⇒ Object
46 47 48 |
# File 'app/helpers/application_helper.rb', line 46 def image_twitter image_tag 'icons/32x32/twitter.png' end |
#linkedin_path ⇒ Object
62 63 64 |
# File 'app/helpers/application_helper.rb', line 62 def linkedin_path 'http://linkedin.com' end |
#manager_path ⇒ Object
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 |
#print_site(site) ⇒ Object
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'>#{ '[x]', manager_site_path(site), :method => :delete, :confirm => 'Are you sure?'}</div>" return out end |
#search_path ⇒ Object
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_path ⇒ Object
70 71 72 |
# File 'app/helpers/application_helper.rb', line 70 def team_path "http://computationalartscorp.com/team" end |
#twitter_path ⇒ Object
78 79 80 |
# File 'app/helpers/application_helper.rb', line 78 def twitter_path 'http://twitter.com/piousbox' end |