interpret 0.2.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/.gitignore +2 -4
  2. data/Gemfile +2 -3
  3. data/README.md +1 -10
  4. data/{public/stylesheets → app/assets/images}/folder.png +0 -0
  5. data/{public → app/assets}/javascripts/interpret.js +0 -0
  6. data/{public/stylesheets/interpret_style.css → app/assets/stylesheets/interpret_style.css.erb} +1 -1
  7. data/app/controllers/interpret/base_controller.rb +1 -1
  8. data/app/controllers/interpret/search_controller.rb +8 -2
  9. data/app/controllers/interpret/tools_controller.rb +5 -5
  10. data/app/controllers/interpret/translations_controller.rb +59 -69
  11. data/app/models/interpret/translation.rb +1 -0
  12. data/app/views/interpret/missing_translations/blank.html.erb +1 -1
  13. data/app/views/interpret/missing_translations/index.html.erb +1 -1
  14. data/app/views/interpret/missing_translations/stale.html.erb +2 -2
  15. data/app/views/interpret/search/_blank_search.html.erb +1 -1
  16. data/app/views/interpret/search/_filled_search.html.erb +1 -1
  17. data/app/views/interpret/tools/index.html.erb +2 -2
  18. data/app/views/interpret/translations/_listing.html.erb +3 -3
  19. data/app/views/interpret/translations/new.html.erb +2 -2
  20. data/app/views/layouts/interpret/interpret.html.erb +55 -0
  21. data/app/views/layouts/{interpret_base.html.erb → interpret/interpret_base.html.erb} +0 -0
  22. data/config/routes.rb +19 -21
  23. data/{lib/generators/interpret/templates/migration.rb → db/migrate/20111108094329_create_translations.rb} +3 -4
  24. data/interpret.gemspec +3 -3
  25. data/lib/interpret/engine.rb +6 -4
  26. data/lib/interpret/helpers.rb +4 -53
  27. data/lib/interpret/version.rb +1 -1
  28. data/lib/interpret.rb +0 -4
  29. data/script/rails +5 -0
  30. data/spec/integration/missing_translations_spec.rb +8 -8
  31. data/spec/integration/search_spec.rb +8 -8
  32. data/spec/integration/stale_translations_spec.rb +5 -5
  33. data/spec/integration/tools_spec.rb +9 -9
  34. data/spec/integration/translations_spec.rb +2 -2
  35. data/spec/spec_helper.rb +2 -9
  36. data/spec/support/load_routes.rb +6 -0
  37. data/test_app/Gemfile +11 -6
  38. data/test_app/{public → app/assets}/images/a1.gif +0 -0
  39. data/test_app/{public → app/assets}/images/a10.jpg +0 -0
  40. data/test_app/{public → app/assets}/images/a16.gif +0 -0
  41. data/test_app/{public → app/assets}/images/a18.gif +0 -0
  42. data/test_app/{public → app/assets}/images/a22.gif +0 -0
  43. data/test_app/{public → app/assets}/images/a26.gif +0 -0
  44. data/test_app/{public → app/assets}/images/a33.gif +0 -0
  45. data/test_app/{public → app/assets}/images/a36.gif +0 -0
  46. data/test_app/{public → app/assets}/images/a38.gif +0 -0
  47. data/test_app/{public → app/assets}/images/a41.gif +0 -0
  48. data/test_app/{public → app/assets}/images/a47.gif +0 -0
  49. data/test_app/{public → app/assets}/images/a50.gif +0 -0
  50. data/test_app/{public → app/assets}/images/a8.gif +0 -0
  51. data/test_app/{public → app/assets}/images/abg.gif +0 -0
  52. data/test_app/{public → app/assets}/images/pic1.jpg +0 -0
  53. data/test_app/{public → app/assets}/images/pic2.jpg +0 -0
  54. data/test_app/{public → app/assets}/images/spacer.gif +0 -0
  55. data/test_app/{public → app/assets}/images/upbg.gif +0 -0
  56. data/test_app/app/assets/javascripts/application.js +4 -0
  57. data/test_app/{public → app/assets}/stylesheets/.gitkeep +0 -0
  58. data/test_app/{public/stylesheets/default.css → app/assets/stylesheets/default.css.erb} +16 -16
  59. data/test_app/{public → app/assets}/stylesheets/private.css +0 -0
  60. data/test_app/app/controllers/admin/dashboard_controller.rb +6 -0
  61. data/test_app/app/views/admin/dashboard/index.html.erb +1 -0
  62. data/test_app/app/views/layouts/application.html.erb +3 -13
  63. data/test_app/app/views/layouts/backoffice.html.erb +3 -4
  64. data/test_app/app/views/pages/index.html.erb +2 -2
  65. data/test_app/config/application.rb +12 -3
  66. data/test_app/config/environments/development.rb +0 -1
  67. data/test_app/config/initializers/interpret.rb +0 -1
  68. data/test_app/config/routes.rb +10 -1
  69. data/test_app/db/migrate/{20111021100344_interpret_create_translations.rb → 20111108094455_create_translations.rb} +3 -4
  70. data/test_app/db/schema.rb +3 -0
  71. metadata +60 -78
  72. data/app/views/interpret/translations/live_edit.html.erb +0 -11
  73. data/app/views/layouts/interpret.html.erb +0 -56
  74. data/lib/generators/interpret/migration_generator.rb +0 -25
  75. data/lib/generators/interpret/setup_generator.rb +0 -21
  76. data/lib/interpret/capistrano.rb +0 -18
  77. data/lib/interpret/controller_filter.rb +0 -12
  78. data/public/javascripts/facebox-1.3/closelabel.png +0 -0
  79. data/public/javascripts/facebox-1.3/facebox.css +0 -80
  80. data/public/javascripts/facebox-1.3/facebox.js +0 -309
  81. data/public/javascripts/facebox-1.3/loading.gif +0 -0
  82. data/public/stylesheets/interpret_live_edit_style.css +0 -38
  83. data/test_app/config/deploy.rb +0 -24
  84. data/test_app/config/initializers/rack_patch.rb +0 -13
  85. data/test_app/public/javascripts/application.js +0 -2
  86. data/test_app/public/javascripts/best_in_place.js +0 -456
  87. data/test_app/public/javascripts/facebox-1.3/closelabel.png +0 -0
  88. data/test_app/public/javascripts/facebox-1.3/facebox.css +0 -80
  89. data/test_app/public/javascripts/facebox-1.3/facebox.js +0 -309
  90. data/test_app/public/javascripts/facebox-1.3/loading.gif +0 -0
  91. data/test_app/public/javascripts/interpret.js +0 -4
  92. data/test_app/public/javascripts/rails.js +0 -134
  93. data/test_app/public/stylesheets/folder.png +0 -0
  94. data/test_app/public/stylesheets/interpret_live_edit_style.css +0 -38
  95. data/test_app/public/stylesheets/interpret_style.css +0 -535
