% content_for :javascripts do %> <%= javascript_include_tag 'ckeditor/ckeditor' %> <%= javascript_include_tag 'ckeditor/adapters/jquery' %> <% end %> <% custom = { :rows => @resource.typus_options_for(:form_rows), :class => "rich_text" } options = options.merge!(custom) %> <% unless options[:disabled] == true input = "#{@resource.model_name.underscore.gsub("/", "_")}_#{attribute}" insert_picture = <<-DATA #{link_to "Insert picture", {:controller => "/admin/assets", :_popup => true, :_input => input}, {:class => "iframe", :style => "font-size: 10px; background: black; color: white; padding: 2px 5px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"}} DATA label_text << insert_picture.html_safe end %>