ecm_cms2_backend 1.2.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fa231509982aa2763076a73f32626c5b537afc1
|
4
|
+
data.tar.gz: 7a2d059bb279b0becb83b66ee5c378c5b8fac57a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c70ba39c757c4efcd645830c808e70cf0d06fe79e1096fea8af1f81429178a8d61ac2d97bef94d17c5f07fd54461fbc9c78e751daaf3b9c3ddeaf0f8397187e
|
7
|
+
data.tar.gz: 027dde3d8148ee8a7f3e8eeee8d2988232dc12359ba7300108dd4aff1fc452c5c57b5cbdf808d0bd30bd776dd658257704ac8107b69b77b7b8950e784e633af1
|
@@ -1,5 +1,6 @@
|
|
1
1
|
class Ecm::Cms::Backend::NavigationItemsController < Itsf::Backend::Resource::BaseController
|
2
|
-
include
|
2
|
+
include ResourcesController::AwesomeNestedSetConcern
|
3
|
+
include ResourcesController::Sorting
|
3
4
|
|
4
5
|
def self.resource_class
|
5
6
|
Ecm::Cms::NavigationItem
|
@@ -7,6 +8,10 @@ class Ecm::Cms::Backend::NavigationItemsController < Itsf::Backend::Resource::Ba
|
|
7
8
|
|
8
9
|
private
|
9
10
|
|
11
|
+
def load_collection_scope
|
12
|
+
super.joins(:ecm_cms_navigation)
|
13
|
+
end
|
14
|
+
|
10
15
|
def permitted_params
|
11
16
|
params.require(:navigation_item)
|
12
17
|
.permit(:ecm_cms_navigation_id, :ecm_cms_page_id, :highlights_on, :key, :name, :parent_id, :options, :url, *Ecm::Cms::Configuration.navigation_item_properties)
|
@@ -1,8 +1,9 @@
|
|
1
|
-
= table.
|
2
|
-
= table.
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
= table.awesome_nested_set_actions scope: ->(navigation_item) { navigation_item.root.ecm_cms_navigation.to_param }
|
2
|
+
= table.association(:ecm_cms_navigation, sort: { column_name: 'ecm_cms_navigations.name'}, link_to: ->(navigation_item) { navigation_path(navigation_item.ecm_cms_navigation) })
|
3
|
+
= table.column(:name, sort: true) do |navigation_item|
|
4
|
+
- capture_haml do
|
5
|
+
%span{ class: "indent indent-chars-#{navigation_item.depth * 3}"}= navigation_item.name
|
6
|
+
= table.column :url, sort: true
|
7
|
+
= table.column(:ecm_cms_page, sort: { column_name: :ecm_cms_page_title }) do |navigation_item|
|
6
8
|
- link_to navigation_item.ecm_cms_page.title, page_path(navigation_item.ecm_cms_page) if navigation_item.ecm_cms_page.present?
|
7
|
-
= table.timestamps
|
8
|
-
= table.awesome_nested_set_actions scope: ->(navigation_item) { navigation_item.root.ecm_cms_navigation.to_param }
|
9
|
+
= table.timestamps(format: :short)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_cms2_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|