@@ -1,6 +1,5 @@
1
1
  module Interpret
2
2
  module InterpretHelpers
3
-
4
3
  # Generates the html tree from the given keys
5
4
  def interpret_show_tree(tree, origin_keys)
6
5
  tree = tree.first[1]
@@ -12,11 +11,6 @@ module Interpret
12
11
  build_tree(tree, origin_keys)
13
12
  end
14
13
 
15
- def interpret_section_link_to(name, options = {}, html_options = {})
16
- html_options.merge!({ :class => 'current' }) if current_controller?(options)
17
- link_to name, options, html_options
18
- end
19
-
20
14
  def interpret_title(title)
21
15
  content_for :title do
22
16
  title
@@ -24,72 +18,29 @@ module Interpret
24
18
  end
25
19
 
26
20
  def interpret_parent_layout(layout)
27
- @_content_for[:layout] = self.output_buffer
21
+ @view_flow.set(:layout, self.output_buffer)
28
22
  self.output_buffer = render(:file => "layouts/#{layout}")
29
23
  end
30
24
 
31
- def t(key, options = {})
32
- if Interpret.live_edit
33
- keys = build_keys(key, options)
34
- "<span class='interpret_editable' data-key='#{keys}'>#{translate(key, options)}</span>".html_safe
35
- else
36
- translate(key, options) #.html_safe
37
- end
38
- end
39
-
40
- def interpret_live_edition
41
- return unless Interpret.live_edit
42
- content_tag(:div) do
43
- concat(javascript_include_tag "facebox-1.3/facebox")
44
- concat javascript_tag <<-JS
45
- $(document).ready(function(){
46
- $(".interpret_editable").click(function() {
47
- var key = $(this).attr("data-key");
48
- jQuery.facebox({ ajax: '#{live_edit_interpret_translations_path}?key=' + key});
49
- return false;
50
- });
51
- });
52
- JS
53
- concat(stylesheet_link_tag "interpret_live_edit_style")
54
- concat(stylesheet_link_tag "/javascripts/facebox-1.3/facebox.css")
55
- end
56
- end
57
-
58
25
  private
59
- def build_keys(key, options)
60
- I18n.normalize_keys(I18n.locale, scope_key_by_partial(key), options[:scope]).join(".")
61
- end
62
-
63
- def scope_key_by_partial(key)
64
- if key.to_s.first == "."
65
- "#{@_virtual_path.gsub(%r{/_?}, ".")}#{key.to_s}"
66
- else
67
- key
68
- end
69
- end
70
26
 
71
27
  def build_tree(hash, origin_keys = "", prev_key = "")
72
28
  out = "<ul>"
73
29
  if origin_keys.present? && prev_key.blank?
74
30
  parent_key = origin_keys.split(".")[0..-2].join(".")
75
31
  if parent_key.blank?
76
- out << "<li>#{link_to "..", interpret_root_path}</li>"
32
+ out << "<li>#{link_to "..", root_path}</li>"
77
33
  else
78
- out << "<li>#{link_to "..", interpret_root_path(:key => parent_key)}</li>"
34
+ out << "<li>#{link_to "..", root_path(:key => parent_key)}</li>"
79
35
  end
80
36
  end
81
37
  hash.keys.each do |key|
82
38
  out << "<li>"
83
- out << "#{link_to key, interpret_root_path(:key => "#{origin_keys.blank? ? "" : "#{origin_keys}."}#{prev_key}#{key}")}"
39
+ out << "#{link_to key, root_path(:key => "#{origin_keys.blank? ? "" : "#{origin_keys}."}#{prev_key}#{key}")}"
84
40
  out << "</li>"
85
41
  end
86
42
  out << "</ul>"
87
43
  out.html_safe
88
44
  end
89
-
90
- def current_controller?(opts)
91
- hash = Rails.application.routes.recognize_path(url_for(opts))
92
- params[:controller] == hash[:controller]
93
- end
94
45
  end
95
46
  end
@@ -1,3 +1,3 @@
1
1
  module Interpret
2
- VERSION = "0.2.1"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/interpret.rb CHANGED
@@ -8,20 +8,16 @@ module Interpret
8
8
  mattr_accessor :sweeper
9
9
  mattr_accessor :parent_controller
10
10
  mattr_accessor :registered_envs
11
- mattr_accessor :scope
12
11
  mattr_accessor :current_user
13
12
  mattr_accessor :layout
14
13
  mattr_accessor :soft
15
- mattr_accessor :live_edit
16
14
  mattr_accessor :black_list
17
15
  mattr_accessor :ability
18
16
 
19
17
  @@parent_controller = "application_controller"
20
18
  @@registered_envs = [:production, :staging]
21
- @@scope = ""
22
19
  @@layout = "interpret_base"
23
20
  @@soft = false
24
- @@live_edit = false
25
21
  @@black_list = []
26
22
  @@current_user = "current_user"
27
23
  @@ability = "interpret/ability"
data/script/rails ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
5
+ load File.expand_path('../../test_app/script/rails', __FILE__)
@@ -6,32 +6,32 @@ describe "Missing translations" do
6
6
  before { load_integration_data }
7
7
 
8
8
  it "should show me nothing when I'm in english language" do
9
- visit interpret_missing_translations_path(:en)
9
+ visit missing_translations_path(:en)
10
10
  page.should have_content("There can't be missing translations for the main language")
11
11
  end
12
12
 
13
13
  it "should show the total number of missing translations" do
14
- visit interpret_missing_translations_path(:es)
14
+ visit missing_translations_path(:es)
15
15
  page.should have_content("There are 2 missing translations in [es]")
16
16
  end
17
17
 
18
18
  it "should show me a table with all missing translations" do
19
- visit interpret_missing_translations_path(:es)
19
+ visit missing_translations_path(:es)
20
20
  elements = page.all("table#missing_translations tbody tr")
21
21
  elements.size.should == 2
22
22
  elements.first.should have_content("missings.p1")
23
23
  end
24
24
 
25
25
  it "should show me the value in english for a given key" do
