Sha256: 5cb80fbb2d5f5ac1820f04f160604deaf42d50ac254549de43b81ac25dc07b08
Contents?: true
Size: 1.61 KB
Versions: 4
Compression:
Stored size: 1.61 KB
Contents
module HelpPopups module ApplicationHelper def help_popup(topic_code) @topic = Topic.where(:code => topic_code).first if (@topic.nil?) return_html = image_tag("help_popup.gif", :title => "Topic Missing", :style => "cursor:pointer", :onclick => "alert('Unrecognized Help Code. Please contact Administrator');") else return_html = "<div id='help_popup_" + topic_code + "' class='help_popup' style='display:none'>" return_html = return_html + " <div style='border-bottom:1px solid #333333'>" return_html = return_html + " <div style='float:left' class='help_popup_title'>" + @topic.title + "</div>" return_html = return_html + " <div style='float:right'>" return_html = return_html + " <a href='#' style='color:#FF0000;font-weight:bold;text-decoration:none' onclick='document.getElementById(\"help_popup_" + topic_code + "\").style.display=\"none\";'>" + image_tag("close-button.png", :title => "Close Button Missing", :style => "cursor:pointer") + "</a>" return_html = return_html + " </div>" return_html = return_html + " <div style='clear:both'></div>" return_html = return_html + " </div>" return_html = return_html + " <div class='help_popup_body'>" + @topic.body.html_safe + "</div>" return_html = return_html + "</div>" return_html = return_html + image_tag("help_popup.gif", :title => @topic.title, :style => "cursor:pointer", :onclick => "document.getElementById(\"help_popup_" + topic_code + "\").style.display=\"inline\";") return_html.html_safe end end end end
Version data entries
4 entries across 4 versions & 1 rubygems