Sha256: dc5424a24d68e12589f731027378bd968c5a5ea46daf6170e6d48bb0556bf6d6
Contents?: true
Size: 1.25 KB
Versions: 4
Compression:
Stored size: 1.25 KB
Contents
module ApplicationHelper include WithStudentPathNavigation def contact_email Organization.current.contact_email end def page_title(subject) name = "Mumuki#{Organization.current.title_suffix}" if subject && !subject.new_record? "#{subject.friendly} - #{name}" else "#{name} - #{t :mumuki_catchphrase}" end end def paginate(object, options={}) "<div class=\"text-center\">#{super(object, {theme: 'twitter-bootstrap-3'}.merge(options))}</div>".html_safe end 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 def assistance_box(assignment) if assignment.tips.present? %Q{<div class="mu-tips-box"> #{Mumukit::Assistant::Narrator.random.compose_explanation_html assignment.tips} </div>}.html_safe end end def chapter_finished(chapter) t :chapter_finished_html, chapter: link_to_path_element(chapter) if chapter end def span_toggle(hidden_text, active_text, active) %Q{ <span class="#{'hidden' if active}">#{hidden_text}</span> <span class="#{'hidden' unless active}">#{active_text}</span> }.html_safe end end
Version data entries
4 entries across 4 versions & 1 rubygems