caboose-cms 0.9.111 → 0.9.112

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae975fc6540c5307b60808ec36170f98686042d3
4
- data.tar.gz: 2728f1f27b4cecbc6f24c32ab936dafd3cb64eb3
3
+ metadata.gz: 6a12fe36edfec025f81b19ddff158f17e3797ed9
4
+ data.tar.gz: 302610679fef38a06838d9f861296112ab09aea2
5
5
  SHA512:
6
- metadata.gz: 39c949e9f522d50341c812c8aa5e705c6e46ebd7c1d8648a8dd32ec60505e0114f9a847cbe1a519c4bc3dc1758e6d85cc664177d98d6af56a08a6efaa85bfd41
7
- data.tar.gz: e23da55d239afbc51ca729f30f1386f70b3ddcaa87630b1207ea737c007ee9a8d9f76301cfd316b0dd6d9ff67cadb9fa2bc495e3210eb2700ae2532906a65aac
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
@@ -10,6 +10,7 @@ class Caboose::PostCustomField < ActiveRecord::Base
10
10
  :field_type ,
11
11
  :default_value ,
12
12
  :options ,
13
+ :options_url ,
13
14
  :sort_order
14
15
 
15
16
  FIELD_TYPE_TEXT = 'text'
@@ -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: '/admin/post-custom-fields/<%= f.id %>/options'<% end %>
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>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.111'
2
+ VERSION = '0.9.112'
3
3
  end
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.111
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-01-26 00:00:00.000000000 Z
11
+ date: 2018-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg