Sha256: b8887b1a13531c941c82808b694243eb0c801028c69d6c9494ce18f9ba03ec85
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 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\";'>X</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
3 entries across 3 versions & 1 rubygems