effective_pages 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/admin/menus_controller.rb +6 -1
- data/app/controllers/admin/pages_controller.rb +6 -1
- data/app/datatables/effective_menus_datatable.rb +18 -0
- data/app/datatables/effective_pages_datatable.rb +23 -0
- data/app/helpers/effective_pages_helper.rb +1 -1
- data/app/models/effective/datatables/menus.rb +1 -1
- data/app/models/effective/datatables/pages.rb +1 -1
- data/lib/effective_pages/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb5bc39d6d56fdb47258f05427525b1bf76591d4
|
4
|
+
data.tar.gz: a830fb0aa95733fc882a9cdec9f8f8d33b388e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d624c0a5d06b1775010b90511e8a92ec1e1ed2d503bc10594378c0cf7c17f49419da44fe50b43ea203b3a75d010ef3afbf2f8eb7f3489f36a0d7f8ee63b382b
|
7
|
+
data.tar.gz: 9aae7a67e312587e7e1a020c54d9f035aae9fbf988e9def8046e9e21a74607b7eda1523e754d2393ec5cbbbf0c7a51eec53b5d19931519d151aa260ad481e542
|
@@ -7,7 +7,12 @@ module Admin
|
|
7
7
|
layout (EffectivePages.layout.kind_of?(Hash) ? EffectivePages.layout[:admin] : EffectivePages.layout)
|
8
8
|
|
9
9
|
def index
|
10
|
-
|
10
|
+
if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
|
11
|
+
@datatable = Effective::Datatables::Menus.new()
|
12
|
+
else
|
13
|
+
@datatable = EffectiveMenusDatatable.new(self)
|
14
|
+
end
|
15
|
+
|
11
16
|
@page_title = 'Menus'
|
12
17
|
|
13
18
|
authorize_effective_menus!
|
@@ -5,7 +5,12 @@ module Admin
|
|
5
5
|
layout (EffectivePages.layout.kind_of?(Hash) ? EffectivePages.layout[:admin] : EffectivePages.layout)
|
6
6
|
|
7
7
|
def index
|
8
|
-
|
8
|
+
if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
|
9
|
+
@datatable = Effective::Datatables::Pages.new()
|
10
|
+
else
|
11
|
+
@datatable = EffectivePagesDatatable.new(self)
|
12
|
+
end
|
13
|
+
|
9
14
|
@page_title = 'Pages'
|
10
15
|
|
11
16
|
authorize_effective_pages!
|
@@ -0,0 +1,18 @@
|
|
1
|
+
unless Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
|
2
|
+
class EffectiveMenusDatatable < Effective::Datatable
|
3
|
+
|
4
|
+
datatable do
|
5
|
+
col :id, visible: false
|
6
|
+
col :updated_at, visible: false
|
7
|
+
|
8
|
+
col :title
|
9
|
+
|
10
|
+
actions_col partial: 'admin/menus/actions', partial_as: :menu
|
11
|
+
end
|
12
|
+
|
13
|
+
collection do
|
14
|
+
Effective::Menu.all
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
unless Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
|
2
|
+
class EffectivePagesDatatable < Effective::Datatable
|
3
|
+
|
4
|
+
datatable do
|
5
|
+
order :title, :asc
|
6
|
+
length :all
|
7
|
+
|
8
|
+
col :id, visible: false
|
9
|
+
col :updated_at, visible: false
|
10
|
+
|
11
|
+
col :title
|
12
|
+
col :slug
|
13
|
+
col :draft
|
14
|
+
|
15
|
+
actions_col partial: 'admin/pages/actions', partial_as: :page
|
16
|
+
end
|
17
|
+
|
18
|
+
collection do
|
19
|
+
Effective::Page.all
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -18,7 +18,7 @@ module EffectivePagesHelper
|
|
18
18
|
tag(:meta, property: 'og:title', content: effective_pages_page_title),
|
19
19
|
tag(:meta, property: 'og:description', content: effective_pages_meta_description),
|
20
20
|
tag(:meta, property: 'og:url', content: request.original_url),
|
21
|
-
tag(:meta, property: 'og:image', content:
|
21
|
+
tag(:meta, property: 'og:image', content: asset_url(EffectivePages.site_og_image.to_s))
|
22
22
|
].compact.join("\n").html_safe
|
23
23
|
end
|
24
24
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -153,6 +153,8 @@ files:
|
|
153
153
|
- app/controllers/admin/menus_controller.rb
|
154
154
|
- app/controllers/admin/pages_controller.rb
|
155
155
|
- app/controllers/effective/pages_controller.rb
|
156
|
+
- app/datatables/effective_menus_datatable.rb
|
157
|
+
- app/datatables/effective_pages_datatable.rb
|
156
158
|
- app/helpers/effective_breadcrumbs_helper.rb
|
157
159
|
- app/helpers/effective_menus_admin_helper.rb
|
158
160
|
- app/helpers/effective_menus_helper.rb
|