caboose-cms 0.8.75 → 0.8.76
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose/user_subscriptions_controller.rb +146 -148
- data/app/models/caboose/core_plugin.rb +17 -15
- data/app/views/caboose/user_subscriptions/admin_edit.html.erb +38 -0
- data/app/views/caboose/user_subscriptions/admin_index.html.erb +38 -0
- data/app/views/caboose/user_subscriptions/admin_user_index.html.erb +39 -0
- data/lib/caboose/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97b1c789c00f8996509c420259c60bab77fab081
|
4
|
+
data.tar.gz: 05460bf1a36080d2b95675de27181b1aa955823e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b1809f2a0c84e27c53c9c40222eac7058f5ea2cc9ed923f4be23217885507cb50b1536fc9b68afe0705b056ee12ac5faafafe1cb826c46f18b6b3252effc549
|
7
|
+
data.tar.gz: c28f108185d95bb20852aa532f4ab1f0c8167acfd86d2d6101cb78310c15f1310369e4ea4aa02c47143d61eed8ccd46c48ab23b37402791855cea522091dd1cc
|
@@ -1,148 +1,146 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#
|
23
|
-
#
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
#
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
#
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
#
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
#
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
#
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
#
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
# end
|
148
|
-
#end
|
1
|
+
|
2
|
+
module Caboose
|
3
|
+
class UserSubscriptionsController < ApplicationController
|
4
|
+
|
5
|
+
#===========================================================================
|
6
|
+
# Admin actions
|
7
|
+
#===========================================================================
|
8
|
+
|
9
|
+
# @route GET /admin/user-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
|
16
|
+
def admin_user_index
|
17
|
+
return if !user_is_allowed('usersubscriptions', 'view')
|
18
|
+
@edituser = User.find(params[:user_id])
|
19
|
+
render :layout => 'caboose/admin'
|
20
|
+
end
|
21
|
+
|
22
|
+
# @route GET /admin/user-subscriptions/json
|
23
|
+
# @route GET /admin/users/:user_id/subscriptions/json
|
24
|
+
def admin_json
|
25
|
+
return if !user_is_allowed('usersubscriptions', 'view')
|
26
|
+
|
27
|
+
pager = PageBarGenerator.new(params, {
|
28
|
+
'subscription_id' => '',
|
29
|
+
'user_id' => params[:user_id] ? params[:user_id] : '',
|
30
|
+
'date_started_gte' => '',
|
31
|
+
'date_started_lte' => '',
|
32
|
+
'date_started_full_gte' => '',
|
33
|
+
'date_started_full_lte' => '',
|
34
|
+
'status' => ''
|
35
|
+
},{
|
36
|
+
'model' => 'Caboose::UserSubscription',
|
37
|
+
'sort' => 'date_started',
|
38
|
+
'desc' => false,
|
39
|
+
'base_url' => params[:user_id] ? "/admin/users/#{params[:user_id]}/subscriptions" : '/admin/user-subscriptions',
|
40
|
+
'use_url_params' => false
|
41
|
+
})
|
42
|
+
render :json => {
|
43
|
+
:pager => pager,
|
44
|
+
:models => pager.items.as_json(:include => [:user, :subscription])
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# @route GET /admin/users/:user_id/subscriptions/:id
|
49
|
+
def admin_edit
|
50
|
+
return if !user_is_allowed('usersubscriptions', 'edit')
|
51
|
+
@user_subscription = UserSubscription.find(params[:id])
|
52
|
+
@edituser = User.find(params[:user_id])
|
53
|
+
render :layout => 'caboose/admin'
|
54
|
+
end
|
55
|
+
|
56
|
+
# @route GET /admin/users/:user_id/subscriptions/:id/json
|
57
|
+
def admin_json_single
|
58
|
+
return if !user_is_allowed('usersubscriptions', 'view')
|
59
|
+
us = UserSubscription.find(params[:id])
|
60
|
+
render :json => us
|
61
|
+
end
|
62
|
+
|
63
|
+
# @route POST /admin/users/:user_id/subscriptions
|
64
|
+
def admin_add
|
65
|
+
return unless user_is_allowed('usersubscriptions', 'add')
|
66
|
+
|
67
|
+
resp = Caboose::StdClass.new
|
68
|
+
s = params[:subscription_id] ? Subscription.where(:id => params[:subscription_id]).first : nil
|
69
|
+
|
70
|
+
if subscription_id.nil? || s.nil? || s.site_id != @site.id
|
71
|
+
resp.error = "A valid subscription is required."
|
72
|
+
else
|
73
|
+
us = UserSubscription.create(
|
74
|
+
:subscription_id => s.id,
|
75
|
+
:user_id => params[:user_id],
|
76
|
+
:date_started => Date.today,
|
77
|
+
:date_started_full => Date.today,
|
78
|
+
:status => UserSubcription::STATUS_ACTIVE
|
79
|
+
)
|
80
|
+
resp.redirect = "/admin/users/#{params[:user_id]}/subscriptions/#{us.id}"
|
81
|
+
resp.success = true
|
82
|
+
end
|
83
|
+
render :json => resp
|
84
|
+
end
|
85
|
+
|
86
|
+
# @route PUT /admin/users/:user_id/subscriptions/:id
|
87
|
+
def admin_update
|
88
|
+
return unless user_is_allowed('usersubscriptions', 'edit')
|
89
|
+
|
90
|
+
resp = StdClass.new
|
91
|
+
models = params[:id] == 'bulk' ? params[:model_ids].collect{ |model_id| UserSubscription.find(model_id) } : [UserSubscription.find(params[:id])]
|
92
|
+
|
93
|
+
params.each do |k, v|
|
94
|
+
case k
|
95
|
+
when 'subscription_id' then models.each{ |us| us.subscription_id = v }
|
96
|
+
when 'user_id' then models.each{ |us| us.user_id = v }
|
97
|
+
when 'date_started' then models.each{ |us| us.date_started = v }
|
98
|
+
when 'date_started_full' then models.each{ |us| us.date_started_full = v }
|
99
|
+
when 'status' then models.each{ |us| us.status = v }
|
100
|
+
end
|
101
|
+
end
|
102
|
+
models.each{ |us| us.save }
|
103
|
+
resp.success = true
|
104
|
+
render :json => resp
|
105
|
+
end
|
106
|
+
|
107
|
+
# @route DELETE /admin/users/:user_id/subscriptions/:id
|
108
|
+
def admin_delete
|
109
|
+
return unless user_is_allowed('usersubscriptions', 'delete')
|
110
|
+
|
111
|
+
model_ids = params[:id] == 'bulk' ? params[:model_ids] : [params[:id]]
|
112
|
+
model_ids.each do |model_id|
|
113
|
+
UserSubscription.where(:id => model_id).destroy_all
|
114
|
+
end
|
115
|
+
|
116
|
+
render :json => { :sucess => true }
|
117
|
+
end
|
118
|
+
|
119
|
+
# @route_priority 1
|
120
|
+
# @route GET /admin/user-subscriptions/:field-options
|
121
|
+
# @route GET /admin/users/:user_id/subscriptions/:field-options
|
122
|
+
def admin_options
|
123
|
+
if !user_is_allowed('subscriptions', 'edit')
|
124
|
+
render :json => false
|
125
|
+
return
|
126
|
+
end
|
127
|
+
|
128
|
+
options = []
|
129
|
+
case params[:field]
|
130
|
+
when 'subscription'
|
131
|
+
arr = Subcription.where(:site_id => @site.id).reorder(:name).all
|
132
|
+
options = arr.collect{ |s| { 'value' => s.id, 'text' => s.name }}
|
133
|
+
when 'status'
|
134
|
+
options = [
|
135
|
+
{ 'value' => UserSubscription::STATUS_ACTIVE , 'text' => 'Active' },
|
136
|
+
{ 'value' => UserSubscription::STATUS_INACTIVE , 'text' => 'Inactive' }
|
137
|
+
]
|
138
|
+
when 'user'
|
139
|
+
arr = User.where(:site_id => @site.id).reorder('last_name, first_name').all
|
140
|
+
options = arr.collect{ |u| { 'value' => u.id, 'text' => "#{u.first_name} #{u.last_name}" }}
|
141
|
+
end
|
142
|
+
render :json => options
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
146
|
+
end
|
@@ -7,21 +7,23 @@ class Caboose::CorePlugin < Caboose::CaboosePlugin
|
|
7
7
|
nav << { 'id' => 'my-account' , 'text' => 'My Account' , 'href' => '/my-account' , 'modal' => true }
|
8
8
|
|
9
9
|
item = { 'id' => 'core', 'text' => 'Settings', 'children' => [] }
|
10
|
-
item['children'] << { 'id' => 'blocktypes'
|
11
|
-
item['children'] << { 'id' => 'blocktypes'
|
12
|
-
item['children'] << { 'id' => 'fonts'
|
13
|
-
item['children'] << { 'id' => 'redirects'
|
14
|
-
item['children'] << { 'id' => 'permissions'
|
15
|
-
item['children'] << { 'id' => 'pagecustomfields'
|
16
|
-
item['children'] << { 'id' => 'post_categories'
|
17
|
-
item['children'] << { 'id' => 'postcustomfields'
|
18
|
-
item['children'] << { 'id' => 'roles'
|
19
|
-
item['children'] << { 'id' => 'sites'
|
20
|
-
item['children'] << { 'id' => 'smtp'
|
21
|
-
item['children'] << { 'id' => 'social'
|
22
|
-
item['children'] << { 'id' => 'store'
|
23
|
-
item['children'] << { 'id' => 'users'
|
24
|
-
item['children'] << { 'id' => '
|
10
|
+
item['children'] << { 'id' => 'blocktypes' , 'text' => 'AB Test Variants' , 'href' => '/admin/ab-variants' , 'modal' => false } if user.is_allowed('abvariants' , 'view')
|
11
|
+
item['children'] << { 'id' => 'blocktypes' , 'text' => 'Block Types' , 'href' => '/admin/block-types' , 'modal' => false } if user.is_allowed('blocktypes' , 'view') if site.is_master == true
|
12
|
+
item['children'] << { 'id' => 'fonts' , 'text' => 'Fonts' , 'href' => '/admin/fonts' , 'modal' => false } if user.is_allowed('fonts' , 'view') if site.use_fonts == true
|
13
|
+
item['children'] << { 'id' => 'redirects' , 'text' => 'Permanent Redirects' , 'href' => '/admin/redirects' , 'modal' => false } if user.is_allowed('redirects' , 'view')
|
14
|
+
item['children'] << { 'id' => 'permissions' , 'text' => 'Permissions' , 'href' => '/admin/permissions' , 'modal' => false } if user.is_allowed('permissions' , 'view')
|
15
|
+
item['children'] << { 'id' => 'pagecustomfields' , 'text' => 'Page Custom Fields' , 'href' => '/admin/page-custom-fields' , 'modal' => false } if user.is_allowed('pagecustomfields' , 'view')
|
16
|
+
item['children'] << { 'id' => 'post_categories' , 'text' => 'Post Categories' , 'href' => '/admin/post-categories' , 'modal' => false } if user.is_allowed('post_categories' , 'view')
|
17
|
+
item['children'] << { 'id' => 'postcustomfields' , 'text' => 'Post Custom Fields' , 'href' => '/admin/post-custom-fields' , 'modal' => false } if user.is_allowed('postcustomfields' , 'view')
|
18
|
+
item['children'] << { 'id' => 'roles' , 'text' => 'Roles' , 'href' => '/admin/roles' , 'modal' => false } if user.is_allowed('roles' , 'view')
|
19
|
+
item['children'] << { 'id' => 'sites' , 'text' => 'Sites' , 'href' => '/admin/sites' , 'modal' => false } if user.is_allowed('sites' , 'view') if site.is_master == true
|
20
|
+
item['children'] << { 'id' => 'smtp' , 'text' => 'SMTP (Mail)' , 'href' => '/admin/smtp' , 'modal' => false } if user.is_allowed('smtp' , 'view')
|
21
|
+
item['children'] << { 'id' => 'social' , 'text' => 'Social Media' , 'href' => '/admin/social' , 'modal' => false } if user.is_allowed('social' , 'view')
|
22
|
+
item['children'] << { 'id' => 'store' , 'text' => 'Store' , 'href' => '/admin/store' , 'modal' => false } if user.is_allowed('store' , 'view') if site.use_store == true
|
23
|
+
item['children'] << { 'id' => 'users' , 'text' => 'Users' , 'href' => '/admin/users' , 'modal' => false } if user.is_allowed('users' , 'view')
|
24
|
+
item['children'] << { 'id' => 'usersubscriptions' , 'text' => 'User Subscriptions' , 'href' => '/admin/user-subscriptions' , 'modal' => false } if user.is_allowed('usersubscriptions' , 'view')
|
25
|
+
item['children'] << { 'id' => 'subscriptions' , 'text' => 'Subscriptions' , 'href' => '/admin/subscriptions' , 'modal' => false } if user.is_allowed('subscriptions' , 'view')
|
26
|
+
item['children'] << { 'id' => 'variables' , 'text' => 'Variables' , 'href' => '/admin/settings' , 'modal' => false } if user.is_allowed('settings' , 'view')
|
25
27
|
nav << item if item['children'].count > 0
|
26
28
|
|
27
29
|
item = { 'id' => 'content', 'text' => 'Content', 'children' => [] }
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
<%= render :partial => 'caboose/users/admin_header' %>
|
3
|
+
|
4
|
+
<p><div id='usersubscription_<%= @user_subscription.id %>_subscription_id' ></div></p>
|
5
|
+
<p><div id='usersubscription_<%= @user_subscription.id %>_user_id' ></div></p>
|
6
|
+
<p><div id='usersubscription_<%= @user_subscription.id %>_date_started' ></div></p>
|
7
|
+
<p><div id='usersubscription_<%= @user_subscription.id %>_date_started_full' ></div></p>
|
8
|
+
<p><div id='usersubscription_<%= @user_subscription.id %>_status' ></div></p>
|
9
|
+
|
10
|
+
<%= render :partial => 'caboose/users/admin_footer' %>
|
11
|
+
|
12
|
+
<% content_for :caboose_css do %>
|
13
|
+
<style type='text/css'>
|
14
|
+
#content input[type=checkbox] { position: relative; }
|
15
|
+
#roles { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
|
16
|
+
</style>
|
17
|
+
<% end %>
|
18
|
+
<% content_for :caboose_js do %>
|
19
|
+
<%= javascript_include_tag "caboose/model/all" %>
|
20
|
+
<script type="text/javascript">
|
21
|
+
|
22
|
+
$(document).ready(function() {
|
23
|
+
new ModelBinder({
|
24
|
+
name: 'UserSubcription',
|
25
|
+
id: <%= @edituser.id %>,
|
26
|
+
update_url: '/admin/users/<%= @edituser.id %>/subscriptions/<%= @user_subscription.id %>',
|
27
|
+
authenticity_token: '<%= form_authenticity_token %>',
|
28
|
+
attributes: [
|
29
|
+
{ name: 'subscription_id' , nice_name: 'Subcription' , type: 'select' , value: <%= raw Caboose.json(@edituser.subscription_id ) %>, width: 400, options_url '/admin/users/<%= @edituser.id %>/subscriptions/subscription-options' },
|
30
|
+
{ name: 'date_started' , nice_name: 'Date Started' , type: 'date' , value: <%= raw Caboose.json(@edituser.date_started ) %>, width: 400 },
|
31
|
+
{ name: 'date_started_full' , nice_name: 'Date Started Full' , type: 'date' , value: <%= raw Caboose.json(@edituser.date_started_full ) %>, width: 400 },
|
32
|
+
{ name: 'status' , nice_name: 'Status' , type: 'select' , value: <%= raw Caboose.json(@edituser.status ) %>, width: 400, options_url '/admin/users/<%= @edituser.id %>/subscriptions/status-options' }
|
33
|
+
]
|
34
|
+
});
|
35
|
+
});
|
36
|
+
|
37
|
+
</script>
|
38
|
+
<% end %>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
<h1>User Subcriptions</h1>
|
3
|
+
|
4
|
+
<div id='usersubscriptions'></div>
|
5
|
+
|
6
|
+
<% content_for :caboose_js do %>
|
7
|
+
<%= javascript_include_tag 'caboose/model/all' %>
|
8
|
+
<script type='text/javascript'>
|
9
|
+
|
10
|
+
$(document).ready(function() {
|
11
|
+
var that = this;
|
12
|
+
var table = new IndexTable({
|
13
|
+
form_authenticity_token: '<%= form_authenticity_token %>',
|
14
|
+
container: 'usersubscriptions',
|
15
|
+
base_url: '/admin/user-subscriptions',
|
16
|
+
allow_bulk_edit: true,
|
17
|
+
allow_bulk_delete: true,
|
18
|
+
allow_duplicate: false,
|
19
|
+
allow_advanced_edit: true,
|
20
|
+
fields: [
|
21
|
+
{ show: true, bulk_edit: true, name: 'subscription_id' , nice_name: 'Subscription' , sort: 'subscription_id' , type: 'select' , value: function(us) { return us.subscription_id }, text: function(us) { return us.subscription ? us.subscription.name : us.subscription_id; }, width: 75, align: 'left', options_url: '/admin/user-subscriptions/subscription-options' },
|
22
|
+
{ show: true, bulk_edit: true, name: 'user_id' , nice_name: 'User' , sort: 'user_id' , type: 'select' , value: function(us) { return us.user_id }, text: function(us) { return us.user ? us.user.first_name + ' ' + us.user.last_name : us.user_id; }, width: 75, align: 'left', options_url: '/admin/user-subscriptions/user-options' },
|
23
|
+
{ show: true, bulk_edit: true, name: 'date_started' , nice_name: 'Date Started' , sort: 'date_started' , type: 'date' , value: function(us) { return us.date_started }, width: 75, align: 'left' },
|
24
|
+
{ show: true, bulk_edit: true, name: 'date_started_full' , nice_name: 'Date Started Full' , sort: 'date_started_full' , type: 'date' , value: function(us) { return us.date_started_full }, width: 75, align: 'left' },
|
25
|
+
{ show: true, bulk_edit: true, name: 'status' , nice_name: 'Status' , sort: 'status' , type: 'select' , value: function(us) { return us.status }, width: 75, align: 'left', options_url: '/admin/user-subscriptions/status-options' }
|
26
|
+
],
|
27
|
+
new_model_text: 'New User Subscription',
|
28
|
+
no_models_text: "This user doesn't have any subscriptions right now.",
|
29
|
+
new_model_fields: [
|
30
|
+
{ name: 'subscription_id', nice_name: 'Subscription', type: 'select', width: 400, options_url: '/admin/user-subscriptions/subscription-options' }
|
31
|
+
],
|
32
|
+
bulk_import_fields: ['subscription_id', 'user_id', 'date_started', 'date_started_full', 'status'],
|
33
|
+
bulk_import_url: '/admin/user-subscriptions/bulk'
|
34
|
+
});
|
35
|
+
});
|
36
|
+
|
37
|
+
</script>
|
38
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
<%= render :partial => 'caboose/users/admin_header' %>
|
3
|
+
|
4
|
+
<div id='usersubscriptions'></div>
|
5
|
+
|
6
|
+
<%= render :partial => 'caboose/users/admin_footer' %>
|
7
|
+
|
8
|
+
<% content_for :caboose_js do %>
|
9
|
+
<%= javascript_include_tag 'caboose/model/all' %>
|
10
|
+
<script type='text/javascript'>
|
11
|
+
|
12
|
+
$(document).ready(function() {
|
13
|
+
var that = this;
|
14
|
+
var table = new IndexTable({
|
15
|
+
form_authenticity_token: '<%= form_authenticity_token %>',
|
16
|
+
container: 'usersubscriptions',
|
17
|
+
base_url: '/admin/users/<%= @edituser.id %>/subscriptions',
|
18
|
+
allow_bulk_edit: true,
|
19
|
+
allow_bulk_delete: true,
|
20
|
+
allow_duplicate: false,
|
21
|
+
allow_advanced_edit: true,
|
22
|
+
fields: [
|
23
|
+
{ show: true, bulk_edit: true, name: 'subscription_id' , nice_name: 'Subscription' , sort: 'subscription_id' , type: 'select' , value: function(us) { return us.subscription_id }, text: function(us) { return us.subscription ? us.subscription.name : us.subscription_id; }, width: 75, align: 'left', options_url: '/admin/users<%= @edituser.id %>/subscriptions/subscription-options' },
|
24
|
+
{ show: true, bulk_edit: true, name: 'date_started' , nice_name: 'Date Started' , sort: 'date_started' , type: 'date' , value: function(us) { return us.date_started }, width: 75, align: 'left' },
|
25
|
+
{ show: true, bulk_edit: true, name: 'date_started_full' , nice_name: 'Date Started Full' , sort: 'date_started_full' , type: 'date' , value: function(us) { return us.date_started_full }, width: 75, align: 'left' },
|
26
|
+
{ show: true, bulk_edit: true, name: 'status' , nice_name: 'Status' , sort: 'status' , type: 'select' , value: function(us) { return us.status }, width: 75, align: 'left', options_url: '/admin/users<%= @edituser.id %>/subscriptions/status-options' }
|
27
|
+
],
|
28
|
+
new_model_text: 'New User Subscription',
|
29
|
+
no_models_text: "This user doesn't have any subscriptions right now.",
|
30
|
+
new_model_fields: [
|
31
|
+
{ name: 'subscription_id', nice_name: 'Subscription', type: 'select', width: 400, options_url: '/admin/users<%= @edituser.id %>/subscriptions/subscription-options' }
|
32
|
+
],
|
33
|
+
bulk_import_fields: ['subscription_id', 'date_started', 'date_started_full', 'status'],
|
34
|
+
bulk_import_url: '/admin/users/<%= @edituser.id %>/subscriptions/bulk'
|
35
|
+
});
|
36
|
+
});
|
37
|
+
|
38
|
+
</script>
|
39
|
+
<% 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.76
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
@@ -1208,6 +1208,9 @@ files:
|
|
1208
1208
|
- app/views/caboose/store/admin_edit_tax.html.erb
|
1209
1209
|
- app/views/caboose/subscriptions/admin_edit.html.erb
|
1210
1210
|
- app/views/caboose/subscriptions/admin_index.html.erb
|
1211
|
+
- app/views/caboose/user_subscriptions/admin_edit.html.erb
|
1212
|
+
- app/views/caboose/user_subscriptions/admin_index.html.erb
|
1213
|
+
- app/views/caboose/user_subscriptions/admin_user_index.html.erb
|
1211
1214
|
- app/views/caboose/users/_admin_footer.html.erb
|
1212
1215
|
- app/views/caboose/users/_admin_header.html.erb
|
1213
1216
|
- app/views/caboose/users/admin_delete_form.html.erb
|