caboose-cms 0.5.232 → 0.5.233

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDZlYTJiYTgxMWY4NDk3MzM5NGI1ZjliNzVlNzIwOTE2ZDNkZTg3YQ==
4
+ YTgyMzMwMTYyOGYxYmNiN2JkNGEyYzhiNDNmYTgxMzMyYjJkOWViZg==
5
5
  data.tar.gz: !binary |-
6
- NGE3YmExYTRhMzQ3OWM5NTM2NWIyZjAyODBiMGRmNGJiZjQ1M2Y2MQ==
6
+ Y2I4MjU2ZjliMjgwM2E2MjliYzA2NTZlZTYwOWI4MDkzN2M2MWY4ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmNlZjNjNTQ4NDIxMGI1MWVhYTg1ZWM0NmZiYzJhZWIyZmMxMjk1MGEyNjc4
10
- MWI3Mjk2MmEyNzhkZDU3MDE3MDhlOWJmNWRiZjhmZjMzZjE3NmIxYThhZjk4
11
- NTQ3MDE3MWY3MDcyYTEyYzExYmYwODZlOWI3ZjBmZWEzNmQ3Yzk=
9
+ OWYxN2VjYzg0ZTc4YzBkYTlhOGY0YTM4ZmM2YTQ5OTYzNzczNGRlMzVjNWQ2
10
+ OTgzYWZhNzBmODEzNTFlMjk5Mzk5OTExMDRiNDNiYzgzZjllYjExYzc3ZjUx
11
+ YTdmYWUwZDAwNjUzODdmOGE3Yzc0ODU5MDU3ZDYxMDViOGE3OGE=
12
12
  data.tar.gz: !binary |-
13
- ZWMzN2JkMTJiM2FhNTQwMzVmZTI5MTVkOWVlYWExNTM2MDJmMjk5NjRkNTEx
14
- YmExNDBjZjNiNWJkNWI4NmFhMDE0MWRjNGJjMzk3Yjc5YmRlZTQwOWUzODEx
15
- YTNmZWQ1M2FjMThmZDg2Mjc4YjY2M2MzYjM4NjFkOGE4Yjg1NjA=
13
+ OTMzNDNmY2VlM2Y1NzJiNTZjZmUyMzdlYjEyOGE5OWU3YTE0MzUwNjI0Mzdl
14
+ ZDM3M2UyMjlmYTkwNzc2ZWE2OTNlZGU4MmU3ZTI3MTU0NmE1MzEyYzIyMjAz
15
+ YjQ5NTlmMmFlMzc5M2MxZmU0MTdhNDFlYTcxM2UyMmI5ZGZiODA=
@@ -16,6 +16,15 @@ module Caboose
16
16
  tree = Caboose::MediaCategory.flat_tree(@site.id, prefix)
17
17
  render :json => tree
18
18
  end
19
+
20
+ # GET /admin/media-categories/options
21
+ def admin_options
22
+ return unless user_is_allowed('mediacategories', 'view')
23
+ prefix = params[:prefix] ? params[:prefix] : '-  '
24
+ tree = Caboose::MediaCategory.flat_tree(@site.id, prefix)
25
+ options = tree.collect{ |mc| { 'value' => mc.id, 'text' => mc.name }}
26
+ render :json => tree
27
+ end
19
28
 
20
29
  # POST /admin/media-categories
21
30
  def admin_add
@@ -86,7 +95,7 @@ module Caboose
86
95
  end
87
96
 
88
97
  render :json => { :success => true }
89
- end
98
+ end
90
99
 
91
100
  end
92
101
  end
@@ -223,12 +223,13 @@ Caboose::Engine.routes.draw do
223
223
  delete "/admin/media/:id" => "media#admin_delete"
224
224
 
225
225
 
226
- get "/admin/media-categories/json" => "media_categories#admin_json"
227
- get "/admin/media-categories/flat-tree" => "media_categories#admin_flat_tree"
228
- post "/admin/media-categories" => "media_categories#admin_add"
229
- post "/admin/media-categories/:id/attach" => "media_categories#admin_attach"
230
- put "/admin/media-categories/:id" => "media_categories#admin_update"
231
- delete "/admin/media-categories/:id" => "media_categories#admin_delete"
226
+ get "/admin/media-categories/json" => "media_categories#admin_json"
227
+ get "/admin/media-categories/options" => "media_categories#admin_options"
228
+ get "/admin/media-categories/flat-tree" => "media_categories#admin_flat_tree"
229
+ post "/admin/media-categories" => "media_categories#admin_add"
230
+ post "/admin/media-categories/:id/attach" => "media_categories#admin_attach"
231
+ put "/admin/media-categories/:id" => "media_categories#admin_update"
232
+ delete "/admin/media-categories/:id" => "media_categories#admin_delete"
232
233
 
233
234
  #=============================================================================
234
235
  # Settings
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.232'
2
+ VERSION = '0.5.233'
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.5.232
4
+ version: 0.5.233
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-06-30 00:00:00.000000000 Z
11
+ date: 2015-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg