ecm_cms2_backend 1.2.3 → 1.3.0

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: cf17ea9c87baaf65ec744a9c2ccda08f929b4735
4
- data.tar.gz: 8f0f431ee982860154d02600201125a60b073fa1
3
+ metadata.gz: 6fa231509982aa2763076a73f32626c5b537afc1
4
+ data.tar.gz: 7a2d059bb279b0becb83b66ee5c378c5b8fac57a
5
5
  SHA512:
6
- metadata.gz: 96c05faf3f093857182adcf5865a81e52502dd9d348263a8ba0f210ca3812b4ddd39b6d964fb4131d5c35d18647b7e62a92a91afa417b94f003acaf1109ba1e7
7
- data.tar.gz: 118b3ad203c6bb3e6447f4d72c97be1d84a22ff2ce01f2fb657d5b01c6cef3a05f33427258243561641eac9839b06dc70b8c47ca311a75c26e3b2d7baf9f6851
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 Controller::AwesomeNestedSetConcern
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.association(:ecm_cms_navigation, sortable: :ecm_cms_navigation_name, url: ->(navigation_item) { navigation_path(navigation_item.ecm_cms_navigation) })
2
- = table.column(:name, sortable: true) do |navigation_item|
3
- %span{ class: "indent indent-chars-#{navigation_item.depth * 3}"}= navigation_item.name
4
- = table.column :url, sortable: true
5
- = table.column(:ecm_cms_page, sortable: :ecm_cms_page_title) do |navigation_item|
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)
@@ -1,7 +1,7 @@
1
1
  module Ecm
2
2
  module Cms
3
3
  module Backend
4
- VERSION = '1.2.3'.freeze
4
+ VERSION = '1.3.0'.freeze
5
5
  end
6
6
  end
7
7
  end
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.2.3
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: 2017-10-31 00:00:00.000000000 Z
11
+ date: 2018-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails