caboose-cms 0.6.27 → 0.6.28
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 +8 -8
- data/app/controllers/caboose/calendars_controller.rb +1 -1
- data/app/controllers/caboose/categories_controller.rb +8 -8
- data/app/controllers/caboose/station_controller.rb +1 -1
- data/app/models/caboose/product.rb +6 -0
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjFhYTBlYWY1MTMyOGU5ZjhjNzcyMzQ3MDkwNjZiYTQ5ZjA3N2Q5Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzAwNjA3Y2JmODQwNTg3ZWQyNDFmMTQ3MDhlODExM2JmMjFlYzIyNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjkzMTk0MGE5MjQwMjA4MjllMjJjMDJiMGIyNWFiOTk3NWE4NWI5OGY5Y2Ez
|
10
|
+
YTU4ZGQ1NDZjMTI1MWI5NmJiZmY2NzY2YTY4NWQ0YmY0Y2M4ZGIxOTM5Zjgx
|
11
|
+
NTBkZGNjNWFlOTUzM2ZlYWY1OTE2NmZiMDU0ZDc1ZDhiODdiYjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDRhMDAyODhlM2JlZTQ0Y2ZiMjRmN2EwZDZmZmFmNjM5MGFlODhkYmViOTUw
|
14
|
+
YWE5NzFlMDEzMTk3NTllYjQ1ZThhYzBmZGQwYzQyYTk0Zjg4YzdjNzkyYTM5
|
15
|
+
NmVjMDQ3MDdmMDkxYmNmZmZjODU0NTJkMjc0OTliYzA0ZGVjYzM=
|
@@ -127,16 +127,16 @@ module Caboose
|
|
127
127
|
end
|
128
128
|
|
129
129
|
# GET /admin/categories/status-options
|
130
|
-
def admin_status_options
|
130
|
+
def admin_status_options
|
131
131
|
render :json => [
|
132
132
|
{ :value => 'Active' , :text => 'Active' },
|
133
133
|
{ :value => 'Inactive' , :text => 'Inactive' },
|
134
134
|
{ :value => 'Deleted' , :text => 'Deleted' }
|
135
135
|
]
|
136
136
|
end
|
137
|
-
|
137
|
+
|
138
138
|
# GET /admin/categories/options
|
139
|
-
def admin_options
|
139
|
+
def admin_options
|
140
140
|
@options = []
|
141
141
|
cat = Category.where("site_id = ? and parent_id is null", @site.id).first
|
142
142
|
if cat.nil?
|
@@ -145,25 +145,25 @@ module Caboose
|
|
145
145
|
admin_options_helper(cat, '')
|
146
146
|
render :json => @options
|
147
147
|
end
|
148
|
-
|
148
|
+
|
149
149
|
def admin_options_helper(cat, prefix)
|
150
150
|
@options << { :value => cat.id, :text => "#{prefix}#{cat.name}" }
|
151
151
|
cat.children.each do |c|
|
152
152
|
admin_options_helper(c, "#{prefix} - ")
|
153
153
|
end
|
154
154
|
end
|
155
|
-
|
155
|
+
|
156
156
|
# GET /admin/categories/:category_id/products/json
|
157
|
-
def admin_category_products
|
157
|
+
def admin_category_products
|
158
158
|
query = ["select P.id, P.title from store_category_memberships CM
|
159
159
|
left join store_products P on P.id = CM.product_id
|
160
|
-
where CM.category_id = ?
|
160
|
+
where CM.category_id = ? AND P.status = 'Active'
|
161
161
|
order by CM.sort_order, P.title", params[:id]]
|
162
162
|
rows = ActiveRecord::Base.connection.select_rows(ActiveRecord::Base.send(:sanitize_sql_array, query))
|
163
163
|
arr = rows.collect{ |row| { :id => row[0], :title => row[1] }}
|
164
164
|
render :json => arr
|
165
165
|
end
|
166
|
-
|
166
|
+
|
167
167
|
end
|
168
168
|
end
|
169
169
|
|
@@ -6,7 +6,7 @@ module Caboose
|
|
6
6
|
# GET /station
|
7
7
|
def index
|
8
8
|
@user = logged_in_user
|
9
|
-
page_id = params['page_id'].nil? ?
|
9
|
+
page_id = params['page_id'].nil? ? Page.index_page(@site.id).id : params['page_id']
|
10
10
|
@page = Page.find(page_id)
|
11
11
|
@tab = params['tab']
|
12
12
|
|
data/lib/caboose/version.rb
CHANGED
data/lib/tasks/caboose.rake
CHANGED
@@ -2,6 +2,11 @@ require "caboose/version"
|
|
2
2
|
|
3
3
|
namespace :caboose do
|
4
4
|
|
5
|
+
desc "Update the on sale value for all products and variants"
|
6
|
+
task :update_products_on_sale => :environment do
|
7
|
+
Product.update_on_sale
|
8
|
+
end
|
9
|
+
|
5
10
|
desc "Create media categories for existing products on all sites"
|
6
11
|
task :create_product_media_categories => :environment do
|
7
12
|
sites = Caboose::Site.where(:use_store => true).all.each do |s|
|
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.6.
|
4
|
+
version: 0.6.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|