refinerycms 0.9.6.21 → 0.9.6.22
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/config/application.rb +3 -3
- data/config/environments/development.rb +1 -1
- data/db/seeds.rb +25 -12
- data/readme.md +3 -5
- data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_form_actions.html.erb +2 -2
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +10 -2
- data/vendor/plugins/refinery_settings/app/models/refinery_setting.rb +1 -1
- data/vendor/plugins/themes/{app/models → lib}/theme.rb +1 -1
- data/vendor/plugins/themes/lib/theme_server.rb +2 -4
- data/vendor/plugins/themes/rails/init.rb +25 -29
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.6.
|
1
|
+
0.9.6.22
|
data/config/application.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
|
3
3
|
|
4
4
|
# Specified gem version of Refinery to use when vendor/plugins/refinery/lib/refinery.rb is not present.
|
5
|
-
REFINERY_GEM_VERSION = '0.9.6.
|
5
|
+
REFINERY_GEM_VERSION = '0.9.6.22' unless defined? REFINERY_GEM_VERSION
|
6
6
|
|
7
7
|
# Boot Rails
|
8
8
|
require File.join(File.dirname(__FILE__), 'boot')
|
@@ -24,8 +24,8 @@ Refinery::Initializer.run do |config|
|
|
24
24
|
:secret => 'eec8fffc3637c05895f8e6a355179eaad0003ac5617e5368955baf7989e1faca4d8ab37140d690c20b05d5815609b7c680c644277b6a892be316a85c6596d75c'
|
25
25
|
}
|
26
26
|
|
27
|
-
# Specify your application's gem requirements here. See the
|
28
|
-
config.gem "refinerycms-news", :lib => "news", :version => "~> 0.9.7"
|
27
|
+
# Specify your application's gem requirements here. See the examples below:
|
28
|
+
# config.gem "refinerycms-news", :lib => "news", :version => "~> 0.9.7"
|
29
29
|
# config.gem "refinerycms-portfolio", :lib => "portfolio", :version => "~> 0.9.3.8"
|
30
30
|
end
|
31
31
|
|
data/db/seeds.rb
CHANGED
@@ -7,14 +7,13 @@
|
|
7
7
|
{:name => "image_thumbnails", :value => {
|
8
8
|
:dialog_thumb => 'c106x106',
|
9
9
|
:grid => 'c135x135',
|
10
|
-
:thumb => '50x50
|
11
|
-
:medium => '225x255
|
12
|
-
:side_body => '300x500
|
10
|
+
:thumb => '50x50',
|
11
|
+
:medium => '225x255',
|
12
|
+
:side_body => '300x500',
|
13
13
|
:preview => 'c96x96'
|
14
14
|
}
|
15
15
|
}].each do |setting|
|
16
|
-
RefinerySetting
|
17
|
-
RefinerySetting.find_by_name(setting[:name].to_s).update_attributes({:destroyable => false})
|
16
|
+
RefinerySetting.create(:name => setting[:name].to_s, :value => setting[:value], :destroyable => false)
|
18
17
|
end
|
19
18
|
|
20
19
|
InquirySetting.create(:name => "Confirmation Body", :value => "Thank you for your inquiry %name%,\n\nThis email is a receipt to confirm we have received your inquiry and we'll be in touch shortly.\n\nThanks.", :destroyable => false)
|
@@ -46,11 +45,25 @@ Page.create(:title => "About Us",
|
|
46
45
|
:body => "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus fringilla nisi a elit. Duis ultricies orci ut arcu. Ut ac nibh. Duis blandit rhoncus magna. Pellentesque semper risus ut magna. Etiam pulvinar tellus eget diam. Morbi blandit. Donec pulvinar mauris at ligula. Sed pellentesque, ipsum id congue molestie, lectus risus egestas pede, ac viverra diam lacus ac urna. Aenean elit.</p>"
|
47
46
|
})
|
48
47
|
|
48
|
+
Page.create(:title => "News",
|
49
|
+
:link_url => "/news",
|
50
|
+
:menu_match => "^/news.*$",
|
51
|
+
:deletable => false,
|
52
|
+
:position => 3).parts.create(
|
53
|
+
{
|
54
|
+
:title => "body",
|
55
|
+
:body => "<p>Want to know the latest? Here's what has been happening.</p>"
|
56
|
+
}).page.parts.create(
|
57
|
+
{
|
58
|
+
:title => "Side Body",
|
59
|
+
:body => "<p>Here we post up the latest about us, along with events and updates you don't want to miss!</p>"
|
60
|
+
})
|
61
|
+
|
49
62
|
Page.create(:title => "Contact Us",
|
50
63
|
:link_url => "/inquiries/new",
|
51
64
|
:menu_match => "^/inquiries.*$",
|
52
65
|
:deletable => false,
|
53
|
-
:position =>
|
66
|
+
:position => 4).parts.create(
|
54
67
|
{
|
55
68
|
:title => "Body",
|
56
69
|
:body => "<p>Get in touch with us. Just use the form below and we'll get back to you as soon as we can.</p>"
|
@@ -65,7 +78,7 @@ Page.create(:title => "Thank You",
|
|
65
78
|
:show_in_menu => false,
|
66
79
|
:deletable => false,
|
67
80
|
:position => 0,
|
68
|
-
:parent_id =>
|
81
|
+
:parent_id => 4).parts.create(
|
69
82
|
{
|
70
83
|
:title => "Body",
|
71
84
|
:body => "<p>We've received your inquiry and will get back to you with a response shortly.</p><p><a href='/'>Return to the home page</a></p>"
|
@@ -75,7 +88,7 @@ Page.create(:title => "Page not found",
|
|
75
88
|
:menu_match => "^/404$",
|
76
89
|
:show_in_menu => false,
|
77
90
|
:deletable => false,
|
78
|
-
:position =>
|
91
|
+
:position => 5).parts.create(
|
79
92
|
{
|
80
93
|
:title => "Body",
|
81
94
|
:body => "<h2>Sorry, there was a problem...</h2><p>The page you requested was not found.</p><p><a href='/'>Return to the home page</a></p>"
|
@@ -84,10 +97,10 @@ Page.create(:title => "Page not found",
|
|
84
97
|
Page.create(:title => "Privacy Policy",
|
85
98
|
:deletable => true,
|
86
99
|
:show_in_menu => false,
|
87
|
-
:position =>
|
100
|
+
:position => 6).parts.create(
|
88
101
|
{
|
89
102
|
:title => "Body",
|
90
|
-
:body => "<p>We respect your privacy. We do not market, rent or sell our email list to any outside parties.</p><p>We need your e-mail address so that we can ensure that the people using our forms are bona fide. It also allows us to send you e-mail newsletters and other communications, if you opt-in. Your postal address is required in order to send you information and pricing, if you request it.</p><p>Please call us at 123 456 7890 if you have any questions or concerns.</p>"
|
103
|
+
:body => "<p><strong>We respect your privacy. We do not market, rent or sell our email list to any outside parties.</p><p>We need your e-mail address so that we can ensure that the people using our forms are bona fide. It also allows us to send you e-mail newsletters and other communications, if you opt-in. Your postal address is required in order to send you information and pricing, if you request it.</p><p>Please call us at 123 456 7890 if you have any questions or concerns.</p>"
|
91
104
|
}).page.parts.create(
|
92
105
|
{
|
93
106
|
:title => "Side Body",
|
@@ -97,11 +110,11 @@ Page.create(:title => "Privacy Policy",
|
|
97
110
|
Page.create(:title => "Down for maintenance",
|
98
111
|
:menu_match => "^/maintenance$",
|
99
112
|
:show_in_menu => false,
|
100
|
-
:position =>
|
113
|
+
:position => 7).parts.create(
|
101
114
|
{
|
102
115
|
:title => "Body",
|
103
116
|
:body => "<p>Our site is currently down for maintenance. Please try back later.</p>"
|
104
117
|
})
|
105
118
|
|
106
119
|
# Create a default themes directory.
|
107
|
-
Rails.root.join("themes").mkdir unless Rails.root.join("themes").directory?
|
120
|
+
Rails.root.join("themes").mkdir unless Rails.root.join("themes").directory?
|
data/readme.md
CHANGED
@@ -65,12 +65,10 @@ After your database exists, you'll need to install the gems that Refinery depend
|
|
65
65
|
|
66
66
|
rake gems:install
|
67
67
|
|
68
|
-
As of version 0.9.6.
|
69
|
-
|
70
|
-
If you do want it, please run the following commands to get it up and running:
|
68
|
+
As of version 0.9.6.22, the news engine was extracted into a separate gem.
|
69
|
+
This is found here:
|
71
70
|
|
72
|
-
|
73
|
-
rake db:migrate
|
71
|
+
http://github.com/resolve/refinerycms-news
|
74
72
|
|
75
73
|
Now, news should be up and running.
|
76
74
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div class='form-actions'>
|
2
|
-
<%= f.submit 'Save', :id => "#{submit_button_id ||= "submit_button"}", :class => "wymupdate" -%>
|
2
|
+
<%= f.submit "#{submit_button_text ||= 'Save'}", :id => "#{submit_button_id ||= "submit_button"}", :class => "wymupdate" -%>
|
3
3
|
<% if (continue_editing ||= false and !f.object.new_record?) -%>
|
4
4
|
or
|
5
5
|
<%= render :partial => "/shared/admin/continue_editing", :locals => {:f => f} -%>
|
6
6
|
<% end -%>
|
7
7
|
<% unless (hide_cancel ||= from_dialog?) -%>
|
8
8
|
or
|
9
|
-
<%= link_to "Cancel",
|
9
|
+
<%= link_to "#{cancel_button_text ||= 'Cancel'}",
|
10
10
|
(cancel_url ||= ((back=url_for(:back)).include?('javascript') ? send("admin_#{f.object.class.name.pluralize.underscore}_url") : back)),
|
11
11
|
:title => (title ||= "Cancelling will lose all changes you've made to this #{f.object.class.name.underscore.gsub("_", " ")}"),
|
12
12
|
:id => "#{cancel_button_id ||= "cancel_button"}",
|
@@ -22,10 +22,18 @@ module Refinery
|
|
22
22
|
super
|
23
23
|
|
24
24
|
# add plugin lib paths to the $LOAD_PATH so that rake tasks etc. can be run when using a gem for refinery or gems for plugins.
|
25
|
-
search_for = Regexp.new(
|
26
|
-
|
25
|
+
search_for = Regexp.new(Refinery.root.join("vendor", "plugins", ".+?", "lib"))
|
26
|
+
|
27
|
+
# find all the plugin paths
|
28
|
+
paths = plugins.collect{ |plugin| plugin.load_paths }.flatten
|
29
|
+
|
30
|
+
# just use lib paths from Refinery engines
|
31
|
+
paths = paths.reject{|path| path.scan(search_for).empty? or path.include?('/rails-') }
|
32
|
+
|
33
|
+
# reject Refinery lib paths if they're already included in this app.
|
27
34
|
paths = paths.reject{ |path| path.include?(Refinery.root.to_s) } unless Refinery.is_a_gem
|
28
35
|
paths.uniq!
|
36
|
+
|
29
37
|
($refinery_gem_plugin_lib_paths = paths).each do |path|
|
30
38
|
$LOAD_PATH.unshift path
|
31
39
|
end
|
@@ -9,9 +9,7 @@ class ThemeServer
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def call(env)
|
12
|
-
theme = Theme.current_theme(env)
|
13
|
-
|
14
|
-
if env["PATH_INFO"] =~ /^\/theme/
|
12
|
+
if env["PATH_INFO"] =~ /^\/theme/ and (theme = Theme.current_theme(env)).present?
|
15
13
|
env["PATH_INFO"].gsub!(/^\/theme\//, '')
|
16
14
|
if (file_path = (dir = Rails.root.join("themes", theme)).join(env["PATH_INFO"])).exist?
|
17
15
|
etag = Digest::MD5.hexdigest("#{file_path.to_s}#{file_path.mtime}")
|
@@ -29,4 +27,4 @@ class ThemeServer
|
|
29
27
|
end
|
30
28
|
end
|
31
29
|
|
32
|
-
end
|
30
|
+
end
|
@@ -1,35 +1,31 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
#
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
controller.view_paths.select{|p| p.to_s =~ /^app\/views/}.each do |app_path|
|
22
|
-
controller.view_paths.unshift app_path
|
23
|
-
end
|
1
|
+
# Set up middleware to serve theme files
|
2
|
+
config.middleware.use "ThemeServer"
|
3
|
+
|
4
|
+
::Refinery::ApplicationController.module_eval do
|
5
|
+
|
6
|
+
# Add or remove theme paths to/from Refinery application
|
7
|
+
before_filter do |controller|
|
8
|
+
# remove any paths relating to any theme.
|
9
|
+
controller.view_paths.reject! { |v| v.to_s =~ %r{^themes/} }
|
10
|
+
|
11
|
+
# add back theme paths if there is a theme present.
|
12
|
+
if (theme = Theme.current_theme(controller.request.env)).present?
|
13
|
+
# Set up view path again for the current theme.
|
14
|
+
controller.view_paths.unshift Rails.root.join("themes", theme, "views").to_s
|
15
|
+
|
16
|
+
# Ensure that routes within the application are top priority.
|
17
|
+
# Here we grab all the routes that are under the application's view folder
|
18
|
+
# and promote them ahead of any other path.
|
19
|
+
controller.view_paths.select{|p| p.to_s =~ /^app\/views/}.each do |app_path|
|
20
|
+
controller.view_paths.unshift app_path
|
24
21
|
end
|
25
|
-
|
26
|
-
# Set up menu caching for this theme or lack thereof
|
27
|
-
RefinerySetting[:refinery_menu_cache_action_suffix] = "#{"#{theme}_" if theme.present?}site_menu"
|
28
22
|
end
|
29
23
|
|
24
|
+
# Set up menu caching for this theme or lack thereof
|
25
|
+
RefinerySetting[:refinery_menu_cache_action_suffix] = "#{"#{theme}_" if theme.present?}site_menu" if RefinerySetting.table_exists?
|
30
26
|
end
|
31
27
|
|
32
|
-
# Include theme functions into application helper.
|
33
|
-
Refinery::ApplicationHelper.send :include, ThemesHelper
|
34
|
-
|
35
28
|
end
|
29
|
+
|
30
|
+
# Include theme functions into application helper.
|
31
|
+
Refinery::ApplicationHelper.send :include, ThemesHelper
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 9
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.9.6.
|
9
|
+
- 22
|
10
|
+
version: 0.9.6.22
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Resolve Digital
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-03-
|
20
|
+
date: 2010-03-27 00:00:00 +13:00
|
21
21
|
default_executable:
|
22
22
|
dependencies: []
|
23
23
|
|
@@ -804,7 +804,7 @@ files:
|
|
804
804
|
- vendor/plugins/slim_scrooge/test/schema/schema.rb
|
805
805
|
- vendor/plugins/slim_scrooge/test/setup.rb
|
806
806
|
- vendor/plugins/themes/app/helpers/themes_helper.rb
|
807
|
-
- vendor/plugins/themes/
|
807
|
+
- vendor/plugins/themes/lib/theme.rb
|
808
808
|
- vendor/plugins/themes/lib/theme_server.rb
|
809
809
|
- vendor/plugins/themes/rails/init.rb
|
810
810
|
- vendor/plugins/themes/themes.md
|