Sha256: 3ec3cb31276d9f8afe501eea8435bcd856743f42d8ae24bfddc66fe64e3ae822
Contents?: true
Size: 1.15 KB
Versions: 30
Compression:
Stored size: 1.15 KB
Contents
module Tags::WidgetTags include TrustyCms::Taggable desc "Widget of sharing icons" tag "rad_share_widget" do |tag| attributes = tag.attr.to_options url = attributes[:url].nil? ? request.url : attributes[:url] message = attributes[:message].nil? ? "Check out #{tag.locals.page.title}." : attributes[:message] email_subject = attributes[:email_subject].nil? ? tag.locals.page.title : attributes[:email_subject] email_message = attributes[:email_message].nil? ? "I thought you might be interested in this: #{url}" : "#{attributes[:email_message]} #{url}" email_action_url = attributes[:email_action_url].nil? ? "/rad_social/mail" : attributes[:email_action_url] request.env["action_controller.instance"].render_to_string :partial => "widget/horizontal_widget", :locals => { :url => url, :message => message, :email_subject => email_subject, :email_message => email_message, :email_action_url => email_action_url } end end
Version data entries
30 entries across 30 versions & 1 rubygems