effective_pages 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 587508cec2b677dd7fe58c72c21959f0d197c1c9
4
- data.tar.gz: f74c3e83c9185298f302b32ca4425e2a8d3c0dc8
3
+ metadata.gz: bb5bc39d6d56fdb47258f05427525b1bf76591d4
4
+ data.tar.gz: a830fb0aa95733fc882a9cdec9f8f8d33b388e2b
5
5
  SHA512:
6
- metadata.gz: 89d3bd9324ee7858b41016218c9150de0ef47d24e9a993e6e646173d2b50f8c436a0cac489aeca640b31e4626c8814ff3adc14cba7104dd59a5faa9f19457e4c
7
- data.tar.gz: 9c13ffda03b844cab226b6b8f40829e491d35065534b5691f2f71f7d516fd980e6832a242f9d53101531228d03e95ce45e134bede7592d1a29fe712e2b75fa7f
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
- @datatable = Effective::Datatables::Menus.new() if defined?(EffectiveDatatables)
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
- @datatable = Effective::Datatables::Pages.new() if defined?(EffectiveDatatables)
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: asset_path(EffectivePages.site_og_image.to_s))
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
 
@@ -1,4 +1,4 @@
1
- if defined?(EffectiveDatatables)
1
+ if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
2
2
  module Effective
3
3
  module Datatables
4
4
  class Menus < Effective::Datatable
@@ -1,4 +1,4 @@
1
- if defined?(EffectiveDatatables)
1
+ if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
2
2
  module Effective
3
3
  module Datatables
4
4
  class Pages < Effective::Datatable
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '1.1.3'.freeze
2
+ VERSION = '1.1.4'.freeze
3
3
  end
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.3
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-03-11 00:00:00.000000000 Z
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