Sha256: 24b4c71162db7091caac5981c86bb3c20e8e7571c3678df004604d11c5823c61

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

class Admin::ThemesController < Admin::BaseController

  def index
    @themes = Theme.find_all
    @themes.each do |theme|
      theme.description_html = TextFilter.filter_text(this_blog, theme.description, nil, [:markdown,:smartypants])
    end
    @active = this_blog.current_theme
  end

  def preview
    send_file "#{Theme.themes_root}/#{params[:theme]}/preview.png", :type => 'image/png', :disposition => 'inline', :stream => false
  end

  def switchto
    this_blog.theme = params[:theme]
    this_blog.save
    redirect_to :action => 'index'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typo-4.1.1 app/controllers/admin/themes_controller.rb
typo-4.1 app/controllers/admin/themes_controller.rb