diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index 6ee611a..f6d1eac 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -219,10 +219,8 @@ module BoxesHelper buttons << thickbox_inline_popup_icon(:help, _('Help on this block'), {}, "help-on-box-#{block.id}") << content_tag('div', content_tag('h2', _('Help')) + content_tag('div', block.help, :style => 'margin-bottom: 1em;') + thickbox_close_button(_('Close')), :style => 'display: none;', :id => "help-on-box-#{block.id}") end - #if block.respond_to?(:embedable) - if true - - url = url_for :controller => 'embed', :action => 'embed_block', :id => block.id, :only_path => false; + if block.respond_to?(:embedable) + url = url_for :controller => 'embed', :action => 'index', :id => block.id, :only_path => false; html = content_tag('div', content_tag('h2', _('Embed block code')) + diff --git a/app/models/block.rb b/app/models/block.rb index f27959a..c30537d 100644 --- a/app/models/block.rb +++ b/app/models/block.rb @@ -16,6 +16,10 @@ class Block < ActiveRecord::Base named_scope :enabled, :conditions => { :enabled => true } + def embedable + true + end + def embed_code(url) html = "" end -- libgit2 0.21.2