caboose-cms 0.4.113 → 0.4.114
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.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjNmNDgyNjU5YjI0ODRkOTdhZTQwZDRiZDUyMDEzMjUyODlhYjIxMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzhmMDRlNzliMzM3M2JlNjg5MjZkNjRiOTA1OGRhMDNmNWUxMzM3ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODg2NjIxZGFjYzdlNDczMDUzNWE0NDFhZDJhYmM5MzI5MWVlNmIwMzhmNmRm
|
10
|
+
MjFlYjc0MmU0NjU4ZTM0NDlkMmEzZTdlMTM3OTdhN2M1OTU0Zjc0ZGRiYjRj
|
11
|
+
ZmQ2MDBiOGM0MWY3NzNlMzFmZmViOTVkZDUyMDFhZGU5MmU0Yjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmU5N2Q2ZGNkMjhmNDBiMjc5ZWZmMDJmYjBkMzY5ZmM5YzNmOWU1MTA5MTE0
|
14
|
+
Mjg0OTU5ODlmMjFiOGFkZWU4YjU3MzVlYmQ4ZDRkNDAwMGIyZTA4YjliMDYz
|
15
|
+
Nzg1MWRhMjQzODYxZTA5NDIzZWVlNTZkZjVhMWU3MDBjN2E1Y2Y=
|
@@ -26,7 +26,8 @@ module Caboose
|
|
26
26
|
return if !user_is_allowed('posts', 'view')
|
27
27
|
|
28
28
|
@gen = Caboose::PageBarGenerator.new(params, {
|
29
|
-
'
|
29
|
+
'site_id' => @site.id,
|
30
|
+
'name' => ''
|
30
31
|
},{
|
31
32
|
'model' => 'Caboose::Post',
|
32
33
|
'sort' => 'created_at DESC',
|
@@ -55,7 +56,11 @@ module Caboose
|
|
55
56
|
def admin_edit_categories
|
56
57
|
return if !user_is_allowed('posts', 'edit')
|
57
58
|
@post = Post.find(params[:id])
|
58
|
-
@categories = PostCategory.reorder(:name).all
|
59
|
+
@categories = PostCategory.where(:site_id => @site.id).reorder(:name).all
|
60
|
+
if @categories.nil? || @categories.count == 0
|
61
|
+
PostCategory.create(:site_id => @site.id, :name => 'General News')
|
62
|
+
@categories = PostCategory.where(:site_id => @site.id).reorder(:name).all
|
63
|
+
end
|
59
64
|
render :layout => 'caboose/admin'
|
60
65
|
end
|
61
66
|
|
@@ -114,6 +119,7 @@ module Caboose
|
|
114
119
|
})
|
115
120
|
|
116
121
|
post = Post.new
|
122
|
+
post.site_id = @site.id
|
117
123
|
post.title = params[:title]
|
118
124
|
post.published = false
|
119
125
|
|
data/app/models/caboose/post.rb
CHANGED
@@ -4,8 +4,10 @@ class Caboose::Post < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
has_many :post_category_memberships
|
6
6
|
has_many :post_categories, :through => :post_category_memberships
|
7
|
-
|
8
|
-
|
7
|
+
belongs_to :site
|
8
|
+
|
9
|
+
attr_accessible :id,
|
10
|
+
:site_id,
|
9
11
|
:category_id,
|
10
12
|
:title,
|
11
13
|
:body,
|
@@ -244,17 +244,19 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
244
244
|
[ :action , :string ]
|
245
245
|
],
|
246
246
|
Caboose::Post => [
|
247
|
+
[ :site_id , :integer ],
|
247
248
|
[ :title , :text ],
|
248
|
-
[ :body , :text
|
249
|
+
[ :body , :text ],
|
249
250
|
[ :hide , :boolean ],
|
250
|
-
[ :image_url , :text
|
251
|
+
[ :image_url , :text ],
|
251
252
|
[ :published , :boolean ],
|
252
253
|
[ :created_at , :datetime ],
|
253
254
|
[ :updated_at , :datetime ],
|
254
255
|
[ :image , :attachment ]
|
255
256
|
],
|
256
257
|
Caboose::PostCategory => [
|
257
|
-
[ :
|
258
|
+
[ :site_id , :integer ],
|
259
|
+
[ :name , :string ]
|
258
260
|
],
|
259
261
|
Caboose::PostCategoryMembership => [
|
260
262
|
[ :post_id , :integer ],
|
data/app/models/caboose/site.rb
CHANGED
@@ -4,6 +4,7 @@ class Caboose::Site < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
has_many :site_memberships, :class_name => 'Caboose::SiteMembership', :dependent => :delete_all
|
6
6
|
has_many :domains, :class_name => 'Caboose::Domain', :dependent => :delete_all
|
7
|
+
has_many :post_categories, :class_name => 'Caboose::PostCategory'
|
7
8
|
attr_accessible :id, :name, :description
|
8
9
|
|
9
10
|
def smtp_config
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.114
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|