Module: ApplicationHelper
Instance Method Summary
collapse
#next_button, #next_exercise_button, #next_lesson_button
Instance Method Details
#chapter_finished(chapter) ⇒ Object
30
31
32
|
# File 'app/helpers/application_helper.rb', line 30
def chapter_finished(chapter)
t :chapter_finished_html, chapter: link_to_path_element(chapter) if chapter
end
|
4
5
6
|
# File 'app/helpers/application_helper.rb', line 4
def contact_email
Organization.current.contact_email
end
|
#corollary_box(with_corollary) ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'app/helpers/application_helper.rb', line 20
def corollary_box(with_corollary)
if with_corollary.corollary.present?
%Q{
<div class="corollary-box">
<p>#{with_corollary.corollary_html}</p>
</div>
}.html_safe
end
end
|
#page_title(subject) ⇒ Object
8
9
10
11
12
13
14
|
# File 'app/helpers/application_helper.rb', line 8
def page_title(subject)
if subject && !subject.new_record?
"#{subject.friendly} - Mumuki"
else
"Mumuki - #{t :mumuki_catchphrase}"
end
end
|
#paginate(object, options = {}) ⇒ Object
16
17
18
|
# File 'app/helpers/application_helper.rb', line 16
def paginate(object, options={})
"<div class=\"text-center\">#{super(object, {theme: 'twitter-bootstrap-3'}.merge(options))}</div>".html_safe
end
|