caboose-cms 0.2.65 → 0.2.66
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/page_plugin.rb +16 -14
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWE0ODhjNDY0ODZlNzQzNGY5ZGU2MGQ3MjEwMmVkMDgyNDUzYjdhNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjNiNjE2NTk5ZmM0OTk2OGE3ZjM4MTQ0ZWYxYTQ3NGUzZDk0Yjc2MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2I2OTIwMDQ0ZTQ4YjQ1MmEwZjc4NDBhOTZiODYyY2M5NWNhN2M1MjNlMGYy
|
10
|
+
MmI2MmI4ZTRhYjZlNDRhODg0ZTg1YmZkOGJhOTNjYjMwMmNiMGQ5OWQyMWQ0
|
11
|
+
NDFmMmI4M2RjZjg0NDA5NzYyZGZmOTFiNzg3ZjQ4NTUxNGE2NWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTNjNTBmZGIwYjljMDNkY2JiM2ZlOWE4NWE0NWM5YTZjMDE3YmM0Y2EzMzUz
|
14
|
+
Nzk0NDJmOGYzNWZlMWE0NGM4NDEzNzM2YWVhYzNiNmZiYmQ5ODRmNzkzYjA0
|
15
|
+
YzM4MjFjMzBkYzc1YzU3MjdmN2E0MzBmOTc5ZTdkYzg3ZTdkM2I=
|
@@ -6,23 +6,25 @@ class Caboose::PagePlugin < Caboose::CaboosePlugin
|
|
6
6
|
item = {
|
7
7
|
'id' => 'pages',
|
8
8
|
'text' => 'Pages',
|
9
|
-
'children' => []
|
9
|
+
'children' => [],
|
10
|
+
'href' => '/admin/pages',
|
11
|
+
'modal' => false
|
10
12
|
#'show_children_default' => true
|
11
13
|
}
|
12
14
|
|
13
|
-
is_admin = user.is_allowed('all', 'all')
|
14
|
-
actions = Caboose::Page.permissible_actions(user.id, page.id)
|
15
|
-
if (actions.include?('edit') || is_admin)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
if (user.is_allowed('pages', 'add') || is_admin)
|
24
|
-
|
25
|
-
end
|
15
|
+
#is_admin = user.is_allowed('all', 'all')
|
16
|
+
#actions = Caboose::Page.permissible_actions(user.id, page.id)
|
17
|
+
#if (actions.include?('edit') || is_admin)
|
18
|
+
# item['children'] << { 'href' => "/pages/#{page.id}/sitemap" , 'text' => 'Site Map This Page' }
|
19
|
+
# item['children'] << { 'href' => "/pages/#{page.id}/edit" , 'text' => 'Edit Page Content' }
|
20
|
+
# item['children'] << { 'href' => "/pages/#{page.id}/edit-settings" , 'text' => 'Edit Page Settings', 'modal' => false }
|
21
|
+
#
|
22
|
+
# #uru = session['use_redirect_urls'].nil? ? true : session['use_redirect_urls']
|
23
|
+
# #item['children'] << { 'id' => 'use_redirect_urls', 'href' => '#', 'text' => '' + (uru ? 'Disable' : 'Enable') + ' Redirect Urls' }
|
24
|
+
#end
|
25
|
+
#if (user.is_allowed('pages', 'add') || is_admin)
|
26
|
+
# item['children'] << { 'href' => "/pages/new?parent_id=#{page.id}" , 'text' => 'New Page', 'modal' => true }
|
27
|
+
#end
|
26
28
|
nav << item
|
27
29
|
return nav
|
28
30
|
end
|
data/lib/caboose/version.rb
CHANGED