Created
January 15, 2010 20:44
-
-
Save anonymous/278391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= css_theme('default.css','scaffold.css') %> | |
<%= js_theme('default.js','testtwo.js') %> | |
<%= link_to img_theme('logo.jpg', :alt => 'Back to the homepage'), root_url %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def js_theme(*files) | |
file_array = [*files] | |
js_array = [] | |
file_array.each do |row| | |
js_array += current_theme_path('js', row.to_s).to_a | |
end | |
javascript_include_tag(:defaults, js_array) | |
end | |
def css_theme(*files) | |
file_array = [*files] | |
css_array = [] | |
file_array.each do |row| | |
css_array += current_theme_path('css', row.to_s).to_a | |
end | |
stylesheet_link_tag(css_array) | |
end | |
def img_theme(file, options) | |
image_tag(current_theme_path('img',file), options) | |
end | |
def current_theme_path(type, file) | |
path = "/themes/" + @opt_default_theme + "/images/" + file if type == 'img' | |
path = "/themes/" + @opt_default_theme + "/stylesheets/" + file if type == 'css' | |
path = "/themes/" + @opt_default_theme + "/javascripts/" + file if type == 'js' | |
return path | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="/themes/default/stylesheets/default.css?1263252884" media="screen" rel="stylesheet" type="text/css" /> | |
<link href="/themes/default/stylesheets/scaffold.css?1263252968" media="screen" rel="stylesheet" type="text/css" /> | |
<script src="/javascripts/prototype.js" type="text/javascript"></script> | |
<script src="/javascripts/effects.js?1263578224" type="text/javascript"></script> | |
<script src="/javascripts/dragdrop.js?1263578224" type="text/javascript"></script> | |
<script src="/javascripts/controls.js?1263578224" type="text/javascript"></script> | |
<script src="/javascripts/swfobject.js?1263578224" type="text/javascript"></script> | |
<script src="/themes/default/javascripts/default.js?1263578286" type="text/javascript"></script> | |
<script src="/themes/default/javascripts/testtwo.js?1263587716" type="text/javascript"></script> | |
<script src="/javascripts/application.js?1263578223" type="text/javascript"></script> | |
<a href="http://localhost:3000/"><img alt="Back to the homepage" src="/themes/default/images/logo.jpg?1263252935" /></a> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment