browsercms 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/helpers/cms/menu_helper.rb +6 -6
- data/app/views/cms/blocks/index.html.erb +2 -2
- data/bin/bcms +34 -6
- data/db/seeds.rb +1 -1
- data/lib/cms/version.rb +1 -1
- metadata +34 -40
@@ -133,16 +133,16 @@ module Cms
|
|
133
133
|
item[:id] = "#{section_node.node_type.underscore}_#{section_node.node_id}"
|
134
134
|
|
135
135
|
# If we are showing a section item, we want to use the path for the first page
|
136
|
-
|
137
|
-
if section_node.section? &&
|
138
|
-
item[:selected] = true if
|
136
|
+
page_or_link = section_node.section? ? node.first_page_or_link : node
|
137
|
+
if section_node.section? && page_or_link
|
138
|
+
item[:selected] = true if page_or_link.respond_to?(:hidden?) && page_or_link.hidden? && selected_page == page_or_link
|
139
139
|
else
|
140
|
-
item[:selected] = true if selected_page ==
|
140
|
+
item[:selected] = true if selected_page == page_or_link
|
141
141
|
end
|
142
142
|
|
143
|
-
item[:url] =
|
143
|
+
item[:url] = page_or_link.try(:path) || '#'
|
144
144
|
item[:name] = node.name
|
145
|
-
item[:target] = "_blank" if
|
145
|
+
item[:target] = "_blank" if page_or_link.respond_to?(:new_window?) && page_or_link.new_window?
|
146
146
|
|
147
147
|
# Now if this is a section, we do the child nodes,
|
148
148
|
# but only if the show_all_siblings parameter is true,
|
@@ -60,9 +60,9 @@
|
|
60
60
|
!content_type.model_class.connectable? &&
|
61
61
|
!content_type.model_class.publishable? &&
|
62
62
|
content_type.columns_for_index.size == i + 1
|
63
|
-
%Q{ colspan=
|
63
|
+
%Q{ colspan='2' class='last'}
|
64
64
|
elsif i == 0
|
65
|
-
%Q{ colspan=
|
65
|
+
%Q{ colspan='2' class='name first'}
|
66
66
|
end %>
|
67
67
|
<th<%= attrs %>>
|
68
68
|
<div class="dividers">
|
data/bin/bcms
CHANGED
@@ -95,16 +95,45 @@ class App < Thor
|
|
95
95
|
route "routes_for_browser_cms"
|
96
96
|
|
97
97
|
generate "browser_cms:cms"
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
|
99
|
+
%w{development test production}.each do |env|
|
100
|
+
prepend_to_file "config/environments/#{env}.rb" do
|
101
|
+
<<-CODE
|
102
|
+
SITE_DOMAIN="localhost:3000"
|
103
|
+
CODE
|
104
|
+
end
|
105
|
+
end
|
101
106
|
|
102
107
|
insert_into_file "config/environments/production.rb", :after => "Application.configure do\n" do
|
103
108
|
<<-CODE
|
104
|
-
config.
|
105
|
-
|
109
|
+
config.action_controller.page_cache_directory = File.join(Rails.root, 'public', 'cache')
|
110
|
+
CODE
|
111
|
+
end
|
112
|
+
|
113
|
+
insert_into_file "config/environments/production.rb", :before => 'config.action_dispatch.x_sendfile_header = "X-Sendfile"' do
|
114
|
+
<<-CODE
|
115
|
+
# If you want to enable webservers to send binary files, you will need to uncomment X-Sendfile line below and configure Apache mod_sendfile
|
116
|
+
# See http://codequest.eu/articles/rails3-apache-passenger-and-empty-file-using-send-file for details
|
106
117
|
CODE
|
107
118
|
end
|
119
|
+
|
120
|
+
gsub_file "config/environments/production.rb", /(config\.action_dispatch\.x_sendfile_header = "X-Sendfile")/, ' # \1'
|
121
|
+
|
122
|
+
insert_into_file "config/environments/production.rb", :before => 'config.serve_static_assets = false' do
|
123
|
+
<<-COMMENT
|
124
|
+
# This allows bcms to serve static assets (like admin css files) from the gem
|
125
|
+
COMMENT
|
126
|
+
end
|
127
|
+
|
128
|
+
gsub_file "config/environments/production.rb", /(config\.serve_static_assets =) false/, ' \1 true'
|
129
|
+
|
130
|
+
insert_into_file "config/environments/production.rb", :after => "config.active_support.deprecation = :notify" do
|
131
|
+
%q{
|
132
|
+
|
133
|
+
# Configure your mail server's address below
|
134
|
+
config.action_mailer.smtp_settings = {:address => 'mail.yourmailserver.com', :domain => "#{SITE_DOMAIN}"}}
|
135
|
+
end
|
136
|
+
|
108
137
|
initializer 'browsercms.rb', <<-CODE
|
109
138
|
Cms.attachment_file_permission = 0640
|
110
139
|
CODE
|
@@ -114,4 +143,3 @@ Cms.attachment_file_permission = 0640
|
|
114
143
|
end
|
115
144
|
|
116
145
|
App.start
|
117
|
-
|
data/db/seeds.rb
CHANGED
@@ -4,7 +4,7 @@ extend Cms::DataLoader
|
|
4
4
|
if %w[development test dev local].include?(Rails.env)
|
5
5
|
pwd = "cmsadmin"
|
6
6
|
else
|
7
|
-
pwd = (0..8).inject(""){|s,i| s << (('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a).
|
7
|
+
pwd = (0..8).inject(""){|s,i| s << (('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a).sample}
|
8
8
|
end
|
9
9
|
User.current = create_user(:cmsadmin, :login => "cmsadmin", :first_name => "CMS", :last_name => "Administrator", :email => "cmsadmin@example.com", :password => pwd, :password_confirmation => pwd)
|
10
10
|
|
data/lib/cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,51 +1,49 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: browsercms
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.3.2
|
4
5
|
prerelease:
|
5
|
-
version: 3.3.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- BrowserMedia
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-03-15 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
|
-
requirement: &
|
16
|
+
requirement: &2158453140 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
18
|
+
requirements:
|
20
19
|
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
20
|
+
- !ruby/object:Gem::Version
|
22
21
|
version: 3.0.7
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
26
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *2158453140
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: term-ansicolor
|
28
|
-
requirement: &
|
27
|
+
requirement: &2158452760 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *2158452760
|
37
36
|
description: Web Content Management in Rails.
|
38
37
|
email: github@browsermedia.com
|
39
|
-
executables:
|
38
|
+
executables:
|
40
39
|
- browsercms
|
41
40
|
- bcms
|
42
41
|
- bcms-upgrade
|
43
42
|
extensions: []
|
44
|
-
|
45
|
-
extra_rdoc_files:
|
43
|
+
extra_rdoc_files:
|
46
44
|
- LICENSE.txt
|
47
45
|
- README.markdown
|
48
|
-
files:
|
46
|
+
files:
|
49
47
|
- rails/init.rb
|
50
48
|
- bin/browsercms
|
51
49
|
- bin/bcms
|
@@ -1332,31 +1330,27 @@ files:
|
|
1332
1330
|
- public/themes/blue_steel/stylesheets/style.css
|
1333
1331
|
homepage:
|
1334
1332
|
licenses: []
|
1335
|
-
|
1336
1333
|
post_install_message:
|
1337
1334
|
rdoc_options: []
|
1338
|
-
|
1339
|
-
require_paths:
|
1335
|
+
require_paths:
|
1340
1336
|
- lib
|
1341
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
1337
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
1342
1338
|
none: false
|
1343
|
-
requirements:
|
1344
|
-
- -
|
1345
|
-
- !ruby/object:Gem::Version
|
1339
|
+
requirements:
|
1340
|
+
- - ! '>='
|
1341
|
+
- !ruby/object:Gem::Version
|
1346
1342
|
version: 1.9.2
|
1347
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
1343
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
1348
1344
|
none: false
|
1349
|
-
requirements:
|
1350
|
-
- -
|
1351
|
-
- !ruby/object:Gem::Version
|
1352
|
-
version:
|
1345
|
+
requirements:
|
1346
|
+
- - ! '>='
|
1347
|
+
- !ruby/object:Gem::Version
|
1348
|
+
version: '0'
|
1353
1349
|
requirements: []
|
1354
|
-
|
1355
1350
|
rubyforge_project:
|
1356
|
-
rubygems_version: 1.
|
1351
|
+
rubygems_version: 1.8.10
|
1357
1352
|
signing_key:
|
1358
1353
|
specification_version: 3
|
1359
|
-
summary: BrowserCMS is a a general purpose, open source Web Content Management System
|
1354
|
+
summary: BrowserCMS is a a general purpose, open source Web Content Management System
|
1355
|
+
(CMS), written using Ruby on Rails.
|
1360
1356
|
test_files: []
|
1361
|
-
|
1362
|
-
has_rdoc:
|