Sha256: 34c96ca0b17ff493c506d818f27cecb60bbe84b876f87747e9bb458c3568df12

Contents?: true

Size: 557 Bytes

Versions: 9

Compression:

Stored size: 557 Bytes

Contents

class Admin::ThemesController < Admin::BaseController

  def index
    @themes = Theme.find_all
    @themes.each do |theme|
      theme.description_html = TextFilter.filter_text(theme.description, self, 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

9 entries across 9 versions & 1 rubygems

Version Path
typo-3.99.0 app/controllers/admin/themes_controller.rb
typo-3.99.3 app/controllers/admin/themes_controller.rb
typo-3.99.2 app/controllers/admin/themes_controller.rb
typo-3.99.1 app/controllers/admin/themes_controller.rb
typo-4.0.1 app/controllers/admin/themes_controller.rb
typo-3.99.4 app/controllers/admin/themes_controller.rb
typo-4.0.0 app/controllers/admin/themes_controller.rb
typo-4.0.2 app/controllers/admin/themes_controller.rb
typo-4.0.3 app/controllers/admin/themes_controller.rb