Sha256: fd8e8ff73a962f4f83d20a409be5d7d1f01f35bf3ba44c2da52c896d78563026
Contents?: true
Size: 828 Bytes
Versions: 7
Compression:
Stored size: 828 Bytes
Contents
module Typus module QuickEdit def quick_edit render :text => '' and return unless session[:typus_user_id] url = url_for :controller => "admin/#{params[:resource]}", :action => 'edit', :id => params[:id] @content = <<-HTML var links = ''; links += '<div id="quick_edit">'; links += '<a href=\"#{url}\">#{params[:message]}</a>'; links += '</div>'; links += '<style type="text/css">'; links += '<!--'; links += '#quick_edit { font-size: 11px; float: right; position: fixed; right: 0px; background: #{params[:color]}; margin: 5px; padding: 3px 5px; }'; links += '#quick_edit a { color: #FFF; font-weight: bold; }' links += '-->'; links += '</style>'; document.write(links); HTML render :text => @content end end end
Version data entries
7 entries across 7 versions & 1 rubygems