Module: ThemesForRails::ActionView
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/themes_for_rails/action_view.rb
Instance Method Summary collapse
- #current_theme_image_path(asset) ⇒ Object
- #current_theme_javascript_path(asset) ⇒ Object
- #current_theme_stylesheet_path(asset) ⇒ Object
- #theme_image_path(asset, new_theme_name = self.theme_name) ⇒ Object
- #theme_image_submit_tag(source, options = {}) ⇒ Object
- #theme_image_tag(source, options = {}) ⇒ Object
- #theme_javascript_include_tag(*files) ⇒ Object
- #theme_javascript_path(asset, new_theme_name = self.theme_name) ⇒ Object
- #theme_stylesheet_link_tag(*files) ⇒ Object
- #theme_stylesheet_path(asset, new_theme_name = self.theme_name) ⇒ Object
Instance Method Details
#current_theme_image_path(asset) ⇒ Object
20 21 22 |
# File 'lib/themes_for_rails/action_view.rb', line 20 def current_theme_image_path(asset) base_theme_image_path(:theme => self.theme_name, :asset => asset) end |
#current_theme_javascript_path(asset) ⇒ Object
16 17 18 |
# File 'lib/themes_for_rails/action_view.rb', line 16 def current_theme_javascript_path(asset) base_theme_javascript_path(:theme => self.theme_name, :asset => "#{asset}.js") end |
#current_theme_stylesheet_path(asset) ⇒ Object
12 13 14 |
# File 'lib/themes_for_rails/action_view.rb', line 12 def current_theme_stylesheet_path(asset) base_theme_stylesheet_path(:theme => self.theme_name, :asset => "#{asset}.css") end |
#theme_image_path(asset, new_theme_name = self.theme_name) ⇒ Object
32 33 34 |
# File 'lib/themes_for_rails/action_view.rb', line 32 def theme_image_path(asset, new_theme_name = self.theme_name) base_theme_image_path(:theme => new_theme_name, :asset => asset) end |
#theme_image_submit_tag(source, options = {}) ⇒ Object
40 41 42 |
# File 'lib/themes_for_rails/action_view.rb', line 40 def theme_image_submit_tag(source, = {}) image_submit_tag(theme_image_path(source), ) end |
#theme_image_tag(source, options = {}) ⇒ Object
36 37 38 |
# File 'lib/themes_for_rails/action_view.rb', line 36 def theme_image_tag(source, = {}) image_tag(theme_image_path(source), ) end |
#theme_javascript_include_tag(*files) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/themes_for_rails/action_view.rb', line 44 def theme_javascript_include_tag(*files) = files. .merge!({ :type => "text/javascript" }) = files.collect {|file| theme_javascript_path(file) } += [] javascript_include_tag(*) end |
#theme_javascript_path(asset, new_theme_name = self.theme_name) ⇒ Object
28 29 30 |
# File 'lib/themes_for_rails/action_view.rb', line 28 def theme_javascript_path(asset, new_theme_name = self.theme_name) base_theme_javascript_path(:theme => new_theme_name, :asset => "#{asset}.js") end |
#theme_stylesheet_link_tag(*files) ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/themes_for_rails/action_view.rb', line 53 def theme_stylesheet_link_tag(*files) = files. .merge!({ :type => "text/css" }) = files.collect {|file| theme_stylesheet_path(file) } += [] stylesheet_link_tag(*) end |
#theme_stylesheet_path(asset, new_theme_name = self.theme_name) ⇒ Object
24 25 26 |
# File 'lib/themes_for_rails/action_view.rb', line 24 def theme_stylesheet_path(asset, new_theme_name = self.theme_name) base_theme_stylesheet_path(:theme => new_theme_name, :asset => "#{asset}.css") end |