caboose-cms 0.8.74 → 0.8.75
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21b91fa667e8f15c2e468aad28553f330944ff2c
|
4
|
+
data.tar.gz: b577889b8ba1893c832007dd37b31b20cb83defa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 716cdc6c7fa6bac30618f7a26f5323beec3b2a20829075e76e3a734663cd394e1104d7134329039a9d257c61b4da1416bed0f7c8fcf90861e328a6c0980c4a72
|
7
|
+
data.tar.gz: 46af5b356eb4d70b41b19f81b7881cb6a58fc2329634dbc4e091eb8d389bbe65b854af9c79b4c89e0ee1d287b7e3cec8f50d22dd0fe7723913c47800d77b330e
|
@@ -125,6 +125,9 @@ CheckoutController.prototype = {
|
|
125
125
|
print: function(confirm)
|
126
126
|
{
|
127
127
|
var that = this;
|
128
|
+
|
129
|
+
$(document).trigger('checkout_controller_before_print', that);
|
130
|
+
|
128
131
|
var div = $('<div/>').append($('<h2/>').html(confirm ? 'Confirm Order' : 'Checkout'));
|
129
132
|
if (that.allow_instore_pickup)
|
130
133
|
div.append($('<div/>').attr('id', 'invoice_1_instore_pickup' ));
|
@@ -178,6 +181,8 @@ CheckoutController.prototype = {
|
|
178
181
|
that.cart_controller.print();
|
179
182
|
that.print_ready_message();
|
180
183
|
}
|
184
|
+
|
185
|
+
$(document).trigger('checkout_controller_after_print', that);
|
181
186
|
},
|
182
187
|
|
183
188
|
print_ready_message: function()
|
@@ -0,0 +1,148 @@
|
|
1
|
+
#
|
2
|
+
#module Caboose
|
3
|
+
# class UserSubscriptionsController < ApplicationController
|
4
|
+
#
|
5
|
+
# #===========================================================================
|
6
|
+
# # Admin actions
|
7
|
+
# #===========================================================================
|
8
|
+
#
|
9
|
+
# # @route GET /admin/users/:user_id/subscriptions
|
10
|
+
# def admin_index
|
11
|
+
# return if !user_is_allowed('usersubscriptions', 'view')
|
12
|
+
# render :layout => 'caboose/admin'
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# # @route GET /admin/users/:user_id/subscriptions/json
|
16
|
+
# def admin_json
|
17
|
+
# return if !user_is_allowed('usersubscriptions', 'view')
|
18
|
+
#
|
19
|
+
# pager = PageBarGenerator.new(params, {
|
20
|
+
# 'subscription_id' => '',
|
21
|
+
# 'user_id' => params[:user_id],
|
22
|
+
# 'date_started_gte' => '',
|
23
|
+
# 'date_started_lte' => '',
|
24
|
+
# 'date_started_full_gte' => '',
|
25
|
+
# 'date_started_full_lte' => '',
|
26
|
+
# 'status' => ''
|
27
|
+
# },{
|
28
|
+
# 'model' => 'Caboose::UserSubscription',
|
29
|
+
# 'sort' => 'date_started',
|
30
|
+
# 'desc' => false,
|
31
|
+
# 'base_url' => "/admin/users/#{params[:user_id]}/subscriptions",
|
32
|
+
# 'use_url_params' => false
|
33
|
+
# })
|
34
|
+
# render :json => {
|
35
|
+
# :pager => pager,
|
36
|
+
# :models => pager.items
|
37
|
+
# }
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# # @route GET /admin/users/:user_id/subscriptions/:id
|
41
|
+
# def admin_edit
|
42
|
+
# return if !user_is_allowed('usersubscriptions', 'edit')
|
43
|
+
# @user_subscription = UserSubscription.find(params[:id])
|
44
|
+
# render :layout => 'caboose/admin'
|
45
|
+
# end
|
46
|
+
#
|
47
|
+
# # @route GET /admin/users/:user_id/subscriptions/:id/json
|
48
|
+
# def admin_json_single
|
49
|
+
# return if !user_is_allowed('usersubscriptions', 'view')
|
50
|
+
# us = UserSubscription.find(params[:id])
|
51
|
+
# render :json => us
|
52
|
+
# end
|
53
|
+
#
|
54
|
+
# # @route POST /admin/users/:user_id/subscriptions
|
55
|
+
# def admin_add
|
56
|
+
# return unless user_is_allowed('usersubscriptions', 'add')
|
57
|
+
#
|
58
|
+
# resp = Caboose::StdClass.new
|
59
|
+
# s = params[:subscription_id] ? Subscription.where(:id => params[:subscription_id]).first : nil
|
60
|
+
#
|
61
|
+
# if subscription_id.nil? || s.nil? || s.site_id != @site.id
|
62
|
+
# resp.error = "A valid subscription is required."
|
63
|
+
# else
|
64
|
+
# us = UserSubscription.create(
|
65
|
+
# :subscription_id => s.id,
|
66
|
+
# :user_id => params[:user_id],
|
67
|
+
# :date_started => Date.today,
|
68
|
+
# :date_started_full => Date.today,
|
69
|
+
# :status => UserSubcription::STATUS_ACTIVE
|
70
|
+
# )
|
71
|
+
# resp.redirect = "/admin/users/#{params[:user_id]}/subscriptions/#{us.id}"
|
72
|
+
# resp.success = true
|
73
|
+
# end
|
74
|
+
# render :json => resp
|
75
|
+
# end
|
76
|
+
#
|
77
|
+
# # @route PUT /admin/users/:user_id/subscriptions/:id
|
78
|
+
# def admin_update
|
79
|
+
# return unless user_is_allowed('usersubscriptions', 'edit')
|
80
|
+
#
|
81
|
+
# resp = StdClass.new
|
82
|
+
# models = params[:id] == 'bulk' ? params[:model_ids].collect{ |model_id| UserSubscription.find(model_id) } : [UserSubscription.find(params[:id])]
|
83
|
+
#
|
84
|
+
# params.each do |k, v|
|
85
|
+
# case k
|
86
|
+
# when 'subscription_id' then models.each{ |us| us.subscription_id = v }
|
87
|
+
# when 'user_id' then models.each{ |us| us.user_id = v }
|
88
|
+
# when 'date_started' then models.each{ |us| us.date_started = v }
|
89
|
+
# when 'date_started_full' then models.each{ |us| us.date_started_full = v }
|
90
|
+
# when 'status' then models.each{ |us| us.status = v }
|
91
|
+
# end
|
92
|
+
# end
|
93
|
+
# models.each{ |us| us.save }
|
94
|
+
# resp.success = true
|
95
|
+
# render :json => resp
|
96
|
+
# end
|
97
|
+
#
|
98
|
+
# # @route DELETE /admin/users/:user_id/subscriptions/:id
|
99
|
+
# def admin_delete
|
100
|
+
# return unless user_is_allowed('usersubscriptions', 'delete')
|
101
|
+
#
|
102
|
+
# model_ids = params[:id] == 'bulk' ? params[:model_ids] : [params[:id]]
|
103
|
+
# model_ids.each do |model_id|
|
104
|
+
# UserSubscription.where(:id => model_id).destroy_all
|
105
|
+
# end
|
106
|
+
#
|
107
|
+
# render :json => { :sucess => true }
|
108
|
+
# end
|
109
|
+
#
|
110
|
+
# # @route_priority 1
|
111
|
+
# # @route GET /admin/user-subscriptions/:field-options
|
112
|
+
# # @route GET /admin/users/:user_id/subscriptions/:field-options
|
113
|
+
# def admin_options
|
114
|
+
# if !user_is_allowed('subscriptions', 'edit')
|
115
|
+
# render :json => false
|
116
|
+
# return
|
117
|
+
# end
|
118
|
+
#
|
119
|
+
# options = []
|
120
|
+
## case params[:field]
|
121
|
+
## when 'subscription'
|
122
|
+
## options = Subcription.where(:site_id => @site.id).reorder(:name).
|
123
|
+
## :status
|
124
|
+
##
|
125
|
+
## STATUS_ACTIVE = 'active'
|
126
|
+
## STATUS_INACTIVE = 'inactive'
|
127
|
+
##
|
128
|
+
## when 'interval'
|
129
|
+
## options = [
|
130
|
+
## { 'value' => Subscription::INTERVAL_MONTHLY , 'text' => 'Monthly' },
|
131
|
+
## { 'value' => Subscription::INTERVAL_YEARLY , 'text' => 'Yearly' }
|
132
|
+
## ]
|
133
|
+
## when 'prorate-method'
|
134
|
+
## options = [
|
135
|
+
## { 'value' => Subscription::PRORATE_METHOD_FLAT , 'text' => 'Flat Amount' },
|
136
|
+
## { 'value' => Subscription::PRORATE_METHOD_PERCENTAGE , 'text' => 'Percentage of Interval' },
|
137
|
+
## { 'value' => Subscription::PRORATE_METHOD_CUSTOM , 'text' => 'Custom' }
|
138
|
+
## ]
|
139
|
+
## when 'start-day'
|
140
|
+
## options = (1..31).collect{ |i| { 'value' => i, 'text' => i }}
|
141
|
+
## when 'start-month'
|
142
|
+
## options = (1..12).collect{ |i| { 'value' => i, 'text' => Date.new(2000, i, 1).strftime('%B') }}
|
143
|
+
## end
|
144
|
+
# render :json => options
|
145
|
+
# end
|
146
|
+
#
|
147
|
+
# end
|
148
|
+
#end
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
@@ -811,6 +811,7 @@ files:
|
|
811
811
|
- app/controllers/caboose/station_controller.rb
|
812
812
|
- app/controllers/caboose/store_controller.rb
|
813
813
|
- app/controllers/caboose/subscriptions_controller.rb
|
814
|
+
- app/controllers/caboose/user_subscriptions_controller.rb
|
814
815
|
- app/controllers/caboose/users_controller.rb
|
815
816
|
- app/controllers/caboose/variant_children_controller.rb
|
816
817
|
- app/controllers/caboose/variants_controller.rb
|