Sha256: 56a2f8ffc6253bc34a12b2b7698c95c4869e1d4700bf6bccaea98f6368d85067
Contents?: true
Size: 832 Bytes
Versions: 4
Compression:
Stored size: 832 Bytes
Contents
module MxitRailsHelper def mxit_path route MxitRails::Router.url route end def mxit_link route, label, variables=nil unless variables.nil? var_strings = [] #TODO: Use default Rails get encoding variables.each do |key, value| var_strings << "#{key}=#{value}" end route += "?#{var_strings.join('&')}" end output = "<a href=\"#{route}\">#{label}</a>".html_safe end def mxit_style *names content = [] names.each do |name| content << MxitRails::Styles.get(name) || '' end content.join(' ').html_safe end def mxit_nav_link target, label "<p style=\"#{ mxit_style :right }\">#{ mxit_link target, label }</p>".html_safe end def mxit_proceed content "<p><b style=\"#{ mxit_style :link }\">> #{content}</b></p>".html_safe end end
Version data entries
4 entries across 4 versions & 1 rubygems