26
- visit interpret_missing_translations_path(:es)
26
+ visit missing_translations_path(:es)
27
27
  page.should have_content("Missing one")
28
28
  end
29
29
 
30
30
  it "should let me create a new translation in the current language" do
31
- visit interpret_missing_translations_path(:es)
31
+ visit missing_translations_path(:es)
32
32
 
33
33
  within("table#missing_translations tbody tr:first") do
34
- page.fill_in "interpret_translation_value", :with => "Uno perdido"
34
+ page.fill_in "translation_value", :with => "Uno perdido"
35
35
  page.click_button "Create"
36
36
  end
37
37
 
@@ -41,7 +41,7 @@ describe "Missing translations" do
41
41
  end
42
42
 
43
43
  it "should let me destroy the original translation" do
44
- visit interpret_missing_translations_path(:es)
44
+ visit missing_translations_path(:es)
45
45
 
46
46
  within("table#missing_translations tbody tr:first") do
47
47
  page.click_link "Destroy"
@@ -53,7 +53,7 @@ describe "Missing translations" do
53
53
  end
54
54
 
55
55
  it "should not show me blacklisted translations" do
56
- visit interpret_missing_translations_path(:es)
56
+ visit missing_translations_path(:es)
57
57
  page.should have_no_content("missings.black")
58
58
  elements = page.all("table#missing_translations tbody tr")
59
59
  elements.size.should == 2
@@ -6,7 +6,7 @@ describe "Search" do
6
6
  before { load_integration_data }
7
7
 
8
8
  it "should return the correct results searching by text" do
9
- visit interpret_search_path(:es)
9
+ visit search_path(:es)
10
10
  fill_in "Translation text", :with => "Comentarios"
11
11
  click_button "SEARCH"
12
12
 
@@ -17,7 +17,7 @@ describe "Search" do
17
17
  end
18
18
 
19
19
  it "should work with accents and other non ascii chars" do
20
- visit interpret_search_path(:es)
20
+ visit search_path(:es)
21
21
  fill_in "Translation text", :with => "extraña"
22
22
  click_button "SEARCH"
23
23
 
@@ -28,7 +28,7 @@ describe "Search" do
28
28
  end
29
29
 
30
30
  it "should return the correct results searching by key" do
31
- visit interpret_search_path(:es)
31
+ visit search_path(:es)
32
32
  fill_in "Key value", :with => "printer"
33
33
  click_button "SEARCH"
34
34
 
@@ -40,7 +40,7 @@ describe "Search" do
40
40
  end
41
41
 
42
42
  it "should not return blacklisted translations by key" do
43
- visit interpret_search_path(:es)
43
+ visit search_path(:es)
44
44
  fill_in "Key value", :with => "black_p1"
45
45
  click_button "SEARCH"
46
46
 
@@ -48,7 +48,7 @@ describe "Search" do
48
48
  end
49
49
 
50
50
  it "should not return blacklisted translations by text" do
51
- visit interpret_search_path(:es)
51
+ visit search_path(:es)
52
52
  fill_in "Translation text", :with => "Una frase prohibida"
53
53
  click_button "SEARCH"
54
54
 
@@ -56,7 +56,7 @@ describe "Search" do
56
56
  end
57
57
 
58
58
  it "should say the number of results found" do
59
- visit interpret_search_path(:es)
59
+ visit search_path(:es)
60
60
  fill_in "Key value", :with => "printer"
61
61
  click_button "SEARCH"
62
62
 
@@ -66,7 +66,7 @@ describe "Search" do
66
66
  end
67
67
 
68
68
  it "should be able to switch the language after a search" do
69
- visit interpret_search_path(:es)
69
+ visit search_path(:es)
70
70
  fill_in "Key value", :with => "printer"
71
71
  click_button "SEARCH"
72
72
 
@@ -75,7 +75,7 @@ describe "Search" do
75
75
  end
76
76
 
77
77
  it "should see the search results in the same order after switching languages" do
78
- visit interpret_search_path(:es)
78
+ visit search_path(:es)
79
79
  fill_in "Key value", :with => "printer"
80
80
  click_button "SEARCH"
81
81
  res = page.all("table#results tbody tr").map{|x| x.find("td.key").text}
@@ -6,23 +6,23 @@ describe "Stale translations" do
6
6
  before { load_integration_data }
7
7
 
8
8
  it "should show me nothing when I'm in english language" do
9
- visit interpret_stale_translations_path(:en)
9
+ visit stale_translations_path(:en)
10
10
  page.should have_content("There can't be stale translations for the main language")
11
11
  end
12
12
 
13
13
  it "should show me the recently modified translations in english", :js => true do
14
- visit interpret_root_path(:en)
14
+ visit root_path(:en)
15
15
  change_translation("table#results tbody tr:first", "New comments text")
16
16
 
17
- visit interpret_stale_translations_path(:es)
17
+ visit stale_translations_path(:es)
18
18
  page.all("table#stale_translations tbody tr").size.should == 1
19
19
  end
20
20
 
21
21
  it "should not show anything if I update a 'es' translation", :js => true do
22
- visit interpret_root_path(:es)
22
+ visit root_path(:es)
23
23
  change_translation("table#results tbody tr:first", "New comments text")
24
24
 
25
- visit interpret_stale_translations_path(:es)
25
+ visit stale_translations_path(:es)
26
26
  page.all("table#stale_translations tbody tr").size.should == 0
27
27
  end
28
28
  end
@@ -7,7 +7,7 @@ describe "Tools" do
7
7
 
8
8
  describe "Download" do
9
9
  it "should be able to download a .yml file for the current language" do
10
- visit interpret_tools_path(:en)
10
+ visit tools_path(:en)
11
11
  page.should have_button("Download")
12
12
 
13
13
  page.click_button "Download"
@@ -15,7 +15,7 @@ describe "Tools" do
15
15
  end
16
16
 
17
17
  it "should get a yaml file for the current language" do
18
- visit interpret_tools_path(:en)
18
+ visit tools_path(:en)
19
19
  page.should have_button("Download")
20
20
 
21
21
  page.click_button "Download"
@@ -24,7 +24,7 @@ describe "Tools" do
24
24
  end
25
25
 
26
26
  it "should get a yaml file with all the correct translations" do
27
- visit interpret_tools_path(:en)
27
+ visit tools_path(:en)
28
28
  page.should have_button("Download")
29
29
 
30
30
  page.click_button "Download"
@@ -37,7 +37,7 @@ describe "Tools" do
37
37
 
38
38
  describe "Import" do
39
39
  it "should be able to import a file" do
40
- visit interpret_tools_path(:en)
40
+ visit tools_path(:en)
41
41
  path = create_tmp_file("""
42
42
  en:
43
43
  someky: somevalue
@@ -52,7 +52,7 @@ describe "Tools" do
52
52
  it:
53
53
  someky: somevalue
54
54
  """)
55
- visit interpret_tools_path(:en)
55
+ visit tools_path(:en)
56
56
  page.attach_file("file", path)
57
57
  page.click_button "Upload"
58
58
  page.should have_content("the language doesn't match")
@@ -60,12 +60,12 @@ describe "Tools" do
60
60
 
61
61
  it "should update existing translations" do
62
62
  path = create_tmp_file(import_en_yml)
63
- visit interpret_tools_path(:en)
63
+ visit tools_path(:en)
64
64
 
65
65
  page.attach_file("file", path)
66
66
  page.click_button "Upload"
67
67
 
68
- visit interpret_root_path(:en)
68
+ visit root_path(:en)
69
69
  within("table#results tbody tr:nth-child(4)") do
70
70
  page.should have_content("A new printer phrase")
71
71
  end
@@ -73,12 +73,12 @@ describe "Tools" do
73
73
 
74
74
  it "should create non existant translations" do
75
75
  path = create_tmp_file(import_en_yml)
76
- visit interpret_tools_path(:en)
76
+ visit tools_path(:en)
77
77
 
78
78
  page.attach_file("file", path)
79
79
  page.click_button "Upload"
80
80
 
81
- visit interpret_root_path(:en)
81
+ visit root_path(:en)
82
82
  page.should have_content("new_stuff")
83
83
  page.should have_content("Something brand new")
84
84
  end
@@ -6,7 +6,7 @@ describe "Translations" do
6
6
  before { load_integration_data }
7
7
 
8
8
  it "should let me edit a translation", :js => true do
9
- visit interpret_root_path(:en)
9
+ visit root_path(:en)
10
10
 
11
11
  # We need this to identify the translation we want to change
12
12
  bip_id = ""
@@ -18,7 +18,7 @@ describe "Translations" do
18
18
  bip_area bip_id, :value, "New value"
19
19
 
20
20
 
21
- visit interpret_root_path(:en)
21
+ visit root_path(:en)
22
22
  within("table#results tbody tr:first") do
23
23
  page.should have_content("New value")
24
24
  end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # Configure Rails Envinronment
2
2
  ENV["RAILS_ENV"] = "test"
3
3
 
4
- require File.expand_path('../../test_app/config/environment', __FILE__)
4
+ require File.expand_path('../../test_app/config/environment.rb', __FILE__)
5
5
  require "rspec/rails"
6
6
  require 'yaml'
7
7
 
@@ -9,14 +9,7 @@ require 'yaml'
9
9
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each{|f| require f}
10
10
 
11
11
  RSpec.configure do |config|
12
- # Remove this line if you don't want RSpec's should and should_not
13
- # methods or matchers
14
- require 'rspec/expectations'
15
-
16
- config.include RSpec::Matchers
17
12
  config.include BestInPlace::TestHelpers
18
- config.use_transactional_fixtures = true
19
13
 
20
- # == Mock Framework
21
- config.mock_with :rspec
14
+ config.use_transactional_fixtures = true
22
15
  end
@@ -0,0 +1,6 @@
1
+ RSpec.configure do |c|
2
+ c.include Interpret::Engine.routes.url_helpers,
3
+ :example_group => {
4
+ :file_path => /\bspec\/integration\//
5
+ }
6
+ end
data/test_app/Gemfile CHANGED
@@ -1,12 +1,17 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rails', '~> 3.0.5'
3
+ gem 'rails', '~> 3.1.1'
4
4
  gem 'haml-rails'
5
- gem 'capistrano'
6
5
 
7
- group :development, :test do
8
- gem 'sqlite3-ruby', :require => 'sqlite3'
9
- end
6
+ gem 'sqlite3'
10
7
 
11
8
  gem 'interpret', :path => ".."
12
- gem 'mysql2', "~> 0.2.7"
9
+ gem 'mysql2', "~> 0.3.0"
10
+
11
+ gem 'jquery-rails'
12
+
13
+ group :assets do
14
+ gem 'sass-rails', '~> 3.1.4'
15
+ gem 'coffee-rails', '~> 3.1.1'
16
+ gem 'uglifier', '>= 1.0.3'
17
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,4 @@
1
+ //= require jquery
2
+ //= require best_in_place
3
+ //= require jquery.purr
4
+ //= require interpret
@@ -13,7 +13,7 @@ margin: 0px;
13
13
 
14
14
  body
