themes_helper.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
- module Admin::ThemesHelper
- require('find')
- def fetch_stylesheets
- list = ''
- Find.find(this_blog.current_theme.path + "/stylesheets") do |path|
- if path =~ /css$/
- list << content_tag(:p, link_to(File.basename(path), {:controller => 'themes', :action => 'editor', :type => 'stylesheet', :file => File.basename(path)}))
- end
- end
- list
- end
- def fetch_layouts
- list = ''
- Find.find(this_blog.current_theme.path + "/layouts") do |path|
- if path =~ /rhtml$|erb$/
- list << content_tag(:p, link_to(File.basename(path), {:controller => 'themes', :action => 'editor', :type => 'layout', :file => File.basename(path)}))
- end
- end
- list
- end
-
- end