browsercms 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +5 -3
- data/app/assets/javascripts/cms/attachment_manager.js.erb +2 -0
- data/app/views/cms/form_builder/_cms_attachment_manager.html.erb +1 -0
- data/bin/bcms +5 -1
- data/doc/release_notes.md +7 -0
- data/lib/cms/behaviors/attaching.rb +11 -4
- data/lib/cms/version.rb +1 -1
- metadata +16 -9
data/README.markdown
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BrowserCMS: Humane Content Management for Rails
|
|
2
2
|
|
|
3
|
-
BrowserCMS is a general purpose, open source Web Content Management System (CMS)
|
|
3
|
+
BrowserCMS is a general purpose, open source Web Content Management System (CMS) that supports Ruby on Rails v3.2. It can be used as a standalone CMS, added to existing Rails projects or extended using Rails Engines. It is designed to support three distinct groups of users:
|
|
4
4
|
|
|
5
5
|
1. Non-technical web editors who want a humane system to manage their site, without needing to understand what HTML or even Rails is.
|
|
6
6
|
2. Designers who want to create large and elegantly designed websites with no artificial constraints by the CMS.
|
|
@@ -11,16 +11,18 @@ BrowserCMS is intended to offer features comparable to commercial CMS products,
|
|
|
11
11
|
|
|
12
12
|
Here's a quick overview of some of the more notable features:
|
|
13
13
|
|
|
14
|
-
*
|
|
14
|
+
* Stanealone CMS: BrowserCMS is designed to provide a robust CMS capabilities out of the box for content heavy web sites.
|
|
15
15
|
* Mobile Friendly: Sites can be built to use mobile optimized designs that are optimized for small screens, with low bandwidth, with responsive design.
|
|
16
|
-
* In Context Editing: Users can browse their site to locate content and
|
|
16
|
+
* In Context Editing: Users can browse their site to locate content and make changes from the page itself.
|
|
17
17
|
* Design friendly Templates: Pages aren't just a template and giant single chunk of HTML. Templates can be built to have multiple editable areas, to allow for rich designs that are still easy to manage by non-technical users.
|
|
18
|
+
* Highly Extensible: Developer have access to the full Rails development stack, and can customize their project by adding their own controllers, views as well as CMS content types.
|
|
18
19
|
* Sitemap: An explorer/finder style view of sections and pages in a site allowing users to add and organize pages.
|
|
19
20
|
* Content Library: Provides a standardized 'CRUD' interface to allow users to manage both core and custom content types.
|
|
20
21
|
* Content API: A set of behaviors added to ActiveRecord which allow for versioning, auditing, tagging and other content services provided by the CMS.
|
|
21
22
|
* Section Based Security: Admins can control which users can access specific sections (public users), as well as who can edit which pages (cms users).
|
|
22
23
|
* Workflow: Supports larger website teams where some users can contribute, but not publish. Users can assign work to other publishers to review.
|
|
23
24
|
* Page Caching: Full page caching allows the web server (Apache) to serve HTML statically when they don't change.
|
|
25
|
+
* CMSify your Rails App: BrowserCMS can be added to existing Rails applications to add content management capabilities.
|
|
24
26
|
|
|
25
27
|
## Getting Started
|
|
26
28
|
See the [Getting Started](https://github.com/browsermedia/browsercms/wiki/Getting-Started) guide for instructions on how to install and start a project with BrowserCMS.
|
|
@@ -52,6 +52,7 @@ $(function () {
|
|
|
52
52
|
if ($("#assets_table > table tr:visible").length <= 2) {
|
|
53
53
|
$("#assets_table > table").hide();
|
|
54
54
|
}
|
|
55
|
+
$('#attachments_manager_changed').val(true);
|
|
55
56
|
}, 'script');
|
|
56
57
|
|
|
57
58
|
}
|
|
@@ -71,6 +72,7 @@ $(function () {
|
|
|
71
72
|
|
|
72
73
|
// After an attachment is uploaded, copy the values into the main attachment table.
|
|
73
74
|
$('#asset_add_uploader').load(function () {
|
|
75
|
+
$('#attachments_manager_changed').val(true); // Mark that the list of attachment has changed
|
|
74
76
|
var response = $(this).contents();
|
|
75
77
|
|
|
76
78
|
if (response.find('tr').html()) {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
<%= select_tag :asset_types, options_for_select(asset_types) %>
|
|
13
13
|
</div>
|
|
14
14
|
<%= f.hidden_field :attachment_id_list, :id => "attachment_manager_ids_list" %>
|
|
15
|
+
<%= f.hidden_field :attachments_changed, :id => "attachments_manager_changed" %>
|
|
15
16
|
|
|
16
17
|
<div id="asset_add" class="fields file_fields" style="display:<%= asset_types.size > 1 ? "none" : "block" %>">
|
|
17
18
|
<label for="asset_add">Choose file</label>
|
data/bin/bcms
CHANGED
|
@@ -30,6 +30,10 @@ class Cms::Install < Thor
|
|
|
30
30
|
def self.common_options
|
|
31
31
|
method_option :database, :aliases => "-d", :desc => "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) [Default: sqlite3]"
|
|
32
32
|
method_option :template, :aliases => "-m", :desc => "Path to an application template (can be a filesystem path or URL)"
|
|
33
|
+
option_skip_bundle
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.option_skip_bundle
|
|
33
37
|
method_option :skip_bundle, :aliases => "--skip-bundle", :desc => "Don't run bundle install", :default => false, :type => :boolean
|
|
34
38
|
end
|
|
35
39
|
|
|
@@ -101,7 +105,7 @@ TEXT
|
|
|
101
105
|
end
|
|
102
106
|
|
|
103
107
|
desc 'install', "Adds BrowserCMS to an existing rails application."
|
|
104
|
-
|
|
108
|
+
option_skip_bundle
|
|
105
109
|
def install
|
|
106
110
|
common_setup('.')
|
|
107
111
|
prefix_cms_tables
|
data/doc/release_notes.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
v3.5.1
|
|
2
|
+
======
|
|
3
|
+
|
|
4
|
+
* Test with Rails 3.2.5 release
|
|
5
|
+
* Update gemspec to enforce Rails 3.2.5 or later (which contains a critical security SQL Injection patch)
|
|
6
|
+
* Fix issue with has_attachments (possibly caused by nested_assignment changes in Rails 3.2.5)
|
|
7
|
+
|
|
1
8
|
v3.5.0
|
|
2
9
|
======
|
|
3
10
|
|
|
@@ -74,7 +74,7 @@ module Cms
|
|
|
74
74
|
include InstanceMethods
|
|
75
75
|
|
|
76
76
|
# Allows a block to be associated with a list of uploaded attachments (done via AJAX)
|
|
77
|
-
attr_accessor :attachment_id_list
|
|
77
|
+
attr_accessor :attachment_id_list, :attachments_changed
|
|
78
78
|
|
|
79
79
|
Cms::Attachment.definitions[self.name] = {}
|
|
80
80
|
has_many :attachments, :as => :attachable, :dependent => :destroy, :class_name => 'Cms::Attachment', :autosave => false
|
|
@@ -83,7 +83,7 @@ module Cms
|
|
|
83
83
|
:allow_destroy => true,
|
|
84
84
|
# New attachments must have an uploaded file
|
|
85
85
|
:reject_if => lambda { |a| a[:data].blank? && a[:id].blank? }
|
|
86
|
-
attr_accessible :attachments_attributes, :attachment_id_list
|
|
86
|
+
attr_accessible :attachments_attributes, :attachment_id_list, :attachments_changed
|
|
87
87
|
|
|
88
88
|
validates_associated :attachments
|
|
89
89
|
before_validation :initialize_attachments, :check_for_updated_attachments
|
|
@@ -218,13 +218,19 @@ module Cms
|
|
|
218
218
|
# This ensures that if a change is made to an attachment, that this model is also marked as changed.
|
|
219
219
|
# Otherwise, if the change isn't detected, this record won't save a new version (since updates are rejected if no changes were made)
|
|
220
220
|
def check_for_updated_attachments
|
|
221
|
+
if attachments_changed == "true" || attachments_were_updated?
|
|
222
|
+
changed_attributes['attachments'] = "Uploaded new files"
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
def attachments_were_updated?
|
|
221
227
|
attachments.each do |a|
|
|
222
228
|
if a.changed?
|
|
223
|
-
|
|
229
|
+
return true
|
|
224
230
|
end
|
|
225
231
|
end
|
|
232
|
+
false
|
|
226
233
|
end
|
|
227
|
-
|
|
228
234
|
# Returns a list of all attachments this content type has defined.
|
|
229
235
|
# @return [Array<String>] Names
|
|
230
236
|
def attachment_names
|
|
@@ -309,6 +315,7 @@ module Cms
|
|
|
309
315
|
#
|
|
310
316
|
# ActiveRecord Callback
|
|
311
317
|
def save_associated_attachments
|
|
318
|
+
logger.warn "save_associated_attachments #{attachments}"
|
|
312
319
|
attachments.each do |a|
|
|
313
320
|
a.save if a.changed?
|
|
314
321
|
end
|
data/lib/cms/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: browsercms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.5.
|
|
4
|
+
version: 3.5.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,24 +9,30 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-06-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
|
-
- -
|
|
19
|
+
- - <
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 3.3.0
|
|
22
|
+
- - ! '>='
|
|
20
23
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 3.2.
|
|
24
|
+
version: 3.2.5
|
|
22
25
|
type: :runtime
|
|
23
26
|
prerelease: false
|
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
28
|
none: false
|
|
26
29
|
requirements:
|
|
27
|
-
- -
|
|
30
|
+
- - <
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 3.3.0
|
|
33
|
+
- - ! '>='
|
|
28
34
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 3.2.
|
|
35
|
+
version: 3.2.5
|
|
30
36
|
- !ruby/object:Gem::Dependency
|
|
31
37
|
name: sass-rails
|
|
32
38
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -123,8 +129,9 @@ dependencies:
|
|
|
123
129
|
- - ! '>='
|
|
124
130
|
- !ruby/object:Gem::Version
|
|
125
131
|
version: '0'
|
|
126
|
-
description: BrowserCMS is a
|
|
127
|
-
|
|
132
|
+
description: BrowserCMS is a general purpose, open source Web Content Management System
|
|
133
|
+
(CMS) that supports Ruby on Rails v3.2. It can be used as a standalone CMS, added
|
|
134
|
+
to existing Rails projects or extended using Rails Engines.
|
|
128
135
|
email: github@browsermedia.com
|
|
129
136
|
executables:
|
|
130
137
|
- bcms
|
|
@@ -765,7 +772,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
765
772
|
version: '0'
|
|
766
773
|
segments:
|
|
767
774
|
- 0
|
|
768
|
-
hash:
|
|
775
|
+
hash: -4016751009646854184
|
|
769
776
|
requirements: []
|
|
770
777
|
rubyforge_project:
|
|
771
778
|
rubygems_version: 1.8.24
|