Sha256: a74e912207ef736303799edfd398b2504263ae3f344dc2ed2164472620458c4e

Contents?: true

Size: 758 Bytes

Versions: 14

Compression:

Stored size: 758 Bytes

Contents

module Admin::ThemesHelper
  require('find')
  def fetch_stylesheets
    list = '<ul>'
    Find.find(this_blog.current_theme.path + "/stylesheets") do |path|
      if path =~ /css$/ 
        list << content_tag(:li, link_to(File.basename(path), {:controller => 'themes', :action => 'editor', :type => 'stylesheet', :file => File.basename(path)}))
      end
    end
    list << '</ul>'
    list
  end

  def fetch_layouts
    list = '<ul>'
    Find.find(this_blog.current_theme.path + "/layouts") do |path|
      if path =~ /rhtml$|erb$/ 
        list << content_tag(:li, link_to(File.basename(path), {:controller => 'themes', :action => 'editor', :type => 'layout', :file => File.basename(path)}))
      end
    end
    list << '</ul>'
    list
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
typo-5.4 app/helpers/admin/themes_helper.rb
typo-5.0.1 app/helpers/admin/themes_helper.rb
typo-5.0.2 app/helpers/admin/themes_helper.rb
typo-5.0.3.98.1 app/helpers/admin/themes_helper.rb
typo-5.0 app/helpers/admin/themes_helper.rb
typo-5.0.3.98 app/helpers/admin/themes_helper.rb
typo-5.1.1 app/helpers/admin/themes_helper.rb
typo-5.1.2 app/helpers/admin/themes_helper.rb
typo-5.1.3 app/helpers/admin/themes_helper.rb
typo-5.1 app/helpers/admin/themes_helper.rb
typo-5.1.98 app/helpers/admin/themes_helper.rb
typo-5.2.98 app/helpers/admin/themes_helper.rb
typo-5.2 app/helpers/admin/themes_helper.rb
typo-5.3 app/helpers/admin/themes_helper.rb