15
15
  {
16
- background: #F9F9F7 url('/images/a1.gif') repeat-x;
16
+ background: #F9F9F7 url(<%= asset_path 'a1.gif' %>) repeat-x;
17
17
  font-size: 11px;
18
18
  font-family: "trebuchet ms", helvetica, sans-serif;
19
19
  color: #8C8C73;
@@ -47,7 +47,7 @@ img.picA
47
47
  {
48
48
  position: relative;
49
49
  top: -2px;
50
- background: url('/images/a47.gif') no-repeat;
50
+ background: url(<%= asset_path 'a47.gif' %>) no-repeat;
51
51
  width: 76px;
52
52
  height: 74px;
53
53
  padding: 8px;
@@ -57,7 +57,7 @@ img.picB
57
57
  {
58
58
  position: relative;
59
59
  top: -2px;
60
- background: url('/images/a26.gif') no-repeat;
60
+ background: url(<%= asset_path 'a26.gif' %>) no-repeat;
61
61
  width: 146px;
62
62
  height: 75px;
63
63
  padding: 7px;
@@ -94,7 +94,7 @@ padding-top: 0px;
94
94
  position: absolute;
95
95
  top: 0px;
96
96
  left: 0px;
97
- background: #fff url('/images/upbg.gif') no-repeat;
97
+ background: #fff url(<%= asset_path 'upbg.gif' %>) no-repeat;
98
98
  width: 747px;
99
99
  height: 264px;
100
100
  z-index: 1;
@@ -105,7 +105,7 @@ z-index: 1;
105
105
  position: relative;
106
106
  width: 747px;
107
107
  margin: 0 auto;
108
- background: #fff url('/images/abg.gif') repeat-y;
108
+ background: #fff url(<%= asset_path 'abg.gif' %>) repeat-y;
109
109
  }
110
110
 
111
111
  #inner
@@ -118,7 +118,7 @@ z-index: 2;
118
118
  #header
119
119
  {
120
120
  position: absolute;
121
- background: #FF7800 url('/images/a8.gif') repeat-x;
121
+ background: #FF7800 url(<%= asset_path 'a8.gif' %>) repeat-x;
122
122
  width: 202px;
123
123
  height: 92px;
124
124
  color: #fff;
@@ -157,7 +157,7 @@ color: #FCE2CA;
157
157
  {
158
158
  position: absolute;
159
159
  right: 30px;
160
- background: #EAEAE2 url('/images/a10.jpg') no-repeat;
160
+ background: #EAEAE2 url(<%= asset_path 'a10.jpg' %>) no-repeat;
161
161
  width: 458px;
162
162
  height: 92px;
163
163
  }
@@ -165,7 +165,7 @@ height: 92px;
165
165
  #menu
166
166
  {
167
167
  position: relative;
168
- background: #46461F url('/images/a16.gif') repeat-x;
168
+ background: #46461F url(<%= asset_path 'a16.gif' %>) repeat-x;
169
169
  height: 67px;
170
170
  padding: 0px 20px 0px 5px;
171
171
  margin: 98px 0px 20px 0px;
@@ -199,7 +199,7 @@ font-weight: bold;
199
199
 
200
200
  #menu ul li a:hover
201
201
  {
202
- background: #fff url('/images/a18.gif') repeat-x top;
202
+ background: #fff url(<%= asset_path 'a18.gif' %>) repeat-x top;
203
203
  color: #4A4A24;
204
204
  text-decoration: none;
205
205
  }
@@ -223,7 +223,7 @@ font-size: 16px;
223
223
  line-height: 25px;
224
224
  color: #656551;
225
225
  letter-spacing: -1px;
226
- background: url('/images/a22.gif') bottom repeat-x;
226
+ background: url(<%= asset_path 'a22.gif' %>) bottom repeat-x;
227
227
  padding: 0px 0px 10px 10px;
228
228
  margin-bottom: 20px;
229
229
  }
@@ -249,7 +249,7 @@ font-size: 18px;
249
249
  line-height: 25px;
250
250
  color: #111;
251
251
  letter-spacing: -1px;
252
- background: url('/images/a22.gif') bottom repeat-x;
252
+ background: url(<%= asset_path 'a22.gif' %>) bottom repeat-x;
253
253
  padding: 0px 0px 10px 15px;
254
254
  margin-bottom: 20px;
255
255
  }
@@ -289,7 +289,7 @@ margin-bottom: 0px;
289
289
  {
290
290
  position: relative;
291
291
  top: -10px;
292
- background: url('/images/a33.gif') repeat-x;
292
+ background: url(<%= asset_path 'a33.gif' %>) repeat-x;
293
293
  height: 64px;
294
294
  }
295
295
 
@@ -313,17 +313,17 @@ background-position: 0px 2px;
313
313
 
314
314
  #primarycontent .post .footer ul li.printerfriendly
315
315
  {
316
- background-image: url('/images/a41.gif');
316
+ background-image: url(<%= asset_path 'a41.gif' %>);
317
317
  }
318
318
 
319
319
  #primarycontent .post .footer ul li.comments
320
320
  {
321
- background-image: url('/images/a36.gif');
321
+ background-image: url(<%= asset_path 'a36.gif' %>);
322
322
  }
323
323
 
324
324
  #primarycontent .post .footer ul li.readmore
325
325
  {
326
- background-image: url('/images/a38.gif');
326
+ background-image: url(<%= asset_path 'a38.gif' %>);
327
327
  }
328
328
 
329
329
  #footer
@@ -333,7 +333,7 @@ clear: both;
333
333
  height: 66px;
334
334
  text-align: center;
335
335
  line-height: 66px;
336
- background-image: url('/images/a50.gif');
336
+ background-image: url(<%= asset_path 'a50.gif' %>);
337
337
  color: #A8A88D;
338
338
  }
339
339
 
@@ -0,0 +1,6 @@
1
+ class Admin::DashboardController < ApplicationController
2
+ layout 'backoffice'
3
+
4
+ def index
5
+ end
6
+ end
@@ -0,0 +1 @@
1
+ Another Backoffice section