caboose-cms 0.9.111 → 0.9.112
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 +4 -4
- data/app/controllers/caboose/categories_controller.rb +1 -1
- data/app/controllers/caboose/pages_controller.rb +6 -2
- data/app/controllers/caboose/post_custom_fields_controller.rb +2 -2
- data/app/models/caboose/post_custom_field.rb +1 -0
- data/app/models/caboose/schema.rb +1 -0
- data/app/views/caboose/post_custom_fields/admin_edit.html.erb +4 -2
- data/app/views/caboose/posts/admin_edit_general.html.erb +2 -1
- data/app/views/layouts/caboose/admin.html.erb +2 -0
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a12fe36edfec025f81b19ddff158f17e3797ed9
|
4
|
+
data.tar.gz: 302610679fef38a06838d9f861296112ab09aea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec64cb7eba7a0b11218ca69e3a219b73896252cbd809a7c417097d78249f6ee4ea6afa9cc09a2669bb6c2720f02e03f5c0b49c031c996fad78c646b369538853
|
7
|
+
data.tar.gz: 70bed2976b44ae24c84a287ac8651b3323b188e580c0a53ba0ddb26a5274f4e7c2a02540fa735cfcb41029f9b4ab5967c93430af81b24e66c85246aae18873e7
|
@@ -11,7 +11,7 @@ module Caboose
|
|
11
11
|
|
12
12
|
@top_cat = Caboose::Category.where("site_id = ? and parent_id is null", @site.id).first
|
13
13
|
if @top_cat.nil?
|
14
|
-
@top_cat = Caboose::Category.create(:site_id => @site.id, :name => 'All Products', :url => '/')
|
14
|
+
@top_cat = Caboose::Category.create(:site_id => @site.id, :name => 'All Products', :url => '/products', :slug => 'products', :status => 'Active')
|
15
15
|
end
|
16
16
|
render :layout => 'caboose/admin'
|
17
17
|
end
|
@@ -18,7 +18,7 @@ module Caboose
|
|
18
18
|
def show
|
19
19
|
|
20
20
|
# Find the page with an exact URI match
|
21
|
-
page = Page.page_with_uri(request.host_with_port, request.fullpath, false)
|
21
|
+
page = Page.page_with_uri(request.host_with_port, request.fullpath, false)
|
22
22
|
|
23
23
|
# Make sure we're not under construction or on a forwarded domain
|
24
24
|
d = Caboose::Domain.where(:domain => request.host_with_port).first
|
@@ -43,7 +43,11 @@ module Caboose
|
|
43
43
|
end
|
44
44
|
redirect_to url
|
45
45
|
return
|
46
|
-
end
|
46
|
+
end
|
47
|
+
elsif d.primary == false && !d.forward_to_uri.blank? && request.fullpath == '/'
|
48
|
+
url = "#{request.protocol}#{d.domain}#{d.forward_to_uri}"
|
49
|
+
redirect_to url
|
50
|
+
return
|
47
51
|
end
|
48
52
|
|
49
53
|
if !page
|
@@ -61,7 +61,8 @@ module Caboose
|
|
61
61
|
when 'name' then f.name = value
|
62
62
|
when 'field_type' then f.field_type = value
|
63
63
|
when 'default_value' then f.default_value = value
|
64
|
-
when 'options' then f.options = value
|
64
|
+
when 'options' then f.options = value
|
65
|
+
when 'options_url' then f.options_url = value
|
65
66
|
end
|
66
67
|
end
|
67
68
|
resp.success = save && f.save
|
@@ -93,7 +94,6 @@ module Caboose
|
|
93
94
|
# @route DELETE /admin/post-custom-fields/:id
|
94
95
|
def admin_delete
|
95
96
|
return if !user_is_allowed('postcustomfields', 'edit')
|
96
|
-
|
97
97
|
if params[:id] == 'bulk'
|
98
98
|
params[:model_ids].each do |fid|
|
99
99
|
PostCustomFieldValue.where(:post_custom_field_id => fid).destroy_all
|
@@ -588,6 +588,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
588
588
|
[ :key , :string ],
|
589
589
|
[ :name , :string ],
|
590
590
|
[ :field_type , :string ],
|
591
|
+
[ :options_url , :string ],
|
591
592
|
[ :default_value , :text ],
|
592
593
|
[ :options , :text ],
|
593
594
|
[ :sort_order , :integer , { :default => 0 }]
|
@@ -7,7 +7,8 @@ f = @post_custom_field
|
|
7
7
|
<p><div id='postcustomfield_<%= f.id %>_key' ></div></p>
|
8
8
|
<p><div id='postcustomfield_<%= f.id %>_name' ></div></p>
|
9
9
|
<p><div id='postcustomfield_<%= f.id %>_field_type' ></div></p>
|
10
|
-
<p><div id='postcustomfield_<%= f.id %>_default_value' ></div></p>
|
10
|
+
<p><div id='postcustomfield_<%= f.id %>_default_value' ></div></p>
|
11
|
+
<p><div id='postcustomfield_<%= f.id %>_options_url' ></div></p>
|
11
12
|
<p><div id='postcustomfield_<%= f.id %>_options' ></div></p>
|
12
13
|
|
13
14
|
<div id='message'></div>
|
@@ -30,7 +31,8 @@ $(document).ready(function() {
|
|
30
31
|
{ name: 'key' , nice_name: 'Key' , type: 'text' , value: <%= raw Caboose.json(f.key ) %>, width: 800 },
|
31
32
|
{ name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(f.name ) %>, width: 800 },
|
32
33
|
{ name: 'field_type' , nice_name: 'Type' , type: 'select' , value: <%= raw Caboose.json(f.field_type ) %>, width: 800 , options_url: '/admin/post-custom-fields/field-type-options' },
|
33
|
-
{ name: 'default_value' , nice_name: 'Default Value' , type: 'text' , value: <%= raw Caboose.json(f.default_value ) %>, width: 800 },
|
34
|
+
{ name: 'default_value' , nice_name: 'Default Value' , type: 'text' , value: <%= raw Caboose.json(f.default_value ) %>, width: 800 },
|
35
|
+
{ name: 'options_url' , nice_name: 'Options URL' , type: 'text' , value: <%= raw Caboose.json(f.options_url ) %>, width: 800 },
|
34
36
|
{ name: 'options' , nice_name: 'Options' , type: 'textarea' , value: <%= raw Caboose.json(f.options ) %>, width: 800 , height: 200 }
|
35
37
|
]
|
36
38
|
});
|
@@ -52,7 +52,8 @@ $(document).ready(function() {
|
|
52
52
|
type: <%= raw Caboose.json(f.field_type) %>,
|
53
53
|
value: <%= raw Caboose.json(fv.value) %>,
|
54
54
|
width: 600
|
55
|
-
<% if f.field_type == 'select' %>, options_url: '
|
55
|
+
<% if f.field_type == 'select' && !f.options_url.blank? %>, options_url: '<%= f.options_url %>'<% end %>
|
56
|
+
<% if f.field_type == 'select' && f.options_url.blank? %>, options_url: '/admin/post-custom-fields/<%= f.id %>/options'<% end %>
|
56
57
|
}
|
57
58
|
]
|
58
59
|
});
|
@@ -44,6 +44,8 @@ end
|
|
44
44
|
<head>
|
45
45
|
<meta charset="utf-8" />
|
46
46
|
<title>Caboose Admin</title>
|
47
|
+
<link rel="icon" type="image/png" href="https://cabooseit.s3.amazonaws.com/caboose_32.png" sizes="32x32">
|
48
|
+
<link rel="icon" type="image/png" href="https://cabooseit.s3.amazonaws.com/caboose_16.png" sizes="16x16">
|
47
49
|
<%= raw css %>
|
48
50
|
<%= csrf_meta_tags %>
|
49
51
|
</head>
|
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.9.
|
4
|
+
version: 0.9.112
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|