Module: Monologue::ApplicationHelper
Constant Summary
Constants included
from TagsHelper
TagsHelper::NUMBER_OF_LABEL_SIZES
Instance Method Summary
collapse
Methods included from TagsHelper
#label_for_tag, #size_for_tag, #tag_url
Methods included from HtmlHelper
#activable_li_tag, #activable_li_tag_with_link, #sidebar_section_for
Instance Method Details
#absolute_image_url(url) ⇒ Object
45
46
47
48
|
# File 'app/helpers/monologue/application_helper.rb', line 45
def absolute_image_url(url)
return url if url.starts_with? "http"
request.protocol + request.host + url
end
|
#facebook_icon ⇒ Object
41
42
43
|
# File 'app/helpers/monologue/application_helper.rb', line 41
def facebook_icon
social_icon("facebook", Monologue::Config.facebook_url, Monologue::Config.facebook_url)
end
|
#github_icon ⇒ Object
25
26
27
|
# File 'app/helpers/monologue/application_helper.rb', line 25
def github_icon
social_icon("github", "http://github.com/#{Monologue::Config.github_username}", Monologue::Config.github_username)
end
|
#googleplus_icon ⇒ Object
37
38
39
|
# File 'app/helpers/monologue/application_helper.rb', line 37
def googleplus_icon
social_icon("google-plus", Monologue::Config.google_plus_account_url, Monologue::Config.google_plus_account_url)
end
|
#linkedin_icon ⇒ Object
33
34
35
|
# File 'app/helpers/monologue/application_helper.rb', line 33
def linkedin_icon
social_icon("linkedin", Monologue::Config.linkedin_url, Monologue::Config.linkedin_url)
end
|
#monologue_accurate_title ⇒ Object
13
14
15
|
# File 'app/helpers/monologue/application_helper.rb', line 13
def monologue_accurate_title
content_for?(:title) ? ((content_for :title) + " | #{Monologue::Config.site_name}") : Monologue::Config.site_name
end
|
8
9
10
11
|
# File 'app/helpers/monologue/application_helper.rb', line 8
def monologue_admin_form_for(object, options = {}, &block)
options[:builder] = MonologueAdminFormBuilder
form_for(object, options, &block)
end
|
17
18
19
|
# File 'app/helpers/monologue/application_helper.rb', line 17
def
tag("link", href: feed_url, rel: "alternate", title: "RSS", type: "application/rss+xml")
end
|
21
22
23
|
# File 'app/helpers/monologue/application_helper.rb', line 21
def
social_icon("rss", feed_url, Monologue::Config.)
end
|
#social_icon(foundicon, url, setting) ⇒ Object
50
51
52
53
54
55
56
|
# File 'app/helpers/monologue/application_helper.rb', line 50
def social_icon(foundicon, url, setting)
return if setting.nil? || !setting
content_tag :a, href: url, class: "social", target: "_blank" do
content_tag :i, class: "foundicon-#{foundicon}" do end
end
end
|
29
30
31
|
# File 'app/helpers/monologue/application_helper.rb', line 29
def
social_icon("twitter", "http://twitter.com/#{Monologue::Config.}", Monologue::Config.)
end
|